Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 31 Aug 1999 17:02:14 +0200
From:      Neil Blakey-Milner <nbm@mithrandr.moria.org>
To:        FreeBSD Documentation Project <doc@FreeBSD.org>
Subject:   The next exciting installment of docproj.docbook.mk splitting.
Message-ID:  <19990831170213.A97218@mithrandr.moria.org>

next in thread | raw e-mail | index | archive | help

--PEIAKu/WMn1b1Hv9
Content-Type: text/plain; charset=us-ascii

Hi,

I've received a few hints, and here is my new offering.

Stuff added:

- Automatic after-install COMPAT_SYMLINK handling

- ROOT_SYMLINKS pointing to important documents leads to symlink from
  DOCDIR to that document (ie, doc/faq to doc/en_US.ISO_8859-1/books/faq),
  if we're building the primary language (PRI_LANG) version.

- packaging!

- package now traverses the tree, creating packages as it goes.  Default
  package location is DOC_PREFIX/packages if it exists, or the current
  directory if not

- last few obj breakages fixed

- removed unneeded targets and variables

- the return of install as installer (contreversial! *grin*)

- and much much more, but if you call in the next 20 minutes, you'll...

I've done quite serious testing, with NOINCLUDEMK set and unset, using
obj and non-obj, and on all the languages.  All this requires a pretty
large patch (mostly fixing obj-related stuff), which is also included.

Please note I've been pretty inconsistent, so sometimes I put
doc.project.mk, and others docproj.docbook.mk - just replace
docproj.docbook.mk with:

.include "doc.project.mk"

whilst testing.

