Date: Mon, 8 Oct 2001 13:40:03 +0200 (CEST) From: Cyrille Lefevre <clefevre@citeweb.net> To: FreeBSD-gnats-submit@freebsd.org Subject: docs/31132: build/install www isn't /usr/obj prefix clean Message-ID: <200110081140.f98Be3R59442@gits.dyndns.org>
next in thread | raw e-mail | index | archive | help
>Number: 31132 >Category: docs >Synopsis: build/install www isn't /usr/obj prefix clean >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-doc >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Mon Oct 08 04:50:00 PDT 2001 >Closed-Date: >Last-Modified: >Originator: Cyrille Lefevre >Release: FreeBSD 4.4-RC i386 >Organization: ACME >Environment: System: FreeBSD gits 4.4-RC FreeBSD 4.4-RC #7: Thu Sep 20 12:40:17 CEST 2001 root@gits:/disk2/4.x-stable/src/sys/compile/CUSTOM i386 >Description: build/install www isn't /usr/obj prefix clean. this set of patches fix this problem. also, all commands have been replaced by variables, long lines have been wrapped, unneeded subshells have been deleted, shell for loops have been replaced by make for loops, etc. this PR depends on PR #31131. >How-To-Repeat: cd /usr/www; make obj; make; make install >Fix: Index: en/Makefile =================================================================== RCS file: /home/ncvs/www/en/Makefile,v retrieving revision 1.71 diff -u -r1.71 Makefile --- en/Makefile 2001/08/17 18:25:12 1.71 +++ en/Makefile 2001/10/07 19:59:23 @@ -81,18 +81,21 @@ DATA+= index.html index.html: index.xsl news/news.xml news/press.xml includes.xsl news/includes.xsl - xsltproc -nonet -o index.html index.xsl news/news.xml - -tidy -i -m -f /dev/null index.html + ${XSLTPROC} ${XSLTPROCFLAGS} -o index.html \ + ${.CURDIR}/index.xsl ${.CURDIR}/news/news.xml + -${TIDY} ${TIDYFLAGS} index.html # Handle the FAQ/ and handbook/ directories specially. FAQ: - ln -fs ${.CURDIR}/../../doc/en_US.ISO8859-1/books/faq FAQ + ${LN} -fs ${.CURDIR}/../../doc/en_US.ISO8859-1/books/faq FAQ handbook: - ln -fs ${.CURDIR}/../../doc/en_US.ISO8859-1/books/handbook handbook + ${LN} -fs ${.CURDIR}/../../doc/en_US.ISO8859-1/books/handbook handbook afterinstall: - (cd ${DOCINSTALLDIR} && ln -fs doc/en_US.ISO8859-1/books/faq ${DOCINSTALLDIR}/FAQ) - (cd ${DOCINSTALLDIR} && ln -fs doc/en_US.ISO8859-1/books/handbook ${DOCINSTALLDIR}/handbook) + cd ${DOCINSTALLDIR}; \ + ${LN} -fs doc/en_US.ISO8859-1/books/faq ${DOCINSTALLDIR}/FAQ + cd ${DOCINSTALLDIR}; \ + ${LN} -fs doc/en_US.ISO8859-1/books/handbook ${DOCINSTALLDIR}/handbook .include "${WEB_PREFIX}/share/mk/web.site.mk" Index: en/FAQ/Makefile =================================================================== RCS file: /home/ncvs/www/en/FAQ/Makefile,v retrieving revision 1.6 diff -u -r1.6 Makefile --- en/FAQ/Makefile 2001/06/11 02:38:58 1.6 +++ en/FAQ/Makefile 2001/10/07 19:59:48 @@ -14,13 +14,14 @@ # At build time, we have to link to the doc/ directory at the same level # as the www/ tree. all: - ln -fs ${.CURDIR}/../../../doc/en_US.ISO8859-1/books/faq/* . + ${LN} -fs ${.CURDIR}/../../../doc/en_US.ISO8859-1/books/faq/* . # At install time the www/en/doc/ directory has been populated, so we can # link in to there instead. install: - [ -d ${DOCINSTALLDIR} ] || mkdir ${DOCINSTALLDIR} - (cd ${DOCINSTALLDIR} && ln -fs ../doc/en_US.ISO8859-1/books/faq/* ${DOCINSTALLDIR}) + [ -d ${DOCINSTALLDIR} ] || ${MKDIR} ${DOCINSTALLDIR} + cd ${DOCINSTALLDIR}; \ + ${LN} -fs ../doc/en_US.ISO8859-1/books/faq/* ${DOCINSTALLDIR} .include "${WEB_PREFIX}/share/mk/web.site.mk" Index: en/cgi/Makefile =================================================================== RCS file: /home/ncvs/www/en/cgi/Makefile,v retrieving revision 1.17 diff -u -r1.17 Makefile --- en/cgi/Makefile 2000/11/07 04:05:09 1.17 +++ en/cgi/Makefile 2001/09/23 11:16:10 @@ -11,7 +11,7 @@ DATA+= cvsweb.conf cvsweb.conf-freebsd cvsweb.conf-netbsd cvsweb.conf-openbsd CGI= ftp.cgi gallery.cgi mirror.cgi cgi-lib.pl cgi-style.pl CGI+= search.cgi cvsweb.cgi query-pr.cgi query-pr-summary.cgi -CGI+= dosendpr.cgi freebsd.def html.pl reg.cgi missing_handler.cgi +CGI+= dosendpr.cgi freebsd.def html.pl reg.cgi missing_handler.cgi CGI+= ports.cgi pds.cgi man.cgi url.cgi getmsg.cgi mid.cgi CGI+= mailindex.cgi Index: en/copyright/Makefile =================================================================== RCS file: /home/ncvs/www/en/copyright/Makefile,v retrieving revision 1.11 diff -u -r1.11 Makefile --- en/copyright/Makefile 2001/06/14 03:09:55 1.11 +++ en/copyright/Makefile 2001/09/23 11:16:50 @@ -20,19 +20,18 @@ CVS_OPT+= -R .endif - DATA+= COPYING COPYING.LIB ${LEGAL} # FreeBSD Ports redistribution restrictions LEGAL= LEGAL LEGAL_FILE= ports/LEGAL -CLEANFILES+= ${LEGAL} +CLEANFILES+= ${LEGAL} .if defined(NOPORTSCVS) ${LEGAL}: $${PORTSBASE}/${LEGAL_FILE} - cp ${PORTSBASE}/${LEGAL_FILE} ${LEGAL} + ${CP} ${PORTSBASE}/${LEGAL_FILE} ${LEGAL} .else ${LEGAL}: - cvs ${CVS_OPT} co -p ${LEGAL_FILE} > ${.TARGET} + ${CVS} ${CVS_OPT} co -p ${LEGAL_FILE} > ${.TARGET} .endif .include "${WEB_PREFIX}/share/mk/web.site.mk" Index: /usr/www/en/doc/Makefile =================================================================== RCS file: /home/ncvs/www/en/doc/Makefile,v retrieving revision 1.7 diff -u -r1.7 Makefile --- /usr/www/en/doc/Makefile 2001/08/23 08:12:26 1.7 +++ /usr/www/en/doc/Makefile 2001/10/07 20:02:08 @@ -9,21 +9,42 @@ # requirements here. # -all: - (unset DESTDIR || true; cd ${.CURDIR}/../../../doc/en_US.ISO8859-1 && ${MAKE} FORMATS=html-split\ html all) - (unset DESTDIR || true; cd ${.CURDIR}/../../../doc/en_US.ISO8859-1 && ${MAKE} FORMATS=html-split\ html DOCDIR=${.CURDIR} install) - (unset DESTDIR || true; cd ${.CURDIR}/../../../doc/en_US.ISO8859-1/books/handbook && ${MAKE} pgpkeyring > ${.CURDIR}/pgpkeyring.txt) +all: all-all all-install all-pgpkeyring +all-all: + @unset DESTDIR || true; \ + cd ${.CURDIR}/../../../doc/en_US.ISO8859-1; \ + ${MAKE} FORMATS="html-split html" \ + INSTALL_COMPRESSED= all +all-install: + @unset DESTDIR || true; \ + cd ${.CURDIR}/../../../doc/en_US.ISO8859-1; \ + ${MAKE} FORMATS="html-split html" DOCDIR=${.OBJDIR} \ + INSTALL_COMPRESSED= install +all-pgpkeyring: + @unset DESTDIR || true; \ + cd ${.CURDIR}/../../../doc/en_US.ISO8859-1/books/handbook; \ + ${MAKE} pgpkeyring > ${.OBJDIR}/pgpkeyring.txt + install clean: - (unset DESTDIR || true; cd ${.CURDIR}/../../../doc/en_US.ISO8859-1 && ${MAKE} FORMATS=html-split\ html DOCDIR=${DESTDIR}/data/doc ${.TARGET}) + @unset DESTDIR || true; \ + cd ${.CURDIR}/../../../doc/en_US.ISO8859-1; \ + ${MAKE} FORMATS="html-split html" DOCDIR=${DESTDIR}/data/doc \ + INSTALL_COMPRESSED= ${.TARGET} .if make(install) - (unset DESTDIR || true; cd ${.CURDIR}/../../../doc/en_US.ISO8859-1/books/handbook && ${MAKE} pgpkeyring > ${DESTDIR}/data/doc/pgpkeyring.txt) + @unset DESTDIR || true; \ + cd ${.CURDIR}/../../../doc/en_US.ISO8859-1/books/handbook; \ + ${MAKE} pgpkeyring > ${DESTDIR}/data/doc/pgpkeyring.txt .endif .if make(clean) - rm -rf en* handbook faq pgpkeyring.txt + ${RM} -rf en* handbook faq pgpkeyring.txt .endif -obj: - cd ${.CURDIR}/../../../doc/en_US.ISO8859-1 && ${MAKE} ${.TARGET} - .include "${.CURDIR}/../../share/mk/web.site.mk" + +obj: _OBJUSE + +_OBJUSE: .USE + @unset DESTDIR || true; \ + cd ${.CURDIR}/../../../doc/en_US.ISO8859-1; \ + ${MAKE} ${.TARGET} Index: en/gallery/Makefile =================================================================== RCS file: /home/ncvs/www/en/gallery/Makefile,v retrieving revision 1.13 diff -u -r1.13 Makefile --- en/gallery/Makefile 2001/09/05 07:51:40 1.13 +++ en/gallery/Makefile 2001/10/07 19:56:51 @@ -7,29 +7,33 @@ .include "../Makefile.inc" .endif -XSLT= env SGML_CATALOG_FILES=/usr/local/share/xml/dtd/xhtml/xhtml.soc \ - xsltproc --catalogs +XSLTPROCFLAGS= --catalogs +XSLT= ${SETENV} SGML_CATALOG_FILES=${PREFIX}/share/xml/dtd/xhtml/xhtml.soc \ + ${XSLTPROC} ${XSLTPROCFLAGS} INDEXLINK= gallery.html DATA+= gallery.html cgallery.html npgallery.html pgallery.html -CLEANFILES+= cgallery.html npgallery.html pgallery.html gallery.html +CLEANFILES+= ${DATA} gallery.html: gallery.xml gallery.xsl ../includes.xsl - ${XSLT} gallery.xsl gallery.xml > gallery.html - -tidy -i -m -f /dev/null gallery.html + ${XSLT} ${.CURDIR}/gallery.xsl ${.CURDIR}/gallery.xml > ${.TARGET} + -${TIDY} ${TIDYFLAGS} ${.TARGET} cgallery.html: gallery.xml gallery-entry.xsl - ${XSLT} --param type \'commercial\' gallery-entry.xsl gallery.xml > cgallery.html - -tidy -i -m -f /dev/null cgallery.html + ${XSLT} --param type \'commercial\' \ + ${.CURDIR}/gallery-entry.xsl ${.CURDIR}/gallery.xml > ${.TARGET} + -${TIDY} ${TIDYFLAGS} ${.TARGET} npgallery.html: gallery.xml gallery-entry.xsl - ${XSLT} --param type \'nonprofit\' gallery-entry.xsl gallery.xml > npgallery.html - -tidy -i -m -f /dev/null npgallery.html + ${XSLT} --param type \'nonprofit\' \ + ${.CURDIR}/gallery-entry.xsl ${.CURDIR}/gallery.xml > ${.TARGET} + -${TIDY} ${TIDYFLAGS} ${.TARGET} pgallery.html: gallery.xml gallery-entry.xsl - ${XSLT} --param type \'personal\' gallery-entry.xsl gallery.xml > pgallery.html - -tidy -i -m -f /dev/null pgallery.html + ${XSLT} --param type \'personal\' \ + ${.CURDIR}/gallery-entry.xsl ${.CURDIR}/gallery.xml > ${.TARGET} + -${TIDY} ${TIDYFLAGS} ${.TARGET} .include "${WEB_PREFIX}/share/mk/web.site.mk" Index: en/handbook/Makefile =================================================================== RCS file: /home/ncvs/www/en/handbook/Makefile,v retrieving revision 1.7 diff -u -r1.7 Makefile --- en/handbook/Makefile 2001/06/11 02:39:00 1.7 +++ en/handbook/Makefile 2001/10/07 20:05:50 @@ -12,13 +12,14 @@ # At build time, we have to link to the doc/ directory at the same level # as the www/ tree. all: - ln -fs ${.CURDIR}/../../../doc/en_US.ISO8859-1/books/handbook/* . + ${LN} -fs ${.CURDIR}/../../../doc/en_US.ISO8859-1/books/handbook/* . # At install time the ../doc/ directory has been populated, so we can # link in to there instead. install: - [ -d ${DOCINSTALLDIR} ] || mkdir ${DOCINSTALLDIR} - (cd ${DOCINSTALLDIR} && ln -fs ../doc/en_US.ISO8859-1/books/handbook/* ${DOCINSTALLDIR}) + [ -d ${DOCINSTALLDIR} ] || ${MKDIR} ${DOCINSTALLDIR} + cd ${DOCINSTALLDIR}; \ + ${LN} -fs ../doc/en_US.ISO8859-1/books/handbook/* ${DOCINSTALLDIR} .include "${WEB_PREFIX}/share/mk/web.site.mk" Index: en/news/Makefile =================================================================== RCS file: /home/ncvs/www/en/news/Makefile,v retrieving revision 1.29 diff -u -r1.29 Makefile --- en/news/Makefile 2001/09/05 15:31:58 1.29 +++ en/news/Makefile 2001/10/06 20:49:08 @@ -35,14 +35,17 @@ CLEANFILES+= newsflash.html news.rdf press.html newsflash.html: newsflash.xsl news.xml includes.xsl ../includes.xsl - xsltproc -nonet -o newsflash.html newsflash.xsl news.xml - -tidy -i -m -f /dev/null newsflash.html + ${XSLTPROC} ${XSLTPROCFLAGS} -o newsflash.html \ + ${.CURDIR}/newsflash.xsl ${.CURDIR}/news.xml + -${TIDY} ${TIDYFLAGS} newsflash.html news.rdf: news-rdf.xsl news.xml includes.xsl ../includes.xsl - xsltproc -nonet -o news.rdf news-rdf.xsl news.xml + ${XSLTPROC} ${XSLTPROCFLAGS} -o news.rdf \ + ${.CURDIR}/news-rdf.xsl ${.CURDIR}/news.xml press.html: press.xsl press.xml includes.xsl ../includes.xsl - xsltproc -nonet -o press.html press.xsl press.xml - -tidy -i -m -f /dev/null press.html + ${XSLTPROC} ${XSLTPROCFLAGS} -o press.html \ + ${.CURDIR}/press.xsl ${.CURDIR}/press.xml + -${TIDY} ${TIDYFLAGS} press.html .include "${WEB_PREFIX}/share/mk/web.site.mk" Index: en/news/1997/Makefile =================================================================== RCS file: /home/ncvs/www/en/news/1997/Makefile,v retrieving revision 1.3 diff -u -r1.3 Makefile --- en/news/1997/Makefile 2000/11/07 04:05:20 1.3 +++ en/news/1997/Makefile 2001/09/23 11:19:59 @@ -10,4 +10,3 @@ DOCS= index.sgml .include "${WEB_PREFIX}/share/mk/web.site.mk" - Index: en/news/1998/Makefile =================================================================== RCS file: /home/ncvs/www/en/news/1998/Makefile,v retrieving revision 1.1 diff -u -r1.1 Makefile --- en/news/1998/Makefile 2001/04/13 00:54:06 1.1 +++ en/news/1998/Makefile 2001/09/23 11:20:02 @@ -10,4 +10,3 @@ DOCS= index.sgml .include "${WEB_PREFIX}/share/mk/web.site.mk" - Index: en/news/1999/Makefile =================================================================== RCS file: /home/ncvs/www/en/news/1999/Makefile,v retrieving revision 1.1 diff -u -r1.1 Makefile --- en/news/1999/Makefile 2001/04/13 00:54:09 1.1 +++ en/news/1999/Makefile 2001/09/23 11:20:05 @@ -10,4 +10,3 @@ DOCS= index.sgml .include "${WEB_PREFIX}/share/mk/web.site.mk" - Index: en/news/2000/Makefile =================================================================== RCS file: /home/ncvs/www/en/news/2000/Makefile,v retrieving revision 1.1 diff -u -r1.1 Makefile --- en/news/2000/Makefile 2001/04/13 00:54:11 1.1 +++ en/news/2000/Makefile 2001/09/23 11:20:08 @@ -10,4 +10,3 @@ DOCS= index.sgml .include "${WEB_PREFIX}/share/mk/web.site.mk" - Index: en/news/status/Makefile =================================================================== RCS file: /home/ncvs/www/en/news/status/Makefile,v retrieving revision 1.6 diff -u -r1.6 Makefile --- en/news/status/Makefile 2001/09/18 18:46:30 1.6 +++ en/news/status/Makefile 2001/10/06 20:49:43 @@ -18,8 +18,9 @@ CLEANFILES+= ${DATA} .xml.html: report.xsl includes.xsl - xsltproc -nonet -o ${.TARGET} report.xsl ${.IMPSRC} - -tidy -i -m -f /dev/null ${.TARGET} + ${XSLTPROC} ${XSLTPROCFLAGS} -o ${.TARGET} \ + ${.CURDIR}/report.xsl ${.IMPSRC} + -${TIDY} ${TIDYFLAGS} ${.TARGET} INDEXLINK= status.html Index: /usr/www/en/ports/Makefile =================================================================== RCS file: /home/ncvs/www/en/ports/Makefile,v retrieving revision 1.33 diff -u -r1.33 Makefile --- /usr/www/en/ports/Makefile 2001/06/14 03:09:56 1.33 +++ /usr/www/en/ports/Makefile 2001/10/07 20:06:36 @@ -26,17 +26,16 @@ .if defined(NOPORTSCVS) ${INDEX}: $${PORTSBASE}/${PINDEX} - cp ${PORTSBASE}/${PINDEX} ${INDEX} + ${CP} ${PORTSBASE}/${PINDEX} ${INDEX} .else ${INDEX}: - cvs ${CVS_OPT} co -p ${PINDEX} > ${INDEX} + ${CVS} ${CVS_OPT} co -p ${PINDEX} > ${INDEX} .endif # build the list of available packages only on the # main FreeBSD machines hostname!= hostname - # # don't build the packages links if NO_PACKAGES_LINK # is set and not empty. @@ -48,29 +47,28 @@ hostname= ${NO_PACKAGES_LINK} .endif - packages.exists: .if ${hostname} == "hub.freebsd.org" || ${hostname} == "freefall.freebsd.org" - @if sh ${.CURDIR}/packages > ${.TARGET}.temp; then \ - mv ${.TARGET}.temp ${.TARGET}; \ + @if ${SH} ${.CURDIR}/packages > ${.TARGET}.temp; then \ + ${MV} ${.TARGET}.temp ${.TARGET}; \ else \ - rm ${.TARGET}.temp; touch ${.TARGET}; \ + ${RM} ${.TARGET}.temp; ${TOUCH} ${.TARGET}; \ fi; .else - touch ${.TARGET} + ${TOUCH} ${.TARGET} .endif Makefile.gen: index.sgml .NOTMAIN - echo DOCS= *.sgml > Makefile.gen + ${ECHO_CMD} DOCS= *.sgml > Makefile.gen index.sgml: ${INDEX} categories packages.exists portindex ports.inc .NOTMAIN - rm -f *.sgml + ${RM} -f *.sgml ${PORTINDEX} ${INDEX} ${.CURDIR} install: all all install clean: - (cd ${.CURDIR} && ${MAKE} ${MAKEFLAGS} -f Makefile.inc0 ${.TARGET}) - + cd ${.CURDIR}; \ + ${MAKE} ${MAKEFLAGS} -f Makefile.inc0 ${.TARGET} .include "${WEB_PREFIX}/share/mk/web.site.mk" Index: en/relnotes/Makefile =================================================================== RCS file: /home/ncvs/www/en/relnotes/Makefile,v retrieving revision 1.4 diff -u -r1.4 Makefile --- en/relnotes/Makefile 2001/09/09 15:32:29 1.4 +++ en/relnotes/Makefile 2001/10/07 19:56:10 @@ -18,7 +18,7 @@ while :; do \ case $$# in \ 0) break;; \ - 1) echo "bad \$$RELNOTES value"; false; break;; \ + 1) ${ECHO_CMD} "bad \$$RELNOTES value"; false; break;; \ esac; \ webname=$$1; shift; realpath=$$1; shift; \ (unset DESTDIR || true; \ Index: en/search/Makefile =================================================================== RCS file: /home/ncvs/www/en/search/Makefile,v retrieving revision 1.8 diff -u -r1.8 Makefile --- en/search/Makefile 2000/11/07 04:05:36 1.8 +++ en/search/Makefile 2001/09/23 11:02:28 @@ -18,7 +18,7 @@ index-site.html: atoz.sgml site.sgml atoz.sgml: web.atoz - sort -fu ${.ALLSRC} | ${PERL} ${.CURDIR}/atoz.pl > ${.TARGET} + ${SORT} -fu ${.ALLSRC} | ${PERL} ${.CURDIR}/atoz.pl > ${.TARGET} site.sgml: site.map ${PERL} ${.CURDIR}/site.pl < ${.ALLSRC} > ${.TARGET} Index: share/mk/web.site.mk =================================================================== RCS file: /home/ncvs/www/share/mk/web.site.mk,v retrieving revision 1.36 diff -u -r1.36 web.site.mk --- share/mk/web.site.mk 2000/11/22 02:35:42 1.36 +++ share/mk/web.site.mk 2001/10/07 18:26:23 @@ -27,7 +27,24 @@ CGIGRP?= www CGIMODE?= 775 -PERL?= perl5 +CP?= /bin/cp +CVS?= /usr/bin/cvs +ECHO_CMD?= echo +SETENV?= /usr/bin/env +LN?= /bin/ln +MKDIR?= /bin/mkdir +MV?= /bin/mv +PERL?= /usr/bin/perl5 +RM?= /bin/rm +SED?= /usr/bin/sed +SH?= /bin/sh +SORT?= /usr/bin/sort +TOUCH?= /usr/bin/touch + +XSLTPROC?= ${PREFIX}/bin/xsltproc +XSLTPROCFLAGS?= -nonet +TIDY?= ${PREFIX}/bin/tidy +TIDYFLAGS?= -i -m -f /dev/null # # Install dirs derived from the above. @@ -64,42 +81,47 @@ .if defined(REVCHECK) PREHTML= ${WEB_PREFIX}/ja/prehtml PREHTMLFLAGS= ${PREHTMLOPTS} -CANONPREFIX0!= cd ${WEB_PREFIX}; echo $${PWD}; +CANONPREFIX0!= cd ${WEB_PREFIX}; ${ECHO_CMD} $${PWD}; CANONPREFIX= ${PWD:S/^${CANONPREFIX0}//:S/^\///} -LOCALTOP!= echo ${CANONPREFIX} | perl -pe 's@[^/]+@..@g; $$_.="/." if($$_ eq".."); s@^\.\./@@;' -DIR_IN_LOCAL!= echo ${CANONPREFIX} | perl -pe 's@^[^/]+/?@@;' +LOCALTOP!= ${ECHO_CMD} ${CANONPREFIX} | \ + ${PERL} -pe 's@[^/]+@..@g; $$_.="/." if($$_ eq".."); s@^\.\./@@;' +DIR_IN_LOCAL!= ${ECHO_CMD} ${CANONPREFIX} | ${PERL} -pe 's@^[^/]+/?@@;' PREHTMLFLAGS+= -revcheck "${LOCALTOP}" "${DIR_IN_LOCAL}" .else DATESUBST= 's/<!ENTITY date[ \t]*"$$Free[B]SD. .* \(.* .*\) .* .* $$">/<!ENTITY date "Last modified: \1">/' -PREHTML= sed -e ${DATESUBST} +PREHTML= ${SED} -e ${DATESUBST} .endif .if !defined(OPENJADE) -SGMLNORM= sgmlnorm +SGMLNORM= ${PREFIX}/bin/sgmlnorm .else -SGMLNORM= osgmlnorm +SGMLNORM= ${PREFIX}/bin/osgmlnorm .endif -PREFIX?= /usr/local +LOCALBASE?= /usr/local +PREFIX?= ${LOCALBASE} CATALOG?= ${PREFIX}/share/sgml/html/catalog SGMLNORMFLAGS= -d ${SGMLNORMOPTS} -c ${CATALOG} -D ${.CURDIR} GENDOCS+= ${DOCS:M*.sgml:S/.sgml$/.html/g} ORPHANS:= ${ORPHANS:N*.sgml} .sgml.html: - (${PREHTML} ${PREHTMLFLAGS} ${.IMPSRC} |\ - SGML_CATALOG_FILES='' ${SGMLNORM} ${SGMLNORMFLAGS} > ${.TARGET})\ - || (rm -f ${.TARGET} && false) + ${PREHTML} ${PREHTMLFLAGS} ${.IMPSRC} | \ + ${SETENV} SGML_CATALOG_FILES='' \ + ${SGMLNORM} ${SGMLNORMFLAGS} > ${.TARGET} || \ + (${RM} -f ${.TARGET} && false) ### # file.docb --> file.html # # Generate HTML from docbook +SGMLFMT?= ${PREFIX}/bin/sgmlfmt +SGMLFMTFLAGS?= -d docbook -f html ${SGMLOPTS} .SUFFIXES: .docb GENDOCS+= ${DOCS:M*.docb:S/.docb$/.html/g} ORPHANS:= ${ORPHANS:N*.docb} .docb.html: - sgmlfmt -d docbook -f html ${SGMLOPTS} ${.IMPSRC} + ${SGMLFMT} ${SGMLFMTFLAGS} ${.IMPSRC} ################################################################## @@ -120,7 +142,7 @@ # .if !empty(ORPHANS) orphans: - @echo Warning! I don\'t know what to do with: ${ORPHANS} + @${ECHO} Warning! I don\'t know what to do with: ${ORPHANS} .else orphans: .endif @@ -132,10 +154,10 @@ clean: _PROGSUBDIR .if defined(DIRS_TO_CLEAN) && !empty(DIRS_TO_CLEAN) .for dir in ${DIRS_TO_CLEAN} - (cd ${.CURDIR}/${dir} && ${MAKE} clean) + cd ${.CURDIR}/${dir}; ${MAKE} clean .endfor .endif - rm -f Errs errs mklog ${GENDOCS} ${LOCAL} ${CLEANFILES} + ${RM} -f Errs errs mklog ${GENDOCS} ${LOCAL} ${CLEANFILES} .endif # @@ -143,8 +165,8 @@ # .if !target(cleandir) cleandir: clean _PROGSUBDIR - rm -f ${.CURDIR}/tags .depend - cd ${.CURDIR}; rm -rf obj; + ${RM} -f ${.CURDIR}/tags .depend + cd ${.CURDIR}; ${RM} -rf obj .endif # @@ -158,30 +180,36 @@ afterinstall: .endif +INSTALL_WEB?= \ + ${INSTALL} ${COPY} ${INSTALLFLAGS} -o ${WEBOWN} -g ${WEBGRP} -m ${WEBMODE} +INSTALL_CGI?= \ + ${INSTALL} ${COPY} ${INSTALLFLAGS} -o ${CGIOWN} -g ${CGIGRP} -m ${CGIMODE} _ALLINSTALL+= ${GENDOCS} ${DATA} ${LOCAL} -realinstall: ${COOKIE} ${GENDOCS} ${DATA} ${LOCAL} ${CGI} _PROGSUBDIR +realinstall: ${COOKIE} ${_ALLINSTALL} ${CGI} _PROGSUBDIR .if !empty(_ALLINSTALL) - @mkdir -p ${DOCINSTALLDIR} - for entry in ${_ALLINSTALL}; do \ - ${INSTALL} ${COPY} -o ${WEBOWN} -g ${WEBGRP} -m ${WEBMODE} \ - ${INSTALLFLAGS} $${entry} ${DOCINSTALLDIR}; \ - done + @${MKDIR} -p ${DOCINSTALLDIR} +.for entry in ${_ALLINSTALL} +.if exists(${.CURDIR}/${entry}) + ${INSTALL_WEB} ${.CURDIR}/${entry} ${DOCINSTALLDIR} +.else + ${INSTALL_WEB} ${entry} ${DOCINSTALLDIR} +.endif +.endfor .if defined(INDEXLINK) && !empty(INDEXLINK) - (cd ${DOCINSTALLDIR}; ln -s -f ${INDEXLINK} index.html) + cd ${DOCINSTALLDIR}; ${LN} -fs ${INDEXLINK} index.html .endif .endif .if defined(CGI) && !empty(CGI) - @mkdir -p ${CGIINSTALLDIR} - for entry in ${CGI}; do \ - ${INSTALL} ${COPY} -o ${CGIOWN} -g ${CGIGRP} -m ${CGIMODE} \ - ${INSTALLFLAGS} $${entry} ${CGIINSTALLDIR}; \ - done + @${MKDIR} -p ${CGIINSTALLDIR} +.for entry in ${CGI} + ${INSTALL_CGI} ${.CURDIR}/${entry} ${CGIINSTALLDIR} +.endfor .endif .if defined(DOCSUBDIR) && !empty(DOCSUBDIR) - for entry in ${DOCSUBDIR}; do \ - mkdir -p ${DOCINSTALLDIR}/$$entry; \ - done +.for entry in ${DOCSUBDIR} + @${MKDIR} -p ${DOCINSTALLDIR}/${entry} +.endfor .endif # Set up install dependencies so they happen in the correct order. @@ -197,26 +225,33 @@ #SUBDIR+=${DOCSUBDIR} _PROGSUBDIR: .USE .if defined(SUBDIR) && !empty(SUBDIR) - @for entry in ${SUBDIR}; do \ - (${ECHODIR} "===> ${DIRPRFX}$$entry"; \ - cd ${.CURDIR}/$${entry} && \ - ${MAKE} ${.TARGET:S/realinstall/install/:S/.depend/depend/} DIRPRFX=${DIRPRFX}$$entry/); \ - done +.for entry in ${SUBDIR} + @${ECHODIR} "===> ${DIRPRFX}${entry}" + @cd ${.CURDIR}/${entry}; \ + ${MAKE} ${.TARGET:S/realinstall/install/:S/.depend/depend/} \ + DIRPRFX=${DIRPRFX}${entry}/ +.endfor .endif .if defined(DOCSUBDIR) && !empty(DOCSUBDIR) - @for entry in ${DOCSUBDIR}; do \ - (${ECHODIR} "===> ${DIRPRFX}$$entry"; \ - cd ${.CURDIR}/$${entry} && \ - if [ ${WEBDIR} = "data" -a $$entry = "handbook" -o $$entry = "docproj-primer" ]; then \ - ${MAKE} ${.TARGET:S/realinstall/install/:S/.depend/depend/} DIRPRFX=${DIRPRFX}$$entry/ ${PARAMS} FORMATS="txt html html-split"; \ - elif [ $$entry = "handbook" -a ${WEBDIR} = "data/ja" ]; then \ - ${MAKE} ${.TARGET:S/realinstall/install/:S/.depend/depend/} DIRPRFX=${DIRPRFX}$$entry/ ${PARAMS} FORMATS="html html-split"; \ - else \ - ${MAKE} ${.TARGET:S/realinstall/install/:S/.depend/depend/} DIRPRFX=${DIRPRFX}$$entry/ ${PARAMS}; \ - fi); \ - done +.for entry in ${DOCSUBDIR} + @${ECHODIR} "===> ${DIRPRFX}${entry}" +.if (${WEBDIR} = "data" && ${entry} = "handbook") || ${entry} = "docproj-primer" + @cd ${.CURDIR}/${entry}; \ + ${MAKE} ${.TARGET:S/realinstall/install/:S/.depend/depend/} \ + DIRPRFX=${DIRPRFX}${entry}/ ${PARAMS} \ + FORMATS="txt html html-split" +.elif ${WEBDIR} = "data/ja" && ${entry} = "handbook" + @cd ${.CURDIR}/${entry}; \ + ${MAKE} ${.TARGET:S/realinstall/install/:S/.depend/depend/} \ + DIRPRFX=${DIRPRFX}${entry}/ ${PARAMS} \ + FORMATS="html html-split" +.else + @cd ${.CURDIR}/${entry}; \ + ${MAKE} ${.TARGET:S/realinstall/install/:S/.depend/depend/} \ + DIRPRFX=${DIRPRFX}${entry}/ ${PARAMS} .endif - +.endfor +.endif # # cruft for generating linuxdoc stuff @@ -233,4 +268,5 @@ .endif .include <bsd.obj.mk> + # THE END >Release-Note: >Audit-Trail: >Unformatted: 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?200110081140.f98Be3R59442>