From amorita@misao.kuicr.kyoto-u.ac.jp  Thu Oct 18 02:31:30 2001
Return-Path: <amorita@misao.kuicr.kyoto-u.ac.jp>
Received: from misao.kuicr.kyoto-u.ac.jp (misao.kuicr.kyoto-u.ac.jp [133.3.28.70])
	by hub.freebsd.org (Postfix) with SMTP id 2CF1B37B405
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 18 Oct 2001 02:31:29 -0700 (PDT)
Received: (qmail 38937 invoked by uid 1000); 18 Oct 2001 18:31:27 +0900
Message-Id: <20011018093127.38936.qmail@misao.kuicr.kyoto-u.ac.jp>
Date: 18 Oct 2001 18:31:27 +0900
From: Akio Morita <amorita@FreeBSD.org>
Reply-To: Akio Morita <amorita@FreeBSD.org>
To: FreeBSD-gnats-submit@freebsd.org
Subject: make of doc module fails after 'make obj'
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         31350
>Category:       docs
>Synopsis:       make of doc module fails after 'make obj'
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-doc
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Oct 18 02:40:01 PDT 2001
>Closed-Date:    Mon Nov 19 00:32:09 PST 2001
>Last-Modified:  Mon Nov 19 00:32:45 PST 2001
>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:

