Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 May 2003 22:41:17 +0200 (CEST)
From:      "Simon L.Nielsen" <simon@nitro.dk>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   docs/52540: [patch] Fix to stop make warnings when building docs on FreeBSD 5.X
Message-ID:  <20030521204117.34CAA10BF81@arthur.nitro.dk>
Resent-Message-ID: <200305212050.h4LKoHf8048635@freefall.freebsd.org>

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

>Number:         52540
>Category:       docs
>Synopsis:       [patch] Fix to stop make warnings when building docs on FreeBSD 5.X
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-doc
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed May 21 13:50:16 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator:     Simon L. Nielsen
>Release:        FreeBSD 4.8-STABLE i386
>Organization:
>Environment:
>Description:
I finally got tired of the all the warnings about duplicate script
targets when build the documentation on FreeBSD 5.X... so here is a
patch to fix them.

I don't think it should break anything since make(1) has previously
just ignored the double targets, but I would recommend to test the
patch prior to commit anyway...

I'm still not really sure why install-${_curformat}.${_compressext} is
being defined twice, but it is...

Note: bsd.obj.mk already includes bsd.subdir.mk so there is no need
to include it twice.

Tested on: FreeBSD 4.8-STABLE and 5.1-BETA.
>How-To-Repeat:
>Fix:
--- doc-build-no-5x-whine.patch begins here ---
Index: doc.docbook.mk
===================================================================
RCS file: /home/ncvs/doc/share/mk/doc.docbook.mk,v
retrieving revision 1.86
diff -u -d -r1.86 doc.docbook.mk
--- doc.docbook.mk	21 May 2003 11:23:45 -0000	1.86
+++ doc.docbook.mk	21 May 2003 22:12:53 -0000
@@ -512,12 +512,14 @@
 ${DOC}.tex-ps: ${DOC}.tex
 	${LN} -f ${.ALLSRC} ${.TARGET}
 
+.if !target(${DOC}.tex-pdf)
 ${DOC}.tex-pdf: ${SRCS} ${IMAGES_PDF} ${INDEX_SGML} ${PRINT_INDEX} \
 		${LOCAL_IMAGES_TXT}
 	${RM} -f ${.TARGET}
 	${CAT} ${PDFTEX_DEF} > ${.TARGET}
 	${JADE} -V tex-backend ${PRINTOPTS} -ioutput.print.pdf \
 		${JADEOPTS} -t tex -o /dev/stdout ${MASTERDOC} >> ${.TARGET}
+.endif
 
 ${DOC}.dvi: ${DOC}.tex ${LOCAL_IMAGES_EPS}
 .for _curimage in ${LOCAL_IMAGES_EPS:M*share*}
@@ -530,6 +532,7 @@
 	@${ECHO} "==> TeX pass 3/3"
 	-${TEX} "&jadetex" '${TEXCMDS} \nonstopmode\input{${DOC}.tex}'
 
+.if !target(${DOC}.pdf)
 ${DOC}.pdf: ${DOC}.tex-pdf ${IMAGES_PDF}
 .for _curimage in ${IMAGES_PDF:M*share*}
 	${CP} -p ${_curimage} ${.CURDIR:H:H}/${_curimage:H:S|${IMAGES_EN_DIR}/||:S|${.CURDIR}||}
@@ -540,6 +543,7 @@
 	-${PDFTEX} "&pdfjadetex" '${TEXCMDS} \nonstopmode\input{${DOC}.tex-pdf}'
 	@${ECHO} "==> PDFTeX pass 3/3"
 	${PDFTEX} "&pdfjadetex" '${TEXCMDS} \nonstopmode\input{${DOC}.tex-pdf}'
+.endif
 
 ${DOC}.ps: ${DOC}.dvi
 	${DVIPS} ${DVIPSOPTS} -o ${.TARGET} ${.ALLSRC}
@@ -794,12 +798,14 @@
 .endfor
 .else
 .for _compressext in ${KNOWN_COMPRESS}
+.if !target(install-${_curformat}.${_compressext})
 install-${_curformat}.${_compressext}: ${DOC}.${_curformat}.${_compressext}
 	@[ -d ${DESTDIR} ] || ${MKDIR} -p ${DESTDIR}
 	${INSTALL_DOCS} ${.ALLSRC} ${DESTDIR}
 .if ${_cf} == "pdb"
 	${LN} -f ${DESTDIR}/${.ALLSRC} \
 		 ${DESTDIR}/${.CURDIR:T}.${_curformat}.${_compressext}
+.endif
 .endif
 .endfor
 .endif
Index: doc.subdir.mk
===================================================================
RCS file: /home/ncvs/doc/share/mk/doc.subdir.mk,v
retrieving revision 1.9
diff -u -d -r1.9 doc.subdir.mk
--- doc.subdir.mk	13 Dec 2001 23:51:26 -0000	1.9
+++ doc.subdir.mk	21 May 2003 19:52:22 -0000
@@ -121,7 +121,6 @@
 .if !defined(NOINCLUDEMK)
 
 .include <bsd.obj.mk>
-.include <bsd.subdir.mk>
 
 .else
 
--- doc-build-no-5x-whine.patch ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



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