New make(1) infrastructure. Split out docproj.docbook.mk into a number

of smaller doc.<foo>.mk files, reflecting the functionality they contain.
Long overdue, kudos to the submitter for the carrying out the work.

Also makes the files independent of the system include files that
normally live in /usr/share/mk, making it easier for non-FreeBSD systems
to download and build our docs (an important factor in making it easier
to share our work with other projects).

Finally, it (in theory) lets you build the docs with a r/o doc/ directory.

Changes to the submitted files:

doc.docbook.mk    The HTML generation depends on ${DSLHTML}, and the
                  print generation depends on ${DSLPRINT}.  Changing
                  these files will force a rebuild (which makes testing
                  changes a little easier).

                  Removed ${DOC}.doc target.  It's a hangover from when
                  I (mistakenly) thought that Jade could generate MS Word
                  .doc files.

                  Added support for using compress(1) to build .Z files
                  (been on my todo list for ages).

                  Fixed a couple of typos.

Submitted by:   Neil Blakey-Milner <nbm@mithrandr.moria.org>
This commit is contained in:
Nik Clayton 1999-09-03 17:07:19 +00:00
parent acb04f3d78
commit 7d4a994791
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=5500
4 changed files with 739 additions and 0 deletions

362
share/mk/doc.docbook.mk Normal file
View file