From: Cyrille Lefevre <clefevre@citeweb.net>
To: Akio Morita <amorita@freebsd.org>
Cc: FreeBSD-gnats-submit@freebsd.org
Subject: Re: docs/31350: make of doc module fails after 'make obj'
Date: Thu, 18 Oct 2001 15:51:58 +0200 (CEST)

 Akio Morita wrote:
 > 
 > >Number:         31350
 > >Category:       docs
 > >Synopsis:       make of doc module fails after 'make obj'
 
 Hi,
 
 you are duplicating the job I'm doing.  see PR #31131 for details.
 
 http://www.FreeBSD.org/cgi/query-pr.cgi?pr=31131
 
 unfortunatelly, the PR I've submitted is still incomplete but I've
 a complete one right now that I'll submit w/in a few hours.
 
 >  CSS_SHEET?=	${DOC_PREFIX}/share/misc/docbook.css
 > +CSS_SHEET:=	${.CURDIR}/${CSS_SHEET}
 > +CSS_SHEET:=	${CSS_SHEET:C/.*\/\//\//g}
 
 as I know, :C isn't portable between releases.
 
 does this patch set is `make package' compatible ?
 how about .tar archives ?
 
 Cyrille.
 -- 
 Cyrille Lefevre                 mailto:clefevre@citeweb.net

From: Akio Morita <amorita@meadow.scphys.kyoto-u.ac.jp>
To: clefevre@citeweb.net
Cc: FreeBSD-gnats-submit@freebsd.org
Subject: Re: docs/31350: make of doc module fails after 'make obj'
Date: 19 Oct 2001 14:46:20 +0900

 Cyrille wrote:
 
 >Akio Morita wrote:
 >> 
 >> >Number:         31350
 >> >Category:       docs
 >> >Synopsis:       make of doc module fails after 'make obj'
 >
 >Hi,
 >
 >you are duplicating the job I'm doing.  see PR #31131 for details.
 >
 (snip)
 >
 >does this patch set is `make package' compatible ?
 >how about .tar archives ?
 >
 Last night, I tested package target.
 In this test, I found erratas of package rule generation in doc.docbook.mk.
 I made a following errata fix.
    i. Correct typo (doc.docbook.mk)
   ii. Correct docbook.css insertion to PLIST (doc.docbook.mk)
  iii. Add ${CSS_SHEET} and images to PLIST (doc.html.mk)
       (en_US.ISO8859-1/articles/console-server needs this)
 
 With following patch, package target of my patch set (PR:31350)
 seems to work fine.
 
 Results of `make package' in doc directory.
 o doc/packages exists
 Whole packages (*.tgz archive) are stored into doc/packages directory.
 
 o otherwise
 Each package is stored into its source directory.
 Ex) package `committers-guide.en_US.ISO8859-1.html.tgz' is stored
     into doc/en_US.ISO8859-1/articles/committers-guide directory.
 
 --- errata fix ---
 --- share/mk/doc.docbook.mk.OLD	Fri Oct 19 14:25:51 2001
 +++ share/mk/doc.docbook.mk	Fri Oct 19 14:26:46 2001
 @@ -591,16 +591,16 @@
  .if ${_cf} == "html-split"
  package-${_curformat}: index.html
  	@cp HTML.manifest PLIST
 +	echo docbook.css >> PLIST
  	@for images_png in ${IMAGES_PNG}; do \
  		echo $$images_png >> PLIST; \
 -		echo docbook.css >> PLIST; \
  	done
  .elif ${_cf} == "html"
 -package-${curformat}: ${DOC}.html
 +package-${_curformat}: ${DOC}.html
  	@echo ${DOC}.${_curformat} > PLIST
 +	echo docbook.css >> PLIST
  	@for images_png in ${IMAGES_PNG}; do \
  		echo $$images_png >> PLIST; \
 -		echo docbook.css >> PLIST; \
  	done
  .else
  package-${_curformat}: ${DOC}.${_curformat}
 --- share/mk/doc.html.mk.OLD	Fri Oct 19 14:28:58 2001
 +++ share/mk/doc.html.mk	Fri Oct 19 14:37:14 2001
 @@ -304,6 +304,12 @@
  _cf=${_curformat}
  package-${_curformat}: install-${_curformat}
  	@echo ${DOC}.${_curformat} > PLIST
 +.if defined(CSS_SHEET)
 +	@echo ${CSS_SHEET} >> PLIST
 +.endif
 +	@for images_png in ${IMAGES_PNG}; do \
 +		echo $$images_png >> PLIST; \
 +	done
  	@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
 --- errata fix ---
 
 --
 Akio Morita
    E-mail:  amorita@FreeBSD.org

From: Cyrille Lefevre <clefevre@citeweb.net>
To: Akio Morita <amorita@meadow.scphys.kyoto-u.ac.jp>
Cc: FreeBSD-gnats-submit@freebsd.org
Subject: Re: docs/31350: make of doc module fails after 'make obj'
Date: Fri, 19 Oct 2001 22:52:15 +0200 (CEST)

 Akio Morita wrote:
 > Cyrille wrote:
 > 
 > >Akio Morita wrote:
 > >> 
 > >> >Number:         31350
 > >> >Category:       docs
 > >> >Synopsis:       make of doc module fails after 'make obj'
 > >
 > >you are duplicating the job I'm doing.  see PR #31131 for details.
 > >
 > (snip)
 > >
 > >does this patch set is `make package' compatible ?
 > >how about .tar archives ?
 > >
 > Last night, I tested package target.
 > In this test, I found erratas of package rule generation in doc.docbook.mk.
 > I made a following errata fix.
 >    i. Correct typo (doc.docbook.mk)
 >   ii. Correct docbook.css insertion to PLIST (doc.docbook.mk)
 >  iii. Add ${CSS_SHEET} and images to PLIST (doc.html.mk)
 >       (en_US.ISO8859-1/articles/console-server needs this)
 > 
 > With following patch, package target of my patch set (PR:31350)
 > seems to work fine.
 
 sorry, but it doesn't.
 
 root@gits:vm-design/ (ttyp1) [22:38:02-11]# make package
 Creating package /usr/tmp/doc/en_US.ISO8859-1/articles/vm-design/vm-design.en_US.ISO8859-1.txt.tgz
 Using SrcDir value of .
 Creating gzip'd tar ball in '/usr/tmp/doc/en_US.ISO8859-1/articles/vm-design/vm-design.en_US.ISO8859-1.txt.tgz'
 tar: Can't change to directory /usr/share/doc/en_US.ISO8859-1/articles/vm-design : No such file or directory
 tar: can't add file article.txt : No such file or directory
 pkg_create: make_dist: tar command failed with code 256
 *** Error code 2
 
 Stop in /usr/tmp/doc/en_US.ISO8859-1/articles/vm-design.
 
 root@gits:vm-design/ (ttypa) [22:40:46-51]# make FORMATS=html\ html-split package
 echo docbook.css >> PLIST
 Creating package /usr/tmp/doc/en_US.ISO8859-1/articles/vm-design/vm-design.en_US.ISO8859-1.html.tgz
 Using SrcDir value of .
 Creating gzip'd tar ball in '/usr/tmp/doc/en_US.ISO8859-1/articles/vm-design/vm-design.en_US.ISO8859-1.html.tgz'
 tar: Can't change to directory /usr/share/doc/en_US.ISO8859-1/articles/vm-design : No such file or directory
 tar: can't add file article.html : No such file or directory
 tar: can't add file docbook.css : No such file or directory
 tar: can't add file fig1.png : No such file or directory
 tar: can't add file fig2.png : No such file or directory
 tar: can't add file fig3.png : No such file or directory
 tar: can't add file fig4.png : No such file or directory
 pkg_create: make_dist: tar command failed with code 256
 *** Error code 2
 
 Stop in /usr/tmp/doc/en_US.ISO8859-1/articles/vm-design.
 
 > Results of `make package' in doc directory.
 > o doc/packages exists
 > Whole packages (*.tgz archive) are stored into doc/packages directory.
 > 
 > o otherwise
 > Each package is stored into its source directory.
 > Ex) package `committers-guide.en_US.ISO8859-1.html.tgz' is stored
 >     into doc/en_US.ISO8859-1/articles/committers-guide directory.
 
 IMHO, they should go to /usr/obj/... if you consider that /usr/doc
 is read-only mounted.
 
 > --- errata fix ---
 > --- share/mk/doc.docbook.mk.OLD	Fri Oct 19 14:25:51 2001
 > +++ share/mk/doc.docbook.mk	Fri Oct 19 14:26:46 2001
 > @@ -591,16 +591,16 @@
 >  .if ${_cf} == "html-split"
 >  package-${_curformat}: index.html
 >  	@cp HTML.manifest PLIST
 > +	echo docbook.css >> PLIST
 >  	@for images_png in ${IMAGES_PNG}; do \
 >  		echo $$images_png >> PLIST; \
 > -		echo docbook.css >> PLIST; \
 >  	done
 >  .elif ${_cf} == "html"
 > -package-${curformat}: ${DOC}.html
 > +package-${_curformat}: ${DOC}.html
 >  	@echo ${DOC}.${_curformat} > PLIST
 > +	echo docbook.css >> PLIST
 >  	@for images_png in ${IMAGES_PNG}; do \
 >  		echo $$images_png >> PLIST; \
 > -		echo docbook.css >> PLIST; \
 >  	done
 >  .else
 >  package-${_curformat}: ${DOC}.${_curformat}
 > --- share/mk/doc.html.mk.OLD	Fri Oct 19 14:28:58 2001
 > +++ share/mk/doc.html.mk	Fri Oct 19 14:37:14 2001
 > @@ -304,6 +304,12 @@
 >  _cf=${_curformat}
 >  package-${_curformat}: install-${_curformat}
 >  	@echo ${DOC}.${_curformat} > PLIST
 > +.if defined(CSS_SHEET)
 > +	@echo ${CSS_SHEET} >> PLIST
 
 this is wrong :
 
 root@gits:vm-design/ (ttypa) [22:45:25-57]# make -V CSS_SHEET
 /usr/tmp/doc/en_US.ISO8859-1/articles/vm-design/../../../share/misc/docbook.css
 
 > +.endif
 > +	@for images_png in ${IMAGES_PNG}; do \
 > +		echo $$images_png >> PLIST; \
 > +	done
 >  	@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
 
 did you try PR #31131 which exactly cover the same subject w/ some
 cleanup ?
 
 Cyrille.
 -- 
 Cyrille Lefevre                 mailto:clefevre@citeweb.net

From: Akio Morita <amorita@meadow.scphys.kyoto-u.ac.jp>
To: FreeBSD-gnats-submit@freebsd.org
Cc: clefevre@citeweb.net
Subject: Re: docs/31350: make of doc module fails after 'make obj'
Date: 20 Oct 2001 17:56:33 +0900

 Cyrille wrote:
 
 >Akio Morita wrote:
 >> Cyrille wrote:
 >> 
 >> >Akio Morita wrote:
 >> >> 
 >> >> >Number:         31350
 >> >> >Category:       docs
 >> >> >Synopsis:       make of doc module fails after 'make obj'
 >> >
 >> >you are duplicating the job I'm doing.  see PR #31131 for details.
 >> >
 >> (snip)
 >> >
 >> >does this patch set is `make package' compatible ?
 >> >how about .tar archives ?
 >> >
 >> Last night, I tested package target.
 >> In this test, I found erratas of package rule generation in doc.docbook.mk.
 >> I made a following errata fix.
 >>    i. Correct typo (doc.docbook.mk)
 >>   ii. Correct docbook.css insertion to PLIST (doc.docbook.mk)
 >>  iii. Add ${CSS_SHEET} and images to PLIST (doc.html.mk)
 >>       (en_US.ISO8859-1/articles/console-server needs this)
 >> 
 >> With following patch, package target of my patch set (PR:31350)
 >> seems to work fine.
 >
 >sorry, but it doesn't.
 >
 >root@gits:vm-design/ (ttyp1) [22:38:02-11]# make package
 >Creating package /usr/tmp/doc/en_US.ISO8859-1/articles/vm-design/vm-design.en_US.ISO8859-1.txt.tgz
 >Using SrcDir value of .
 >Creating gzip'd tar ball in '/usr/tmp/doc/en_US.ISO8859-1/articles/vm-design/vm-design.en_US.ISO8859-1.txt.tgz'
 >tar: Can't change to directory /usr/share/doc/en_US.ISO8859-1/articles/vm-design : No such file or directory
 >tar: can't add file article.txt : No such file or directory
 >pkg_create: make_dist: tar command failed with code 256
 >*** Error code 2
 >
 >Stop in /usr/tmp/doc/en_US.ISO8859-1/articles/vm-design.
 >
 I can't reproduce your failure.
 FORMATS in en_US.ISO8859-1/articles/vm-design/Makefile is html.
 Therefore package taget requests only package-html target.
 
 Thus I try `make FORMATS=txt package' under my patch set
 and get following results.
 
 --- logs ---
 % cd /usr/doc/en_US.ISO8859-1/articles/vm-design
 % make FORMATS=txt
 touch index.sgml
 /usr/local/bin/jade -ioutput.html -V nochunks   -c /usr/SRC/doc/en_US.ISO8859-1/articles/vm-design/../../../en_US.ISO8859-1/share/sgml/catalog -c /usr/SRC/doc/en_US.ISO8859-1/articles/vm-design/../../../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 /usr/SRC/doc/en_US.ISO8859-1/articles/vm-design/../../../share/sgml/default.dsl -t sgml /usr/SRC/doc/en_US.ISO8859-1/articles/vm-design/article.sgml >  article.html-text || (rm -f article.html-text && false)
 links -dump article.html-text > article.txt
 gzip -9 -c article.txt > article.txt.gz
 % su
 # make FORMATS=txt install
 install -C  -o root -g wheel -m 444 article.txt.gz /usr/share/doc/en_US.ISO8859-1/articles/vm-design
 install -C  -o root -g wheel -m 444 article.txt /usr/share/doc/en_US.ISO8859-1/articles/vm-design
 # make FORMATS=txt PACKAGES=/tmp package
 Creating package /tmp/vm-design.en_US.ISO8859-1.txt.tgz
 Using SrcDir value of .
 Creating gzip'd tar ball in '/tmp/vm-design.en_US.ISO8859-1.txt.tgz'
 # tar ztvf /tmp/vm-design.en_US.ISO8859-1.txt.tgz
 -rw-r--r-- root/wheel      151  10/20 16:01 2001 +CONTENTS
 -rw-r--r-- root/wheel       25  10/20 16:01 2001 +COMMENT
 -rw-r--r-- root/wheel       25  10/20 16:01 2001 +DESC
 -r--r--r-- root/wheel    42236  10/20 15:57 2001 article.txt
 --- logs ---
 
 >root@gits:vm-design/ (ttypa) [22:40:46-51]# make FORMATS=html\ html-split package
 >echo docbook.css >> PLIST
 >Creating package /usr/tmp/doc/en_US.ISO8859-1/articles/vm-design/vm-design.en_US.ISO8859-1.html.tgz
 >Using SrcDir value of .
 >Creating gzip'd tar ball in '/usr/tmp/doc/en_US.ISO8859-1/articles/vm-design/vm-design.en_US.ISO8859-1.html.tgz'
 >tar: Can't change to directory /usr/share/doc/en_US.ISO8859-1/articles/vm-design : No such file or directory
 >tar: can't add file article.html : No such file or directory
 >tar: can't add file docbook.css : No such file or directory
 >tar: can't add file fig1.png : No such file or directory
 >tar: can't add file fig2.png : No such file or directory
 >tar: can't add file fig3.png : No such file or directory
 >tar: can't add file fig4.png : No such file or directory
 >pkg_create: make_dist: tar command failed with code 256
 >*** Error code 2
 >
 >Stop in /usr/tmp/doc/en_US.ISO8859-1/articles/vm-design.
 >
 I try html and html-split package build under my patch set
 and get following results.
 
 It seems that you forgot to run `make install'.
 
 --- logs ---
 % cd /usr/doc/en_US.ISO8859-1/articles/vm-design
 % make FORMATS=html\ html-split
 cp /usr/SRC/doc/en_US.ISO8859-1/articles/vm-design/fig1.eps fig1.eps
 peps -r 100 -p -o fig1.png fig1.eps
 cp /usr/SRC/doc/en_US.ISO8859-1/articles/vm-design/fig2.eps fig2.eps
 peps -r 100 -p -o fig2.png fig2.eps
 cp /usr/SRC/doc/en_US.ISO8859-1/articles/vm-design/fig3.eps fig3.eps
 peps -r 100 -p -o fig3.png fig3.eps
 sasami% make FORMATS=html\ html-split
 cp /usr/SRC/doc/en_US.ISO8859-1/articles/vm-design/fig1.eps fig1.eps
 peps -r 100 -p -o fig1.png fig1.eps
 cp /usr/SRC/doc/en_US.ISO8859-1/articles/vm-design/fig2.eps fig2.eps
 peps -r 100 -p -o fig2.png fig2.eps
 cp /usr/SRC/doc/en_US.ISO8859-1/articles/vm-design/fig3.eps fig3.eps
 peps -r 100 -p -o fig3.png fig3.eps
 cp /usr/SRC/doc/en_US.ISO8859-1/articles/vm-design/fig4.eps fig4.eps
 peps -r 100 -p -o fig4.png fig4.eps
 touch index.sgml
 cp /usr/SRC/doc/en_US.ISO8859-1/articles/vm-design/../../../share/misc/docbook.css docbook.css
 /usr/local/bin/jade -ioutput.html -ioutput.html.images -V nochunks   -c /usr/SRC/doc/en_US.ISO8859-1/articles/vm-design/../../../en_US.ISO8859-1/share/sgml/catalog -c /usr/SRC/doc/en_US.ISO8859-1/articles/vm-design/../../../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 /usr/SRC/doc/en_US.ISO8859-1/articles/vm-design/../../../share/sgml/default.dsl -t sgml /usr/SRC/doc/en_US.ISO8859-1/articles/vm-d esign/article.sgml > article.html || (rm -f article.html && false)
 tidy -i -m -f /dev/null  article.html
 *** Error code 1 (ignored)
 /usr/local/bin/jade -D`dirname index.html` -V html-manifest -ioutput.html -ioutput.html.images   -c /usr/SRC/doc/en_US.ISO8859-1/articles/vm-design/../../../en_US.ISO8859-1/share/sgml/catalog -c /usr/SRC/doc/en_US.ISO8859-1/articles/vm-design/../../../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 /usr/SRC/doc/en_US.ISO8859-1/articles/vm-design/../../../share/sgml/default.dsl -t sgml /usr/SRC/doc/e n_US.ISO8859-1/articles/vm-design/article.sgml
 tidy -i -m -f /dev/null  `xargs < HTML.manifest`
 *** Error code 1 (ignored)
 % make FORMATS=html\ html-split install
 install -C  -o root -g wheel -m 444 article.html /usr/share/doc/en_US.ISO8859-1/articles/vm-design
 install -C  -o root -g wheel -m 444 docbook.css /usr/share/doc/en_US.ISO8859-1/articles/vm-design
 install -C  -o root -g wheel -m 444 fig1.png /usr/share/doc/en_US.ISO8859-1/articles/vm-design
 install -C  -o root -g wheel -m 444 fig2.png /usr/share/doc/en_US.ISO8859-1/articles/vm-design
 install -C  -o root -g wheel -m 444 fig3.png /usr/share/doc/en_US.ISO8859-1/articles/vm-design
 install -C  -o root -g wheel -m 444 fig4.png /usr/share/doc/en_US.ISO8859-1/articles/vm-design
 install -C  -o root -g wheel -m 444 `xargs < HTML.manifest` /usr/share/doc/en_US.ISO8859-1/articles/vm-design
 install -C  -o root -g wheel -m 444 docbook.css /usr/share/doc/en_US.ISO8859-1/articles/vm-design
 install -C  -o root -g wheel -m 444 fig1.png /usr/share/doc/en_US.ISO8859-1/articles/vm-design
 install -C  -o root -g wheel -m 444 fig2.png /usr/share/doc/en_US.ISO8859-1/articles/vm-design
 install -C  -o root -g wheel -m 444 fig3.png /usr/share/doc/en_US.ISO8859-1/articles/vm-design
 install -C  -o root -g wheel -m 444 fig4.png /usr/share/doc/en_US.ISO8859-1/articles/vm-design
 % make FORMATS=html\ html-split PACKAGES=/tmp package
 echo docbook.css >> PLIST
 Creating package /tmp/vm-design.en_US.ISO8859-1.html.tgz
 Using SrcDir value of .
 Creating gzip'd tar ball in '/tmp/vm-design.en_US.ISO8859-1.html.tgz'
 echo docbook.css >> PLIST
 Creating package /tmp/vm-design.en_US.ISO8859-1.html-split.tgz
 Using SrcDir value of .
 Creating gzip'd tar ball in '/tmp/vm-design.en_US.ISO8859-1.html-split.tgz'
 % tar ztvf /tmp/vm-design.en_US.ISO8859-1.html.tgz 
 -rw-r--r-- root/wheel      201  10/20 16:06 2001 +CONTENTS
 -rw-r--r-- root/wheel       26  10/20 16:06 2001 +COMMENT
 -rw-r--r-- root/wheel       26  10/20 16:06 2001 +DESC
 -r--r--r-- root/wheel    54082  10/18 17:56 2001 article.html
 -r--r--r-- root/wheel     2963   9/28 23:42 2001 docbook.css
 -r--r--r-- root/wheel      549   9/28 23:42 2001 fig1.png
 -r--r--r-- root/wheel      810   9/28 23:42 2001 fig2.png
 -r--r--r-- root/wheel     1196   9/28 23:42 2001 fig3.png
 -r--r--r-- root/wheel     1153   9/28 23:42 2001 fig4.png
 % tar ztvf /tmp/vm-design.en_US.ISO8859-1.html-split.tgz 
 -rw-r--r-- root/wheel      291  10/20 16:06 2001 +CONTENTS
 -rw-r--r-- root/wheel       32  10/20 16:06 2001 +COMMENT
 -rw-r--r-- root/wheel       32  10/20 16:06 2001 +DESC
 -r--r--r-- root/wheel     7733  10/20 16:06 2001 index.html
 -r--r--r-- root/wheel    11449  10/20 16:06 2001 x26.html
 -r--r--r-- root/wheel     5933  10/20 16:06 2001 x69.html
 -r--r--r-- root/wheel     8288  10/20 16:06 2001 x75.html
 -r--r--r-- root/wheel     5555  10/20 16:06 2001 x88.html
 -r--r--r-- root/wheel     5057  10/20 16:06 2001 x103.html
 -r--r--r-- root/wheel     4883  10/20 16:06 2001 x112.html
 -r--r--r-- root/wheel     3421  10/20 16:06 2001 x116.html
 -r--r--r-- root/wheel    21689  10/20 16:06 2001 x119.html
 -r--r--r-- root/wheel     2603  10/20 16:06 2001 ln14.html
 -r--r--r-- root/wheel     2963   9/28 23:42 2001 docbook.css
 -r--r--r-- root/wheel      549   9/28 23:42 2001 fig1.png
 -r--r--r-- root/wheel      810   9/28 23:42 2001 fig2.png
 -r--r--r-- root/wheel     1196   9/28 23:42 2001 fig3.png
 -r--r--r-- root/wheel     1153   9/28 23:42 2001 fig4.png
 --- logs ---
 
 >> Results of `make package' in doc directory.
 >> o doc/packages exists
 >> Whole packages (*.tgz archive) are stored into doc/packages directory.
 >> 
 >> o otherwise
 >> Each package is stored into its source directory.
 >> Ex) package `committers-guide.en_US.ISO8859-1.html.tgz' is stored
 >>     into doc/en_US.ISO8859-1/articles/committers-guide directory.
 >
 >IMHO, they should go to /usr/obj/... if you consider that /usr/doc
 >is read-only mounted.
 >
 In such case that /usr/doc is read-only mounted,
 I think that either using a symbolic-link (/usr/doc/packages)
 or setting PACKAGES is reasonable.
 
 I think that the package storage action that you recommend
 is incompatible to package target of ports.
 In my understanding, ports framework stores packages into
 either /usr/ports/packages or its source directory.
 
 >> --- errata fix ---
 (snip)
 >> --- share/mk/doc.html.mk.OLD	Fri Oct 19 14:28:58 2001
 >> +++ share/mk/doc.html.mk	Fri Oct 19 14:37:14 2001
 >> @@ -304,6 +304,12 @@
 >>  _cf=${_curformat}
 >>  package-${_curformat}: install-${_curformat}
 >>  	@echo ${DOC}.${_curformat} > PLIST
 >> +.if defined(CSS_SHEET)
 >> +	@echo ${CSS_SHEET} >> PLIST
 >
 >this is wrong :
 >
 >root@gits:vm-design/ (ttypa) [22:45:25-57]# make -V CSS_SHEET
 >/usr/tmp/doc/en_US.ISO8859-1/articles/vm-design/../../../share/misc/docbook.css
 >
 I don't think so.(but !empty(CSS_SHEET) will be more reasonable.)
 Loading doc.html.mk is depend on DOCFORMAT variable (see doc.project.mk).
 en_US.ISO8859-1/articles/vm-design/Makefile does not load doc.htmk.mk,
 because Makefile does not set DOCFORMAT variable and default value of
 DOCFORMAT in doc.project.mk is `docbook'.
 Currently, the Makefile that needs doc.htmk.mk is
 en_US.ISO8859-1/articles/console-server/Makefile only.
 Its Makefile selects local CSS_SHEET.
 
 --- fix ---
 --- share/mk/doc.html.mk.OLD	Sat Oct 20 17:32:08 2001
 +++ share/mk/doc.html.mk	Sat Oct 20 17:32:47 2001
 @@ -236,7 +236,9 @@
  install-${_cf}: ${DOC}.${_cf}
  	@[ -d ${DESTDIR} ] || mkdir -p ${DESTDIR}
  	${INSTALL_DOCS} ${.ALLSRC} ${DESTDIR}
 +.if !empty(CSS_SHEET)
  	${INSTALL_DOCS} ${.CURDIR}/${CSS_SHEET} ${DESTDIR}
 +.endif
  .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}
 @@ -304,7 +306,7 @@
  _cf=${_curformat}
  package-${_curformat}: install-${_curformat}
  	@echo ${DOC}.${_curformat} > PLIST
 -.if defined(CSS_SHEET)
 +.if !empty(CSS_SHEET)
  	@echo ${CSS_SHEET} >> PLIST
  .endif
  	@for images_png in ${IMAGES_PNG}; do \
 --- fix ---
 
 (snip)
 >did you try PR #31131 which exactly cover the same subject w/ some
 >cleanup ?
 >
 I try three patches in PR #31131.
 I apply patches by hand, because of tab-space conversion in PR.
 
 In my environment, it seemd that `make' failes without `make obj'.
 --- log ---
 % cd <somewhere>
 % cvs -d <mirror_repository> co doc
 <apply three patches in PR# 31131>
 % cd doc/en_US.ISO8859-1/articles/console-server
 % make
 Graph cycles through itgastyle.css
 
 gzip -qf -9 < article.html > article.html.gz
 cannot open article.html: no such file
 *** Error code 2
 
 Stop in /usr/local/.tmp/doc/en_US.ISO8859-1/articles/console-server.
 --- log ---
 
 And after `make obj', `make' and `make install' was worked, but
 `make package' failed.
 --- log ---
 % make obj 
 /usr/obj/usr/local/.tmp/doc/en_US.ISO8859-1/articles/console-server created for /usr/local/.tmp/doc/en_US.ISO8859-1/articles/console-server
 % make 
 /bin/cp -p /usr/local/.tmp/doc/en_US.ISO8859-1/articles/console-server/tk0231-9-1.png /usr/obj/usr/local/.tmp/doc/en_US.ISO8859-1/articles/console-server/tk0231-9-1.png
 /bin/cp -p /usr/local/.tmp/doc/en_US.ISO8859-1/articles/console-server/itgastyle.css /usr/obj/usr/local/.tmp/doc/en_US.ISO8859-1/articles/console-server/itgastyle.css
 /usr/local/bin/sgmlnorm -c /usr/local/share/sgml/html/catalog /usr/local/.tmp/doc/en_US.ISO8859-1/articles/console-server/article.sgml > article.html
 /usr/local/bin/tidy -i -m -f /dev/null article.html
 *** Error code 1 (ignored)
 gzip -qf -9 < article.html > article.html.gz
 % make install
 install -c  -o root -g wheel -m 444 article.html.gz /usr/share/doc/en_US.ISO8859-1/articles/console-server
 install -c  -o root -g wheel -m 444 article.html /usr/share/doc/en_US.ISO8859-1/articles/console-server
 install -c  -o root -g wheel -m 444 itgastyle.css /usr/share/doc/en_US.ISO8859-1/articles/console-server
 install -c  -o root -g wheel -m 444 /usr/local/.tmp/doc/en_US.ISO8859-1/articles/console-server/tk0231-9-1.png /usr/share/doc/en_US.ISO8859-1/articles/console-server
 % make package
 article.html: not found
 *** Error code 127
 
 Stop in /usr/local/.tmp/doc/en_US.ISO8859-1/articles/console-server.
 --- log ---
State-Changed-From-To: open->feedback 
State-Changed-By: murray 
State-Changed-When: Mon Oct 29 03:04:46 PST 2001 
State-Changed-Why:  
Cryrille's patch has been committed (with some of your input I believe).  Does this solve all of the "make obj" related problems that you were experiencing? 


http://www.FreeBSD.org/cgi/query-pr.cgi?pr=31350 
State-Changed-From-To: feedback->closed 
State-Changed-By: murray 
State-Changed-When: Mon Nov 19 00:32:09 PST 2001 
State-Changed-Why:  
The submitter confirms that the problem has been solved.  Thanks to 
everyone who contributed to this PR! 


http://www.FreeBSD.org/cgi/query-pr.cgi?pr=31350 
>Unformatted:
