Bug 31132

Summary: build/install www isn't /usr/obj prefix clean
Product: Documentation Reporter: clefevre <clefevre>
Component: Books & ArticlesAssignee: freebsd-doc (Nobody) <doc>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description clefevre 2001-10-08 12:50:00 UTC
	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
Comment 1 clefevre 2001-10-18 16:53:10 UTC
this patch set complete the previous one I sent.

the first one should be applied using patch w/ no args and this
one using patch -p2.

in the previous message I said this patch depends on PR #31131.
this is not the case.

wrapped lines in en/doc/Makefile will be used in a future patch I'll sent
concerning unresolved links. same assertion about linbot in en/Makefile.

tidy has been added here and there. RELNOTES has been made conditional
to be overwritten in /etc/make.conf. also, some long lines have been wrapped.

diff -ruN -x CVS -x work -x *~ -x *.orig -x *.rej -I $Id.*$ -I $FreeBSD.*$ old/www/en/FAQ/Makefile new/www/en/FAQ/Makefile
--- old/www/en/FAQ/Makefile	Thu Oct 18 17:18:49 2001
+++ new/www/en/FAQ/Makefile	Thu Oct 18 17:19:02 2001
@@ -14,7 +14,7 @@
 # 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 ${.OBJDIR}/../../../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.
diff -ruN -x CVS -x work -x *~ -x *.orig -x *.rej -I $Id.*$ -I $FreeBSD.*$ old/www/en/Makefile new/www/en/Makefile
--- old/www/en/Makefile	Thu Oct 18 17:18:49 2001
+++ new/www/en/Makefile	Thu Oct 18 17:19:02 2001
@@ -79,6 +79,7 @@
 
 # index.html is special, and generated from index.xsl and news/news.xml
 DATA+=		index.html
+CLEANFILES+=	index.html
 
 index.html: index.xsl news/news.xml news/press.xml includes.xsl news/includes.xsl
 	${XSLTPROC} ${XSLTPROCFLAGS} -o index.html \
@@ -86,16 +87,28 @@
 	-${TIDY} ${TIDYFLAGS} index.html
 
 # Handle the FAQ/ and handbook/ directories specially.
+CLEANFILES+=	FAQ
 FAQ:
-	${LN} -fs ${.CURDIR}/../../doc/en_US.ISO8859-1/books/faq FAQ
+	${LN} -fs ${.OBJDIR}/../../doc/en_US.ISO8859-1/books/faq FAQ
 
+CLEANFILES+=	handbook
 handbook:
-	${LN} -fs ${.CURDIR}/../../doc/en_US.ISO8859-1/books/handbook handbook
+	${LN} -fs ${.OBJDIR}/../../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
+
+LINBOT?=	${PREFIX}/bin/linbot
+LINBOTFLAGS?=	-ab
+LINBOTDIR?=	/linbot
+LINBOTINSTALLDIR?= ${DESTDIR}${LINBOTDIR}
+LINBOTURL?=	http://www.FreeBSD.org/
+
+linbot:
+	@[ -d ${LINBOTINSTALLDIR} ] || ${MKDIR} ${LINBOTINSTALLDIR}
+	${LINBOT} ${LINBOTFLAGS} -o ${LINBOTINSTALLDIR} ${LINBOTURL}
 
 .include "${WEB_PREFIX}/share/mk/web.site.mk"
diff -ruN -x CVS -x work -x *~ -x *.orig -x *.rej -I $Id.*$ -I $FreeBSD.*$ old/www/en/doc/Makefile new/www/en/doc/Makefile
--- old/www/en/doc/Makefile	Thu Oct 18 17:18:49 2001
+++ new/www/en/doc/Makefile	Thu Oct 18 17:19:29 2001
@@ -24,7 +24,8 @@
 all-pgpkeyring:
 	@unset DESTDIR || true; \
 	 cd ${.CURDIR}/../../../doc/en_US.ISO8859-1/books/handbook; \
-		${MAKE} pgpkeyring > ${.OBJDIR}/pgpkeyring.txt
+		${MAKE} \
+			pgpkeyring > ${.OBJDIR}/pgpkeyring.txt
 
 install clean:
 	@unset DESTDIR || true; \
@@ -34,7 +35,8 @@
 .if make(install)
 	@unset DESTDIR || true; \
 	 cd ${.CURDIR}/../../../doc/en_US.ISO8859-1/books/handbook; \
-		${MAKE} pgpkeyring > ${DESTDIR}/data/doc/pgpkeyring.txt
+		${MAKE} \
+			pgpkeyring > ${DESTDIR}/data/doc/pgpkeyring.txt
 .endif
 .if make(clean)
 	${RM} -rf en* handbook faq pgpkeyring.txt
diff -ruN -x CVS -x work -x *~ -x *.orig -x *.rej -I $Id.*$ -I $FreeBSD.*$ old/www/en/handbook/Makefile new/www/en/handbook/Makefile
--- old/www/en/handbook/Makefile	Thu Oct 18 17:18:49 2001
+++ new/www/en/handbook/Makefile	Thu Oct 18 17:19:02 2001
@@ -12,14 +12,15 @@
 # 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 ${.OBJDIR}/../../../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}