@ -0,0 +1,362 @@
#
# $Id: doc.docbook.mk,v 1.1 1999-09-03 17:07:18 nik Exp $
#
# This include file <doc.docbook.mk> handles building and installing of
# DocBook documentation in the FreeBSD Documentation Project.
#
# Documentation using DOCFORMAT=docbook is expected to be marked up
# according to the DocBook DTD
#
# ------------------------------------------------------------------------
#
# Document-specific variables
#
# DOC This should be set to the name of the DocBook
# marked-up file, without the .sgml or .docb suffix.
#
# It also determins the name of the output files -
# ${DOC}.html.
#
# DOCBOOKSUFFIX The suffix of your document, defaulting to .sgml
#
# SRCS The names of all the files that are needed to
# build this document - This is useful if any of
# them need to be generated. Changing any file in
# SRCS causes the documents to be rebuilt.
#
# ------------------------------------------------------------------------
#
# Variables used by both users and documents:
#
# JADEFLAGS Additional options to pass to Jade. Typically
# used to define "IGNORE" entities to "INCLUDE"
# with "-i<entity-name>"
#
# TIDYFLAGS Additional flags to pass to Tidy. Typically
# used to set "-raw" flag to handle 8bit characters.
#
# EXTRA_CATALOGS Additional catalog files that should be used by
# any SGML processing applications.
#
# Documents should use the += format to access these.
#
MASTERDOC?= ${.CURDIR}/${DOC}.sgml
JADE= ${PREFIX}/bin/jade
DSLHTML= ${DOC_PREFIX}/share/sgml/freebsd.dsl
DSLPRINT= ${DOC_PREFIX}/share/sgml/freebsd.dsl
FREEBSDCATALOG= ${DOC_PREFIX}/share/sgml/catalog
DOCBOOKCATALOG= ${PREFIX}/share/sgml/docbook/catalog
JADECATALOG= ${PREFIX}/share/sgml/jade/catalog
DSSSLCATALOG= ${PREFIX}/share/sgml/docbook/dsssl/modular/catalog
JADEOPTS= ${JADEFLAGS} -c ${FREEBSDCATALOG} -c ${DSSSLCATALOG} -c ${DOCBOOKCATALOG} -c ${JADECATALOG} ${EXTRA_CATALOGS:S/^/-c /g}
KNOWN_FORMATS= html html-split html-split.tar txt rtf ps pdf tex dvi tar
# ------------------------------------------------------------------------
#
# Look at ${FORMATS} and work out which documents need to be generated.
# It is assumed that the HTML transformation will always create a file
# called index.html, and that for every other transformation the name
# of the generated file is ${DOC}.format.
#
# ${_docs} will be set to a list of all documents that must be made
# up to date.
#
# ${CLEANFILES} is a list of files that should be removed by the "clean"
# target. ${COMPRESS_EXT:S/^/${DOC}.${_cf}.&/ takes the COMPRESS_EXT
# var, and prepends the filename to each listed extension, building a
# second list of files with the compressed extensions added.
#
# Note: ".for _curformat in ${KNOWN_FORMATS}" is used several times in
# this file. I know they could have been rolled together in to one, much
# larger, loop. However, that would have made things more complicated
# for a newcomer to this file to unravel and understand, and a syntax
# error in the loop would have affected the entire
# build/compress/install process, instead of just one of them, making it
# more difficult to debug.
#
# Note: It is the aim of this file that *all* the targets be available,
# not just those appropriate to the current ${FORMATS} and
# ${INSTALL_COMPRESSED} values.
#
# For example, if FORMATS=html and INSTALL_COMPRESSED=gz you could still
# type
#
# make book.rtf.bz2
#
# and it will do the right thing. Or
#
# make install-rtf.bz2
#
# for that matter. But don't expect "make clean" to work if the FORMATS
# and INSTALL_COMPRESSED variables are wrong.
#
.for _curformat in ${FORMATS}
_cf=${_curformat}
.if ${_cf} == "html-split"
_docs+= index.html HTML.manifest
CLEANFILES+= `xargs < HTML.manifest` HTML.manifest
.elif ${_cf} == "html-split.tar"
_docs+= ${DOC}.html-split.tar
CLEANFILES+= `xargs < HTML.manifest` HTML.manifest
CLEANFILES+= ${DOC}.html-split.tar
.elif ${_cf} == "html"
_docs+= ${DOC}.html
CLEANFILES+= ${DOC}.html
.elif ${_cf} == "txt"
_docs+= ${DOC}.txt
CLEANFILES+= ${DOC}.html ${DOC}.txt
.elif ${_cf} == "dvi"
_docs+= ${DOC}.dvi
CLEANFILES+= ${DOC}.aux ${DOC}.dvi ${DOC}.log ${DOC}.tex
.elif ${_cf} == "ps"
_docs+= ${DOC}.ps
CLEANFILES+= ${DOC}.aux ${DOC}.dvi ${DOC}.log ${DOC}.tex ${DOC}.ps
.elif ${_cf} == "pdf"
_docs+= ${DOC}.pdf
CLEANFILES+= ${DOC}.aux ${DOC}.dvi ${DOC}.log ${DOC}.tex ${DOC}.pdf
.elif ${_cf} == "rtf"
_docs+= ${DOC}.rtf
CLEANFILES+= ${DOC}.rtf
.elif ${_cf} == "tar"
_docs+= ${DOC}.tar
CLEANFILES+= ${DOC}.tar
.elif ${_cf} == "doc"
_docs+= ${DOC}.doc
CLEANFILES+= ${DOC}.doc
.endif
.endfor
#
# Build a list of install-${format}.${compress_format} targets to be
# by "make install". Also, add ${DOC}.${format}.${compress_format} to
# ${_docs} and ${CLEANFILES} so they get built/cleaned by "all" and
# "clean".
#
.if defined(INSTALL_COMPRESSED) && !empty(INSTALL_COMPRESSED)
.for _curformat in ${FORMATS}
_cf=${_curformat}
.for _curcomp in ${INSTALL_COMPRESSED}
.if ${_cf} != "html-split"
_curinst+= install-${_curformat}.${_curcomp}
_docs+= ${DOC}.${_curformat}.${_curcomp}
CLEANFILES+= ${DOC}.${_curformat}.${_curcomp}
.endif
.endfor
.endfor
.endif
.MAIN: all
all: ${_docs}
index.html HTML.manifest: ${SRCS}
${JADE} -V html-manifest -ioutput.html ${JADEOPTS} -d ${DSLHTML} -t sgml ${MASTERDOC}
-tidy -i -m -f /dev/null ${TIDYFLAGS} *.html
${DOC}.html: ${SRCS}
${JADE} -ioutput.html -V nochunks ${JADEOPTS} -d ${DSLHTML} -t sgml ${MASTERDOC} > ${.TARGET}
-tidy -i -m -f /dev/null ${TIDYFLAGS} ${.TARGET}
${DOC}.html-split.tar: HTML.manifest
tar cf ${.TARGET} `xargs < HTML.manifest`
${DOC}.txt: ${DOC}.html
lynx -nolist -dump ${.ALLSRC} > ${.TARGET}
${DOC}.rtf: ${SRCS}
${JADE} -Vrtf-backend -ioutput.print ${JADEOPTS} -d ${DSLPRINT} -t rtf -o ${.TARGET} ${MASTERDOC}
${DOC}.doc: ${SRCS}
${JADE} -ioutput.print ${JADEOPTS} -d ${DSLPRINT} -t doc -o ${.TARGET} ${MASTERDOC}
${DOC}.tex: ${SRCS}
${JADE} -Vtex-backend -ioutput.print ${JADEOPTS} -d ${DSLPRINT} -t tex -o ${.TARGET} ${MASTERDOC}
${DOC}.dvi: ${DOC}.tex
@echo "==> TeX pass 1/3"
-tex "&jadetex" ${.ALLSRC}
@echo "==> TeX pass 2/3"
-tex "&jadetex" ${.ALLSRC}
@echo "==> TeX pass 3/3"
-tex "&jadetex" ${.ALLSRC}
${DOC}.pdf: ${DOC}.tex
@echo "==> PDFTeX pass 1/3"
-pdftex "&pdfjadetex" ${.ALLSRC}
@echo "==> PDFTeX pass 2/3"
-pdftex "&pdfjadetex" ${.ALLSRC}
@echo "==> PDFTeX pass 3/3"
pdftex "&pdfjadetex" ${.ALLSRC}
${DOC}.ps: ${DOC}.dvi
dvips -o ${.TARGET} ${.ALLSRC}
${DOC}.tar: ${SRCS}
tar cf ${.TARGET} ${.ALLSRC}
# ------------------------------------------------------------------------
#
# Validation targets
#
#
# Lets you quickly check that the document conforms to the DTD without
# having to convert it to any other formats
#
lint validate:
nsgmls -s -c ${FREEBSDCATALOG} -c ${DOCBOOKCATALOG} ${EXTRA_CATALOGS:S/^/-c /g} ${DOC}.sgml
# ------------------------------------------------------------------------
#
# Compress targets
#
#
# The list of compression extensions this Makefile knows about. If you
# add new compression schemes, add to this list (which is a list of
# extensions, hence bz2, *not* bzip2) and extend the _PROG_COMPRESS_*
# targets.
#
KNOWN_COMPRESS= gz bz2 zip
#
# You can't build suffix rules to do compression, since you can't
# wildcard the source suffix. So these are defined .USE, to be tacked on
# as dependencies of the compress-* targets.
#
_PROG_COMPRESS_gz: .USE
gzip -9 -c ${.ALLSRC} > ${.TARGET}
_PROG_COMPRESS_bz2: .USE
bzip2 -9 -c ${.ALLSRC} > ${.TARGET}
_PROG_COMPRESS_zip: .USE
zip -j -9 ${.TARGET} ${.ALLSRC}
#
# Build a list of targets for each compression scheme and output format.
# Don't compress the html-split output format.
#
.for _curformat in ${KNOWN_FORMATS}
_cf=${_curformat}
.for _curcompress in ${KNOWN_COMPRESS}
.if ${_cf} == "html-split"
${DOC}.${_cf}.tar.${_curcompress}: ${DOC}.${_cf}.tar _PROG_COMPRESS_${_curcompress}
.else
${DOC}.${_cf}.${_curcompress}: ${DOC}.${_cf} _PROG_COMPRESS_${_curcompress}
.endif
.endfor
.endfor
# ------------------------------------------------------------------------
#
# Install targets
#
# Build install-* targets, one per allowed value in FORMATS. Need to
# build
# two specific targets;
#
# install-html-split - Handles multiple .html files being generated
# from one source. Uses the HTML.manifest file
# created by the stylesheets, which should list
# each .html file that's been created.
#
# install-* - Every other format. The wildcard expands to
# the other allowed formats, all of which should
# generate just one file.
#
# "beforeinstall" and "afterinstall" are hooks in to this process.
# Redefine them to do things before and after the files are installed,
# respectively.
#
# Build a list of install-format targets to be installed. These will be
# dependencies for the "realinstall" target.
#
.if !defined(INSTALL_ONLY_COMPRESSED) || empty(INSTALL_ONLY_COMPRESSED)
_curinst+= ${FORMATS:S/^/install-/g}
.endif
realinstall: ${_curinst}
.for _curformat in ${KNOWN_FORMATS}
_cf=${_curformat}
.if !target(install-${_cf})
.if ${_cf} == "html-split"
install-${_cf}: index.html
@[ -d ${DESTDIR} ] || mkdir -p ${DESTDIR}
${INSTALL_DOCS} `xargs < HTML.manifest` ${DESTDIR}
@if [ -f ${.OBJDIR}/${DOC}.ln ]; then \
(cd ${DESTDIR}; sh ${.OBJDIR}/${DOC}.ln); \
fi
.for _compressext in ${KNOWN_COMPRESS}
install-${_cf}.tar.${_compressext}: ${DOC}.${_cf}.tar.${_compressext}
@[ -d ${DESTDIR} ] || mkdir -p ${DESTDIR}
${INSTALL_DOCS} ${.ALLSRC} ${DESTDIR}
.endfor
.else
install-${_cf}: ${DOC}.${_cf}
@[ -d ${DESTDIR} ] || mkdir -p ${DESTDIR}
${INSTALL_DOCS} ${.ALLSRC} ${DESTDIR}
.for _compressext in ${KNOWN_COMPRESS}
install-${_cf}.${_compressext}: ${DOC}.${_cf}.${_compressext}
@[ -d ${DESTDIR} ] || mkdir -p ${DESTDIR}
${INSTALL_DOCS} ${.ALLSRC} ${DESTDIR}
.endfor
.endif
.endif
.endfor
# ------------------------------------------------------------------------
#
# Package building
#
#
# realpackage is what is called in each subdirectory when a package
# target is called, or, rather, package calls realpackage in each
# subdirectory as it goes.
#
# packagelist returns the list of targets that would be called during
# package building.
#
realpackage: ${FORMATS:S/^/package-/}
packagelist:
@echo ${FORMATS:S/^/package-/}
#
# Build a list of package targets for each output target. Each package
# target depends on the corresponding install target running.
#
.for _curformat in ${KNOWN_FORMATS}
_cf=${_curformat}
package-${_curformat}: install-${_curformat}
.if ${_cf} == "html-split"
@cp HTML.manifest PLIST
.else
@echo ${DOC}.${_curformat} > PLIST
.endif
@pkg_create -v -c -"FDP ${.CURDIR:T} ${_curformat} package" \
-d -"FDP ${.CURDIR:T} ${_curformat} package" -f PLIST \
-p ${DESTDIR} ${PACKAGES}/${.CURDIR:T}.${LANGCODE}.${_curformat}.tgz
.endfor

