Skip site navigation (1)Skip section navigation (2)
Date:      18 Oct 2001 18:31:27 +0900
From:      Akio Morita <amorita@freebsd.org>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   docs/31350: make of doc module fails after 'make obj'
Message-ID:  <20011018093127.38936.qmail@misao.kuicr.kyoto-u.ac.jp>

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

>Number:         31350
>Category:       docs
>Synopsis:       make of doc module fails after 'make obj'
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-doc
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Oct 18 02:40:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Akio Morita
>Release:        FreeBSD 4.4-STABLE i386
>Organization:
Department of Physics, Kyoto University, Japan
>Environment:
System: FreeBSD sasami.jyurai 4.4-STABLE FreeBSD 4.4-STABLE #0: Mon Oct 15 17:08:52 JST 2001 amorita@sasami.jyurai:/usr/SRC/src/sys/compile/SASAMI i386

>Description:
After `make obj', the make of the doc module fails.
Following log is the failure log of make in my machine.

--- make log after make obj ---
% make DOC_LANG=
===> en_US.ISO8859-1
===> en_US.ISO8859-1/articles
===> en_US.ISO8859-1/articles/committers-guide
touch index.sgml
cp /tmp/doc/en_US.ISO8859-1/articles/committers-guide/../../../share/misc/docbook.css /tmp/doc/en_US.ISO8859-1/articles/committers-guide/docbook.css
/usr/local/bin/jade -ioutput.html -ioutput.html.images -V nochunks -V %generate-article-toc%  -c /tmp/doc/en_US.ISO8859-1/articles/committers-guide/../../../en_US.ISO8859-1/share/sgml/catalog -c /tmp/doc/en_US.ISO8859-1/articles/committers-guide/../../../share/sgml/catalog -c /usr/local/share/sgml/docbook/dsssl/modular/catalog -c /usr/local/share/sgml/docbook/catalog -c /usr/local/share/sgml/jade/catalog  -d /tmp/doc/en_US.ISO8859-1/articles/committers-guide/../../../share/sgml/default.dsl -t sgml /tmp/doc/en_US.ISO8859-1/articles/committers-guide/article.sgml > article.html || (rm -f article.html && false)
tidy -i -m -f /dev/null  article.html
*** Error code 1 (ignored)
===> en_US.ISO8859-1/articles/console-server
sgmlnorm -c /usr/local/share/sgml/html/catalog article.sgml > article.html
sgmlnorm:E: cannot open "article.sgml" (No such file or directory)
*** Error code 1

Stop in /tmp/doc/en_US.ISO8859-1/articles/console-server.
*** Error code 1

Stop in /tmp/doc/en_US.ISO8859-1/articles.
*** Error code 1

Stop in /tmp/doc/en_US.ISO8859-1.
*** Error code 1

Stop in /tmp/doc.
--- make log after make obj ---

>How-To-Repeat:
1. Checkout doc module
  % cvs -d /home/ncvs co doc -P
2. Run `make obj'
  % cd doc
  % make DOC_LANG= obj