Good luck (:

Neil
-- 
Neil Blakey-Milner
nbm@rucus.ru.ac.za

--PEIAKu/WMn1b1Hv9
Content-Type: text/plain; charset=us-ascii
Content-Description: doc.docbook.mk
Content-Disposition: attachment; filename="doc.docbook.mk"

#
# $Id$
#
# 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

--PEIAKu/WMn1b1Hv9
Content-Type: text/plain; charset=us-ascii
Content-Description: doc.install.mk
Content-Disposition: attachment; filename="doc.install.mk"

#
# $Id$
#
#
# 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}



--PEIAKu/WMn1b1Hv9
Content-Type: text/plain; charset=us-ascii
Content-Description: doc.project.mk
Content-Disposition: attachment; filename="doc.project.mk"

#
# $Id$
#
# 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"

--PEIAKu/WMn1b1Hv9
Content-Type: text/plain; charset=us-ascii
Content-Description: doc.subdir.mk
Content-Disposition: attachment; filename="doc.subdir.mk"

# Taken from:
#	Id: bsd.subdir.mk,v 1.27 1999/03/21 06:43:40 bde
#
# $Id$
#
# 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.
#

# ------------------------------------------------------------------------
#
# 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

--PEIAKu/WMn1b1Hv9
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=doc-patchset

Index: Makefile
===================================================================
RCS file: /home/nbm/ncvs/doc/Makefile,v
retrieving revision 1.13
diff -u -r1.13 Makefile
--- Makefile	1999/08/26 19:40:04	1.13
+++ Makefile	1999/08/29 14:22:35
@@ -14,4 +14,5 @@
 SUBDIR+=	zh_TW.Big5
 .endif
 
-.include <bsd.subdir.mk>
+DOC_PREFIX?=	${.CURDIR}
+.include "${DOC_PREFIX}/share/mk/docproj.docbook.mk"
Index: en_US.ISO_8859-1/Makefile
===================================================================
RCS file: /home/nbm/ncvs/doc/en_US.ISO_8859-1/Makefile,v
retrieving revision 1.5
diff -u -r1.5 Makefile
--- Makefile	1999/08/29 00:02:11	1.5
+++ Makefile	1999/08/31 10:02:31
@@ -5,18 +5,5 @@
 
 COMPAT_SYMLINK = en
 
-#
-# Put the compatability symlink in place.
-#
-afterinstall:
-.if !defined(IGNORE_COMPAT_SYMLINK)
-	if [ ! -e ${DOCDIR}/${COMPAT_SYMLINK} ]; then			\
-		rm -rf ${DOCDIR}/${COMPAT_SYMLINK};			\
-		(cd ${DOCDIR} && ln -s en_US.ISO_8859-1 ${COMPAT_SYMLINK}); \
-	fi
-.endif
-
-.include <bsd.subdir.mk>
-
-DOC_PREFIX?= ..
+DOC_PREFIX?= ${.CURDIR}/..
 .include "${DOC_PREFIX}/share/mk/docproj.docbook.mk"
Index: en_US.ISO_8859-1/articles/Makefile
===================================================================
RCS file: /home/nbm/ncvs/doc/en_US.ISO_8859-1/articles/Makefile,v
retrieving revision 1.2
diff -u -r1.2 Makefile
--- Makefile	1999/08/17 21:35:52	1.2
+++ Makefile	1999/08/30 13:02:56
@@ -8,4 +8,7 @@
 SUBDIR+= new-users
 SUBDIR+= programming-tools
 
-.include <bsd.subdir.mk>
+ROOT_SYMLINKS+=	new-users
+
+DOC_PREFIX?= ${.CURDIR}/../..
+.include "${DOC_PREFIX}/share/mk/doc.project.mk"
Index: en_US.ISO_8859-1/articles/diskless-x/Makefile
===================================================================
RCS file: /home/nbm/ncvs/doc/en_US.ISO_8859-1/articles/diskless-x/Makefile,v
retrieving revision 1.3
diff -u -r1.3 Makefile
--- Makefile	1999/08/29 00:02:16	1.3
+++ Makefile	1999/08/29 18:53:03
@@ -9,6 +9,6 @@
 
 SRCS= article.sgml
 
-DOC_PREFIX?= ../../..
+DOC_PREFIX?= ${.CURDIR}/../../..
 
 .include "${DOC_PREFIX}/share/mk/docproj.docbook.mk"
Index: en_US.ISO_8859-1/articles/fonts/Makefile
===================================================================
RCS file: /home/nbm/ncvs/doc/en_US.ISO_8859-1/articles/fonts/Makefile,v
retrieving revision 1.6
diff -u -r1.6 Makefile
--- Makefile	1999/08/29 00:02:17	1.6
+++ Makefile	1999/08/29 18:53:04
@@ -9,6 +9,6 @@
 
 SRCS= article.sgml
 
-DOC_PREFIX?= ../../..
+DOC_PREFIX?= ${.CURDIR}/../../..
 
 .include "${DOC_PREFIX}/share/mk/docproj.docbook.mk"
Index: en_US.ISO_8859-1/articles/formatting-media/Makefile
===================================================================
RCS file: /home/nbm/ncvs/doc/en_US.ISO_8859-1/articles/formatting-media/Makefile,v
retrieving revision 1.3
diff -u -r1.3 Makefile
--- Makefile	1999/08/29 00:02:17	1.3
+++ Makefile	1999/08/29 18:53:04
@@ -9,6 +9,6 @@
 
 SRCS= article.sgml
 
-DOC_PREFIX?= ../../..
+DOC_PREFIX?= ${.CURDIR}/../../..
 
 .include "${DOC_PREFIX}/share/mk/docproj.docbook.mk"
Index: en_US.ISO_8859-1/articles/mh/Makefile
===================================================================
RCS file: /home/nbm/ncvs/doc/en_US.ISO_8859-1/articles/mh/Makefile,v
retrieving revision 1.6
diff -u -r1.6 Makefile
--- Makefile	1999/08/29 00:02:18	1.6
+++ Makefile	1999/08/29 18:53:05
@@ -9,6 +9,6 @@
 
 SRCS= article.sgml
 
-DOC_PREFIX?= ../../..
+DOC_PREFIX?= ${.CURDIR}/../../..
 
 .include "${DOC_PREFIX}/share/mk/docproj.docbook.mk"
Index: en_US.ISO_8859-1/articles/multi-os/Makefile
===================================================================
RCS file: /home/nbm/ncvs/doc/en_US.ISO_8859-1/articles/multi-os/Makefile,v
retrieving revision 1.6
diff -u -r1.6 Makefile
--- Makefile	1999/08/29 00:02:19	1.6
+++ Makefile	1999/08/29 18:53:05
@@ -9,6 +9,6 @@
 
 SRCS= article.sgml
 
-DOC_PREFIX?= ../../..
+DOC_PREFIX?= ${.CURDIR}/../../..
 
 .include "${DOC_PREFIX}/share/mk/docproj.docbook.mk"
Index: en_US.ISO_8859-1/articles/new-users/Makefile
===================================================================
RCS file: /home/nbm/ncvs/doc/en_US.ISO_8859-1/articles/new-users/Makefile,v
retrieving revision 1.5
diff -u -r1.5 Makefile
--- Makefile	1999/08/29 00:02:20	1.5
+++ Makefile	1999/08/29 18:53:05
@@ -9,6 +9,6 @@
 
 SRCS= article.sgml
 
-DOC_PREFIX?= ../../..
+DOC_PREFIX?= ${.CURDIR}/../../..
 
 .include "${DOC_PREFIX}/share/mk/docproj.docbook.mk"
Index: en_US.ISO_8859-1/articles/programming-tools/Makefile
===================================================================
RCS file: /home/nbm/ncvs/doc/en_US.ISO_8859-1/articles/programming-tools/Makefile,v
retrieving revision 1.6
diff -u -r1.6 Makefile
--- Makefile	1999/08/29 00:02:21	1.6
+++ Makefile	1999/08/29 18:53:06
@@ -9,6 +9,6 @@
 
 SRCS= article.sgml
 
-DOC_PREFIX?= ../../..
+DOC_PREFIX?= ${.CURDIR}/../../..
 
 .include "${DOC_PREFIX}/share/mk/docproj.docbook.mk"
Index: en_US.ISO_8859-1/books/Makefile
===================================================================
RCS file: /home/nbm/ncvs/doc/en_US.ISO_8859-1/books/Makefile,v
retrieving revision 1.3
diff -u -r1.3 Makefile
--- Makefile	1999/08/17 22:11:19	1.3
+++ Makefile	1999/08/29 14:36:50
@@ -4,4 +4,7 @@
 SUBDIR+= fdp-primer
 SUBDIR+= handbook
 
-.include <bsd.subdir.mk>
+ROOT_SYMLINKS=	handbook faq
+
+DOC_PREFIX?=	../..
+.include "${DOC_PREFIX}/share/mk/doc.project.mk"
Index: en_US.ISO_8859-1/books/faq/Makefile
===================================================================
RCS file: /home/nbm/ncvs/doc/en_US.ISO_8859-1/books/faq/Makefile,v
retrieving revision 1.3
diff -u -r1.3 Makefile
--- Makefile	1999/08/29 00:02:21	1.3
+++ Makefile	1999/08/29 18:54:32
@@ -21,6 +21,6 @@
 # SGML content
 SRCS=  book.sgml 
 
-DOC_PREFIX?= ../../..
+DOC_PREFIX?= ${.CURDIR}/../../..
 
 .include "$(DOC_PREFIX)/share/mk/docproj.docbook.mk"
Index: en_US.ISO_8859-1/books/fdp-primer/Makefile
===================================================================
RCS file: /home/nbm/ncvs/doc/en_US.ISO_8859-1/books/fdp-primer/Makefile,v
retrieving revision 1.5
diff -u -r1.5 Makefile
--- Makefile	1999/08/29 00:02:22	1.5
+++ Makefile	1999/08/29 18:53:06
@@ -36,6 +36,6 @@
 # Entities
 SRCS+= chapters.ent 
 
-DOC_PREFIX?= ../../..
+DOC_PREFIX?= ${.CURDIR}/../../..
 
 .include "${DOC_PREFIX}/share/mk/docproj.docbook.mk"
Index: en_US.ISO_8859-1/books/handbook/Makefile
===================================================================
RCS file: /home/nbm/ncvs/doc/en_US.ISO_8859-1/books/handbook/Makefile,v
retrieving revision 1.24
diff -u -r1.24 Makefile
--- Makefile	1999/08/29 00:02:23	1.24
+++ Makefile	1999/08/29 18:54:54
@@ -55,5 +55,5 @@
 SRCS+= chapters.ent 
 SRCS+= mailing-lists.ent
 
-DOC_PREFIX?= ../../..
+DOC_PREFIX?= ${.CURDIR}/../../..
 .include "${DOC_PREFIX}/share/mk/docproj.docbook.mk"
Index: es_ES.ISO_8859-1/Makefile
===================================================================
RCS file: /home/nbm/ncvs/doc/es_ES.ISO_8859-1/Makefile,v
retrieving revision 1.5
diff -u -r1.5 Makefile
--- Makefile	1999/08/26 19:42:11	1.5
+++ Makefile	1999/08/31 10:05:39
@@ -4,18 +4,5 @@
 
 COMPAT_SYMLINK = es
 
-#
-# Put the compatability symlink in place.
-#
-afterinstall:
-.if !defined(IGNORE_COMPAT_SYMLINK)
-	if [ ! -e ${DOCDIR}/${COMPAT_SYMLINK} ]; then			\
-		rm -rf ${DOCDIR}/${COMPAT_SYMLINK};			\
-		(cd ${DOCDIR} && ln -s es_ES.ISO_8859-1 ${COMPAT_SYMLINK}); \
-	fi
-.endif
-
-.include <bsd.subdir.mk>
-
-DOC_PREFIX = ..
-.include "../share/mk/docproj.docbook.mk"
+DOC_PREFIX = ${.CURDIR}/..
+.include "${DOC_PREFIX}/share/mk/docproj.docbook.mk"
Index: es_ES.ISO_8859-1/books/Makefile
===================================================================
RCS file: /home/nbm/ncvs/doc/es_ES.ISO_8859-1/books/Makefile,v
retrieving revision 1.1
diff -u -r1.1 Makefile
--- Makefile	1999/08/19 00:07:57	1.1
+++ Makefile	1999/08/30 15:50:37
@@ -2,4 +2,7 @@
 
 SUBDIR = faq
 
-.include <bsd.subdir.mk>
+ROOT_SYMLINKS= faq
+
+DOC_PREFIX?= ${.CURDIR}/../..
+.include "${DOC_PREFIX}/share/mk/doc.project.mk"
Index: es_ES.ISO_8859-1/books/faq/Makefile
===================================================================
RCS file: /home/nbm/ncvs/doc/es_ES.ISO_8859-1/books/faq/Makefile,v
retrieving revision 1.1
diff -u -r1.1 Makefile
--- Makefile	1999/08/18 13:04:30	1.1
+++ Makefile	1999/08/31 10:49:04
@@ -21,6 +21,5 @@
 # SGML content
 SRCS=  book.sgml 
 
-DOC_PREFIX?= ../../..
-
-.include "../../../share/mk/docproj.docbook.mk"
+DOC_PREFIX?= ${.CURDIR}/../../..
+.include "${DOC_PREFIX}/share/mk/docproj.docbook.mk"
Index: ja_JP.eucJP/Makefile
===================================================================
RCS file: /home/nbm/ncvs/doc/ja_JP.eucJP/Makefile,v
retrieving revision 1.9
diff -u -r1.9 Makefile
--- Makefile	1999/08/28 10:15:02	1.9
+++ Makefile	1999/08/31 12:06:00
@@ -3,20 +3,8 @@
 SUBDIR = books
 SUBDIR+= man
 
-COMPAT_SYMLINK = ja_JP.eucJP
+# This is turned the correct way around in doc.subdir.mk
+COMPAT_SYMLINK= ja_JP.eucJP
 
-#
-# Put the compatability symlink in place.
-#
-afterinstall:
-.if !defined(IGNORE_COMPAT_SYMLINK)
-	if [ ! -e ${DOCDIR}/${COMPAT_SYMLINK} ]; then			\
-		rm -rf ${DOCDIR}/${COMPAT_SYMLINK};			\
-		(cd ${DOCDIR} && ln -s ja ${COMPAT_SYMLINK});		\
-	fi
-.endif
-
-.include <bsd.subdir.mk>
-
-DOC_PREFIX = ..
-.include "../share/mk/docproj.docbook.mk"
+DOC_PREFIX= ${.CURDIR}/..
+.include "${DOC_PREFIX}/share/mk/docproj.docbook.mk"
Index: ja_JP.eucJP/books/Makefile
===================================================================
RCS file: /home/nbm/ncvs/doc/ja_JP.eucJP/books/Makefile,v
retrieving revision 1.3
diff -u -r1.3 Makefile
--- Makefile	1999/08/19 20:37:05	1.3
+++ Makefile	1999/08/31 11:57:37
@@ -3,4 +3,7 @@
 SUBDIR = faq
 SUBDIR+= handbook
 
-.include <bsd.subdir.mk>
+ROOT_SYMLINKS= faq handbook
+
+DOC_PREFIX?= ${.CURDIR}/../..
+.include "${DOC_PREFIX}/share/mk/doc.project.mk"
Index: ja_JP.eucJP/books/faq/Makefile
===================================================================
RCS file: /home/nbm/ncvs/doc/ja_JP.eucJP/books/faq/Makefile,v
retrieving revision 1.4
diff -u -r1.4 Makefile
--- Makefile	1999/08/28 09:48:29	1.4
+++ Makefile	1999/08/31 11:07:19
@@ -21,6 +21,5 @@
 # SGML content
 SRCS=  book.sgml 
 
-DOC_PREFIX?= ../../..
-
-.include "../../../share/mk/docproj.docbook.mk"
+DOC_PREFIX?= ${.CURDIR}/../../..
+.include "${DOC_PREFIX}/share/mk/docproj.docbook.mk"
Index: ja_JP.eucJP/books/handbook/Makefile
===================================================================
RCS file: /home/nbm/ncvs/doc/ja_JP.eucJP/books/handbook/Makefile,v
retrieving revision 1.37
diff -u -r1.37 Makefile
--- Makefile	1999/08/28 09:48:28	1.37
+++ Makefile	1999/08/31 11:07:38
@@ -61,5 +61,5 @@
 SRCS+=	jcontrib/chapter.sgml
 SRCS+=	jauthors.ent
 
-DOC_PREFIX?= ../../..
-.include "../../../share/mk/docproj.docbook.mk"
+DOC_PREFIX?= ${.CURDIR}/../../..
+.include "${DOC_PREFIX}/share/mk/docproj.docbook.mk"
Index: ja_JP.eucJP/man/Makefile
===================================================================
RCS file: /home/nbm/ncvs/doc/ja_JP.eucJP/man/Makefile,v
retrieving revision 1.3
diff -u -r1.3 Makefile
--- Makefile	1999/01/25 15:27:24	1.3
+++ Makefile	1999/08/31 14:31:50
@@ -4,5 +4,7 @@
 makedb:
 	LANG=ja_JP.EUC jmakewhatis ${DESTDIR}${BINDIR}/man/ja/
 
+package:
+
 .include <bsd.subdir.mk>
 
Index: ru_RU.KOI8-R/Makefile
===================================================================
RCS file: /home/nbm/ncvs/doc/ru_RU.KOI8-R/Makefile,v
retrieving revision 1.5
diff -u -r1.5 Makefile
--- Makefile	1999/08/29 16:52:23	1.5
+++ Makefile	1999/08/31 10:07:24
@@ -4,18 +4,5 @@
 
 COMPAT_SYMLINK = ru
 
-#
-# Put the compatability symlink in place.
-#
-afterinstall:
-.if !defined(IGNORE_COMPAT_SYMLINK)
-	if [ ! -e ${DOCDIR}/${COMPAT_SYMLINK} ]; then			\
-		rm -rf ${DOCDIR}/${COMPAT_SYMLINK};			\
-		(cd ${DOCDIR} && ln -s ru_RU.KOI8-R ${COMPAT_SYMLINK});	\
-	fi
-.endif
-
-.include <bsd.subdir.mk>
-
-DOC_PREFIX = ..
+DOC_PREFIX = ${.CURDIR}/..
 .include "${DOC_PREFIX}/share/mk/docproj.docbook.mk"
Index: ru_RU.KOI8-R/books/Makefile
===================================================================
RCS file: /home/nbm/ncvs/doc/ru_RU.KOI8-R/books/Makefile,v
retrieving revision 1.1
diff -u -r1.1 Makefile
--- Makefile	1999/08/29 16:51:57	1.1
+++ Makefile	1999/08/31 10:08:07
@@ -2,4 +2,7 @@
 
 SUBDIR = faq
 
-.include <bsd.subdir.mk>
+ROOT_SYMLINKS= faq
+
+DOC_PREFIX= ${.CURDIR}/../..
+.include "${DOC_PREFIX}/share/mk/doc.project.mk"
Index: ru_RU.KOI8-R/books/faq/Makefile
===================================================================
RCS file: /home/nbm/ncvs/doc/ru_RU.KOI8-R/books/faq/Makefile,v
retrieving revision 1.1
diff -u -r1.1 Makefile
--- Makefile	1999/08/29 16:51:17	1.1
+++ Makefile	1999/08/31 10:08:55
@@ -21,6 +21,5 @@
 # SGML content
 SRCS=  book.sgml 
 
-DOC_PREFIX?= ../../..
-
+DOC_PREFIX?= ${.CURDIR}/../../..
 .include "${DOC_PREFIX}/share/mk/docproj.docbook.mk"
Index: zh_TW.Big5/Makefile
===================================================================
RCS file: /home/nbm/ncvs/doc/zh_TW.Big5/Makefile,v
retrieving revision 1.4
diff -u -r1.4 Makefile
--- Makefile	1999/08/26 19:42:13	1.4
+++ Makefile	1999/08/31 10:09:18
@@ -4,18 +4,5 @@
 
 COMPAT_SYMLINK = zh
 
-#
-# Put the compatability symlink in place.
-#
-afterinstall:
-.if !defined(IGNORE_COMPAT_SYMLINK)
-	if [ ! -e ${DOCDIR}/${COMPAT_SYMLINK} ]; then			\
-		rm -rf ${DOCDIR}/${COMPAT_SYMLINK};			\
-		(cd ${DOCDIR} && ln -s zh_TW.Big5 ${COMPAT_SYMLINK});	\
-	fi
-.endif
-
-.include <bsd.subdir.mk>
-
-DOC_PREFIX = ..
-.include "../share/mk/docproj.docbook.mk"
+DOC_PREFIX = ${.CURDIR}/..
+.include "${DOC_PREFIX}/share/mk/docproj.docbook.mk"
Index: zh_TW.Big5/books/Makefile
===================================================================
RCS file: /home/nbm/ncvs/doc/zh_TW.Big5/books/Makefile,v
retrieving revision 1.1
diff -u -r1.1 Makefile
--- Makefile	1999/08/19 03:56:48	1.1
+++ Makefile	1999/08/31 10:09:55
@@ -2,4 +2,7 @@
 
 SUBDIR = faq
 
-.include <bsd.subdir.mk>
+ROOT_SYMLINKS= faq
+
+DOC_PREFIX= ${.CURDIR}/../..
+.include "${DOC_PREFIX}/share/mk/doc.project.mk"
Index: zh_TW.Big5/books/faq/Makefile
===================================================================
RCS file: /home/nbm/ncvs/doc/zh_TW.Big5/books/faq/Makefile,v
retrieving revision 1.2
diff -u -r1.2 Makefile
--- Makefile	1999/08/25 05:29:44	1.2
+++ Makefile	1999/08/31 14:50:05
@@ -23,6 +23,6 @@
 # SGML content
 SRCS=  book.sgml 
 
-DOC_PREFIX?= ../../..
+DOC_PREFIX?= ${.CURDIR}/../../..
 
-.include "../../../share/mk/docproj.docbook.mk"
+.include "${DOC_PREFIX}/share/mk/docproj.docbook.mk"

--PEIAKu/WMn1b1Hv9--


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-doc" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990831170213.A97218>