108
share/mk/doc.install.mk Normal file
View file

@ -0,0 +1,108 @@
#
# $Id: doc.install.mk,v 1.1 1999-09-03 17:07:18 nik Exp $
#
#
# This include file <doc.install.mk> provides variables defining the default
# ownership, location, and installation method of files generated by the
# FreeBSD Documentation Project
#
# Since users often build and install documentation without root,
# default the document ownership to them, if they're not root.
#
# ------------------------------------------------------------------------
#
# Document-specific variables:
#
# NONE
#
# ------------------------------------------------------------------------
#
# User-modifiable variables:
#
# INSTALL_DOCS The command to use to install the documentation.
# Defaults to "install -o user -g group -m 444",
# roughly.
#
# Should honour DOCOWN, DOCGRP and DOCMODE.
#
# Should accept a list of files to install
# followed by the directory to install into.
#
# INSTALL_FLAGS Flags to pass to the default INSTALL_DOCS'
# install command. Useful options are [CdDp].
# See install(1) for more information.
#
# DOCDIR Where to install the documentation. Default is
# /usr/share/doc.
#
# DOCOWN Owner of the documents when installed. Forced
# to the user installing the documentation, if the
# user is not root. (for obvious reasons)
#
# DOCGRP Group of the documents when installed. Forced
# to the primary group of the documentation, if
# the user is not root. This action can be
# overriden by setting:
#
# DOCGRP_OVERRIDE Override the use of primary group when the user
# installing is not root. Sets GOCGRP to this
# instead.
#
# DOCMODE Mode of the documents when installed. Defaults
# to 444. See chmod(1).
#
# DOCDIR Installation directory. Defaults to
# /usr/share/doc
#
# PACKAGES Directory in which to put packages. Defaults to
# the packages directory under DOC_PREFIX, if it
# exists, else the current directory.
#
# ------------------------------------------------------------------------
#
# Make files included (if NOINCLUDEMK is not set):
#
# bsd.own.mk Default permissions and locations for install.
#
# Include system defaults, unless prevented.
.if !defined(NOINCLUDEMK)
.include <bsd.own.mk>
.endif
DOCOWN?= root
DOCGRP?= wheel
DOCMODE?= 0444
DOCDIR?= /usr/share/doc
.if exists(${DOC_PREFIX}/packages)
PACKAGES?= ${DOC_PREFIX}/packages
.else
PACKAGES?= ${.CURDIR}
.endif
# hack to set DOCOWN and DOCGRP to those of the user installing, if that
# user is not root.
USERID!= id -u
USERNAME!= id -un
GROUPNAME!= id -gn
.if ${USERID} != 0
DOCOWN:= ${USERNAME}
.if defined(DOCGRP_OVERRIDE)
DOCGRP:= ${DOCGRP_OVERRIDE}
.else
DOCGRP:= ${GROUPNAME}
.endif
.endif
# installation "script"
INSTALL_DOCS?= \
${INSTALL} -c ${INSTALL_FLAGS} -o ${DOCOWN} -g ${DOCGRP} -m ${DOCMODE}

74
share/mk/doc.project.mk Normal file
View file

@ -0,0 +1,74 @@
#
# $Id: doc.project.mk,v 1.1 1999-09-03 17:07:18 nik Exp $
#
# This include file <doc.project.mk> is the FreeBSD Documentation Project
# co-ordination make file.
#
# This file includes the other makefiles, which contain enough
# knowledge to perform their duties without the system make files.
#
# ------------------------------------------------------------------------
#
# Document-specific variables:
#
# DOC This _must_ be set if there is a document to
# build. It should be without prefix.
#
# DOCFORMAT Format of the document. Defaults to docbook.
# docbook is also the only option currently.
#
# MAINTAINER This denotes who is responsible for maintaining
# this section of the project. If unset, set to
# doc@FreeBSD.org
#
# ------------------------------------------------------------------------
#
# User-modifiable variables:
#
# PREFIX Standard path to document-building applications
# installed to serve the documentation build
# process, usually by installing the docproj port
# or package. Default is /usr/local
#
# NOINCLUDEMK Whether to include the standard BSD make files,
# or just to emulate them poorly. Set this if you
# aren't on FreeBSD, or a compatible sibling. By
# default is not set.
#
# ------------------------------------------------------------------------
#
# Make files included:
#
# doc.install.mk Installation specific information, including
# ownership and permissions.
#
# doc.subdir.mk Subdirectory related configuration, including
# handling "obj" builds.
#
# DOCFORMAT-specific make files, like:
#
# doc.docbook.mk Building and installing docbook documentation.
# Currently the only method.
#
# Document-specific defaults
DOCFORMAT?= docbook
MAINTAINER?= doc@FreeBSD.org
# User-modifiable
PREFIX?= /usr/local
PRI_LANG?= en_US.ISO_8859-1
# Format-specific configuration
.if defined(DOC)
.if ${DOCFORMAT} == "docbook"
.include "doc.docbook.mk"
.endif
.endif
# Subdirectory glue and ownership information.
.include "doc.subdir.mk"
.include "doc.install.mk"