3. Run `make'
  % make DOC_LANG=

>Fix:
Following patch is my quick hack to make doc module in OBJDIR(/usr/obj).
--- quick hack ---
Index: share/mk/doc.docbook.mk
===================================================================
RCS file: /CVSrepository/FreeBSD/doc/share/mk/doc.docbook.mk,v
retrieving revision 1.51
diff -d -u -r1.51 doc.docbook.mk
--- share/mk/doc.docbook.mk	2001/10/04 09:40:09	1.51
+++ share/mk/doc.docbook.mk	2001/10/06 12:32:52
@@ -126,6 +126,8 @@
 KNOWN_FORMATS=	html html.tar html-split html-split.tar txt rtf ps pdf tex dvi tar pdb
 
 CSS_SHEET?=	${DOC_PREFIX}/share/misc/docbook.css
+CSS_SHEET:=	${.CURDIR}/${CSS_SHEET}
+CSS_SHEET:=	${CSS_SHEET:C/.*\/\//\//g}
 
 PRINTOPTS?=    -ioutput.print
 
@@ -298,7 +300,7 @@
 all: ${_docs}
 
 index.html HTML.manifest: ${SRCS} ${LOCAL_IMAGES_LIB} ${IMAGES_PNG} ${INDEX_SGML} ${HTML_SPLIT_INDEX} docbook.css
-	${JADE} -V html-manifest -ioutput.html -ioutput.html.images ${JADEOPTS} -d ${DSLHTML} -t sgml ${MASTERDOC}
+	${JADE} -D`dirname ${.TARGET}` -V html-manifest -ioutput.html -ioutput.html.images ${JADEOPTS} -d ${DSLHTML} -t sgml ${MASTERDOC}
 .if !defined(NO_TIDY)
 	-tidy -i -m -f /dev/null ${TIDYFLAGS} `xargs < HTML.manifest`
 .endif
@@ -407,11 +409,11 @@
 .endif
 
 ${HTML_INDEX}:
-	${JADE} -V html-index -ioutput.html -ioutput.html.images -V nochunks ${JADEOPTS} -d ${DSLHTML} -t sgml ${MASTERDOC} > /dev/null
+	${JADE} -D`dirname ${.TARGET}` -V html-index -ioutput.html -ioutput.html.images -V nochunks ${JADEOPTS} -d ${DSLHTML} -t sgml ${MASTERDOC} > /dev/null
 	perl ${PREFIX}/share/sgml/docbook/dsssl/modular/bin/collateindex.pl -g -o ${INDEX_SGML} ${.TARGET}
 
 ${HTML_SPLIT_INDEX}:
-	${JADE} -V html-index -ioutput.html -ioutput.html.images ${JADEOPTS} -d ${DSLHTML} -t sgml ${MASTERDOC} > /dev/null
+	${JADE} -D`dirname ${.TARGET}` -V html-index -ioutput.html -ioutput.html.images ${JADEOPTS} -d ${DSLHTML} -t sgml ${MASTERDOC} > /dev/null
 	perl ${PREFIX}/share/sgml/docbook/dsssl/modular/bin/collateindex.pl -g -o ${INDEX_SGML} ${.TARGET}
 
 ${PRINT_INDEX}: ${HTML_INDEX}
@@ -613,4 +615,4 @@
 .endfor
 
 docbook.css: ${CSS_SHEET}
-	cp ${CSS_SHEET} ${.CURDIR}/docbook.css
+	cp ${CSS_SHEET} ${.TARGET}
Index: share/mk/doc.html.mk
===================================================================
RCS file: /CVSrepository/FreeBSD/doc/share/mk/doc.html.mk,v
retrieving revision 1.8
diff -d -u -r1.8 doc.html.mk
--- share/mk/doc.html.mk	2001/09/13 07:26:26	1.8
+++ share/mk/doc.html.mk	2001/10/18 07:54:16
@@ -116,7 +116,7 @@
 all: ${_docs}
 
 ${DOC}.html: ${SRCS} ${LOCAL_IMAGES_LIB} ${IMAGES_PNG} 
-	${SGMLNORM} -c ${HTMLCATALOG} ${SRCS} > ${.TARGET}
+	${SGMLNORM} -c ${HTMLCATALOG} ${MASTERDOC} > ${.TARGET}
 .if !defined(NO_TIDY)
 	-tidy -i -m -f /dev/null ${TIDYFLAGS} ${.TARGET}
 .endif
@@ -236,7 +236,7 @@
 install-${_cf}: ${DOC}.${_cf}
 	@[ -d ${DESTDIR} ] || mkdir -p ${DESTDIR}
 	${INSTALL_DOCS} ${.ALLSRC} ${DESTDIR}
-	${INSTALL_DOCS} ${CSS_SHEET} ${DESTDIR}
+	${INSTALL_DOCS} ${.CURDIR}/${CSS_SHEET} ${DESTDIR}
 .for _curimage in ${IMAGES_LIB}
 	@[ -d ${DESTDIR}/${LOCAL_IMAGES_LIB_DIR}/${_curimage:H} ] || mkdir -p ${DESTDIR}/${LOCAL_IMAGES_LIB_DIR}/${_curimage:H}
 	${INSTALL_DOCS} ${LOCAL_IMAGES_LIB_DIR}/${_curimage} ${DESTDIR}/${LOCAL_IMAGES_LIB_DIR}/${_curimage:H}
Index: share/mk/doc.images.mk
===================================================================
RCS file: /CVSrepository/FreeBSD/doc/share/mk/doc.images.mk,v
retrieving revision 1.11
diff -d -u -r1.11 doc.images.mk
--- share/mk/doc.images.mk	2001/08/14 21:51:03	1.11
+++ share/mk/doc.images.mk	2001/09/23 06:45:39
@@ -51,7 +51,11 @@
 IMAGES_GEN_EPS=${IMAGES:M*.png:S/.png$/.eps/}
 IMAGES_GEN_PDF=${IMAGES:M*.eps:S/.eps$/.pdf/}
 
-CLEANFILES+= ${IMAGES_GEN_PNG} ${IMAGES_GEN_EPS} ${IMAGES_GEN_PDF}
+CLEANFILES+= ${IMAGES_GEN_PNG} ${IMAGES_GEN_EPS} ${IMAGES_GEN_PDF} \
+	${IMAGES:M*.scr:S/.scr$/.png/} ${IMAGES:M*.scr:S/.scr$/.eps/}
+.if ${.CURDIR}!=${.OBJDIR}
+CLEANFILES+= ${IMAGES:M*.png} ${IMAGES:M*.eps}
+.endif
 
 IMAGES_PNG=${IMAGES:M*.png} ${IMAGES_GEN_PNG} ${IMAGES:M*.scr:S/.scr$/.png/}
 IMAGES_EPS=${IMAGES:M*.eps} ${IMAGES_GEN_EPS} ${IMAGES:M*.scr:S/.scr$/.eps/}
@@ -71,8 +75,10 @@
 .SUFFIXES:	.scr .png .eps
 
 .scr.png:
+	@mkdir -p `dirname ${.TARGET}`
 	scr2png < ${.IMPSRC} > ${.TARGET}
 .scr.eps:
+	@mkdir -p `dirname ${.TARGET}`
 	scr2png < ${.ALLSRC} | pngtopnm | pnmtops -noturn > ${.TARGET}
 
 # We can't use suffix rules to generate the rules to convert EPS to PNG and
@@ -80,18 +86,29 @@
 # vice versa, leading to a loop in the dependency graph.  Instead, build
 # the targets on the fly.
 
+.for _curimage in ${IMAGES:M*.png} ${IMAGES:M*.eps}
+.if ${.CURDIR}!=${.OBJDIR}
+${_curimage}: ${.CURDIR}/${_curimage}
+	@mkdir -p `dirname ${.TARGET}`
+	cp ${.ALLSRC} ${.TARGET}
+.endif
+.endfor
+
 .for _curimage in ${IMAGES_GEN_PNG}
 ${_curimage}: ${_curimage:S/.png$/.eps/}
+	@mkdir -p `dirname ${.TARGET}`
 	peps -r ${EPS2PNG_RES} -p -o ${.TARGET} ${.ALLSRC}
 .endfor
 
 .for _curimage in ${IMAGES_GEN_EPS}
 ${_curimage}: ${_curimage:S/.eps$/.png/}
+	@mkdir -p `dirname ${.TARGET}`
 	pngtopnm ${.ALLSRC} | pnmtops -noturn > ${.TARGET}
 .endfor
 
 .for _curimage in ${IMAGES_GEN_PDF}
 ${_curimage}: ${_curimage:S/.pdf$/.eps/}
+	@mkdir -p `dirname ${.TARGET}`
 	epstopdf --outfile=${.TARGET} ${_curimage:S/.pdf$/.eps/}
 .endfor
 
--- quick hack ---
>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?20011018093127.38936.qmail>