+		${LN} -fs ../doc/en_US.ISO8859-1/books/handbook/* \
+			  ${DOCINSTALLDIR}
 
 .include "${WEB_PREFIX}/share/mk/web.site.mk"
 
diff -ruN -x CVS -x work -x *~ -x *.orig -x *.rej -I $Id.*$ -I $FreeBSD.*$ old/www/en/news/Makefile new/www/en/news/Makefile
--- old/www/en/news/Makefile	Thu Oct 18 17:18:49 2001
+++ new/www/en/news/Makefile	Thu Oct 18 17:19:02 2001
@@ -35,17 +35,17 @@
 CLEANFILES+=	newsflash.html news.rdf press.html
 
 newsflash.html: newsflash.xsl news.xml includes.xsl ../includes.xsl
-	${XSLTPROC} ${XSLTPROCFLAGS} -o newsflash.html \
+	${XSLTPROC} ${XSLTPROCFLAGS} -o ${.TARGET} \
 		${.CURDIR}/newsflash.xsl ${.CURDIR}/news.xml
-	-${TIDY} ${TIDYFLAGS} newsflash.html
+	-${TIDY} ${TIDYFLAGS} ${.TARGET}
 
 news.rdf: news-rdf.xsl news.xml includes.xsl ../includes.xsl
-	${XSLTPROC} ${XSLTPROCFLAGS} -o news.rdf \
+	${XSLTPROC} ${XSLTPROCFLAGS} -o ${.TARGET} \
 		${.CURDIR}/news-rdf.xsl ${.CURDIR}/news.xml
 
 press.html: press.xsl press.xml includes.xsl ../includes.xsl
-	${XSLTPROC} ${XSLTPROCFLAGS} -o press.html \
+	${XSLTPROC} ${XSLTPROCFLAGS} -o ${.TARGET} \
 		${.CURDIR}/press.xsl ${.CURDIR}/press.xml
-	-${TIDY} ${TIDYFLAGS} press.html
+	-${TIDY} ${TIDYFLAGS} ${.TARGET}
 
 .include "${WEB_PREFIX}/share/mk/web.site.mk"
diff -ruN -x CVS -x work -x *~ -x *.orig -x *.rej -I $Id.*$ -I $FreeBSD.*$ old/www/en/ports/Makefile new/www/en/ports/Makefile
--- old/www/en/ports/Makefile	Thu Oct 18 17:18:49 2001
+++ new/www/en/ports/Makefile	Thu Oct 18 17:19:02 2001
@@ -69,6 +69,6 @@
 
 all install clean:
 	cd ${.CURDIR}; \
-		${MAKE} ${MAKEFLAGS} -f Makefile.inc0 ${.TARGET}
+		${MAKE} ${MAKEFLAGS} -f ${.CURDIR}/Makefile.inc0 ${.TARGET}
 
 .include "${WEB_PREFIX}/share/mk/web.site.mk"
diff -ruN -x CVS -x work -x *~ -x *.orig -x *.rej -I $Id.*$ -I $FreeBSD.*$ old/www/en/relnotes/Makefile new/www/en/relnotes/Makefile
--- old/www/en/relnotes/Makefile	Thu Oct 18 17:18:49 2001
+++ new/www/en/relnotes/Makefile	Thu Oct 18 17:19:02 2001
@@ -10,7 +10,7 @@
 # $FreeBSD: www/en/relnotes/Makefile,v 1.4 2001/09/09 15:32:29 dd Exp $
 #
 
-RELNOTES=	CURRENT ${.CURDIR}/../../../relnotes/doc \
+RELNOTES?=	CURRENT ${.CURDIR}/../../../relnotes/doc \
 		4-STABLE ${.CURDIR}/../../../relnotes4/doc
 
 all install clean obj:
diff -ruN -x CVS -x work -x *~ -x *.orig -x *.rej -I $Id.*$ -I $FreeBSD.*$ old/www/share/mk/web.site.mk new/www/share/mk/web.site.mk
--- old/www/share/mk/web.site.mk	Thu Oct 18 17:18:49 2001
+++ new/www/share/mk/web.site.mk	Thu Oct 18 17:19:02 2001
@@ -105,9 +105,12 @@
 
 .sgml.html:
 	${PREHTML} ${PREHTMLFLAGS} ${.IMPSRC} | \
-	${SETENV} SGML_CATALOG_FILES='' \
+	${SETENV} SGML_CATALOG_FILES= \
 		${SGMLNORM} ${SGMLNORMFLAGS} > ${.TARGET} || \
 			(${RM} -f ${.TARGET} && false)
+.if !defined(NO_TIDY)
+	-${TIDY} ${TIDYFLAGS} ${.TARGET}
+.endif
 
 ###
 # file.docb --> file.html
@@ -122,6 +125,9 @@
 
 .docb.html:
 	${SGMLFMT} ${SGMLFMTFLAGS} ${.IMPSRC}
+.if !defined(NO_TIDY)
+	-${TIDY} ${TIDYFLAGS} ${.TARGET}
+.endif
 
 
 ##################################################################

Cyrille.
-- 
Cyrille Lefevre                 mailto:clefevre@citeweb.net
Comment 2 Murray Stokely freebsd_committer freebsd_triage 2001-10-29 10:15:32 UTC
State Changed
From-To: open->closed

Your patch has been committed.  Thanks for the submission!