195
share/mk/doc.subdir.mk Normal file
View file

@ -0,0 +1,195 @@
# Taken from:
# Id: bsd.subdir.mk,v 1.27 1999/03/21 06:43:40 bde
#
# $Id: doc.subdir.mk,v 1.1 1999-09-03 17:07:19 nik Exp $
#
# This include file <doc.subdir.mk> contains the default targets
# for building subdirectories in the FreeBSD Documentation Project.
#
# For all of the directories listed in the variable SUBDIR, the
# specified directory will be visited and the target made. There is
# also a default target which allows the command "make subdir" where
# subdir is any directory listed in the variable SUBDIR.
#
# ------------------------------------------------------------------------
#
# Document-specific variables:
#
# SUBDIR A list of subdirectories that should be
# built as well. Each of the targets will
# execute the same target in the
# subdirectories.
#
# COMPAT_SYMLINK Create a symlink named in this variable
# to this directory, when installed.
#
# ROOT_SYMLINKS Create symlinks to the named directories
# in the document root, if the current
# language is the primary language (the
# PRI_LANG variable).
#
# ------------------------------------------------------------------------
#
# Provided targets:
#
# install:
# package:
# Go down subdirectories and call these targets
# along the way, and then call the real target
# here.
#
# clean:
# Remove files created by the build process.
#
# cleandir:
# Remove the object directory, if any.
#
.if exists(${.CURDIR}/../Makefile.inc)
.include "${.CURDIR}/../Makefile.inc"
.endif
# ------------------------------------------------------------------------
#
# Work out the language and encoding used for this document.
#
# Liberal default of maximum of 5 directories below to find it.
#
.if !defined(LANGCODE)
LANGCODE:= ${.CURDIR}
.for _ in 1 2 3 4 5
.if !(${LANGCODE:H:T} == "doc")
LANGCODE:= ${LANGCODE:H}
.endif
.endfor
LANGCODE:= ${LANGCODE:T}
.endif
.if !target(install)
install: afterinstall symlinks
afterinstall: realinstall
realinstall: beforeinstall _SUBDIRUSE
.endif
package: realpackage symlinks
realpackage: _SUBDIRUSE
.if !defined(IGNORE_COMPAT_SYMLINK) && defined(COMPAT_SYMLINK)
SYMLINKS+= ${DOCDIR} ${.CURDIR:T:ja_JP.eucJP=ja} ${COMPAT_SYMLINK:ja=ja_JP.eucJP}
.endif
.if defined(PRI_LANG) && defined(ROOT_SYMLINKS) && !empty(ROOT_SYMLINKS)
.if ${PRI_LANG} == ${LANGCODE}
.for _tmp in ${ROOT_SYMLINKS}
SYMLINKS+= ${DOCDIR} ${LANGCODE:ja_JP.eucJP=ja}/${.CURDIR:T}/${_tmp} ${_tmp}
.endfor
.endif
.endif
.if !target(symlinks)
symlinks:
.if defined(SYMLINKS) && !empty(SYMLINKS)
@set `echo ${SYMLINKS}`; \
while : ; do \
case $$# in \
0) break;; \
[12]) echo "warn: empty SYMLINKS: $$1 $$2"; break;; \
esac; \
d=$$1; shift; \
l=$$1; shift; \
t=$$1; shift; \
if [ ! -e $${d}/$${l} ]; then \
${ECHO} "$${d}/$${l} doesn't exist, not linking"; \
else \
${ECHO} $${d}/$${t} -\> $${d}/$${l}; \
(cd $${d} && rm -f $${t}); \
(cd $${d} && ln -s $${l} $${t}); \
fi; \
done
.endif
.endif
.for __target in beforeinstall afterinstall realinstall realpackage
.if !target(${__target})
${__target}:
.endif
.endfor
_SUBDIRUSE: .USE
.for entry in ${SUBDIR}
@${ECHO} "===> ${DIRPRFX}${entry}"
@(cd ${.CURDIR}/${entry} && \
${MAKE} ${.TARGET:S/realpackage/package/:S/realinstall/install/} DIRPRFX=${DIRPRFX}${entry}/ )
.endfor
.if !defined(NOINCLUDEMK)
.include <bsd.obj.mk>
.include <bsd.subdir.mk>
.else
.MAIN: all
${SUBDIR}::
cd ${.CURDIR}/${.TARGET}
${MAKE} all
.for __target in all cleandir lint objlink install
.if !target(${__target})
${__target}: _SUBDIRUSE
.endif
.endfor
.if !target(obj)
obj: _SUBDIRUSE
@if ! test -d ${CANONICALOBJDIR}/; then \
mkdir -p ${CANONICALOBJDIR}; \
if ! test -d ${CANONICALOBJDIR}/; then \
${ECHO} "Unable to create ${CANONICALOBJDIR}."; \
exit 1; \
fi; \
${ECHO} "${CANONICALOBJDIR} created ${.CURDIR}"; \
fi
.endif
.if !target(objlink)
objlink: _SUBDIRUSE
@if test -d ${CANONICALOBJDIR}/; then \
rm -f ${.CURDIR}/obj; \
ln -s ${CANONICALOBJDIR} ${.CURDIR}/obj; \
else \
echo "No ${CANONICALOBJDIR} to link to - do a make obj."; \
fi
.endif
.if !target(whereobj)
whereobj:
@echo ${.OBJDIR}
.endif
cleanobj:
@if [ -d ${CANONICALOBJDIR}/ ]; then \
rm -rf ${CANONICALOBJDIR}; \
else \
cd ${.CURDIR} && ${MAKE} clean cleandepend; \
fi
@if [ -h ${.CURDIR}/obj ]; then rm -f ${.CURDIR}/obj; fi
.if !target(clean)
clean: _SUBDIRUSE
.if defined(CLEANFILES) && !empty(CLEANFILES)
rm -f ${CLEANFILES}
.endif
.if defined(CLEANDIRS) && !empty(CLEANDIRS)
rm -rf ${CLEANDIRS}
.endif
.endif
cleandir: cleanobj _SUBDIRUSE
.endif # end of NOINCLUDEMK section