Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 29 Aug 1999 23:08:07 +0900
From:      Jun Kuriyama <kuriyama@sky.rim.or.jp>
To:        Nik Clayton <nik@freebsd.org>
Cc:        Documentation Team <freebsd-doc@freebsd.org>
Subject:   More safer 'cd's?
Message-ID:  <14281.16071.926203.50116H@localhost.sky.rim.or.jp>

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

When I test building documentations in "English and Japanese" only
environment, I sometimes failed because not to set WEB_LANG like
environment variables.

Can you accept patches like this to change directories more safely?

-----
Index: web.mk
===================================================================
RCS file: /home/ncvs/www/en/web.mk,v
retrieving revision 1.21
diff -u -r1.21 web.mk
--- web.mk	1999/08/19 20:40:26	1.21
+++ web.mk	1999/08/29 13:55:34
@@ -173,14 +173,14 @@
 .if defined(SUBDIR) && !empty(SUBDIR)
 	@for entry in ${SUBDIR}; do \
 		(${ECHODIR} "===> ${DIRPRFX}$$entry"; \
-		cd ${.CURDIR}/$${entry}; \
+		cd ${.CURDIR}/$${entry} && \
 		${MAKE} ${.TARGET:S/realinstall/install/:S/.depend/depend/} DIRPRFX=${DIRPRFX}$$entry/); \
 	done
 .endif
 .if defined(DOCSUBDIR) && !empty(DOCSUBDIR)
 	@for entry in ${DOCSUBDIR}; do \
 		(${ECHODIR} "===> ${DIRPRFX}$$entry"; \
-		cd ${.CURDIR}/$${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 \
Index: FAQ/Makefile
===================================================================
RCS file: /home/ncvs/www/en/FAQ/Makefile,v
retrieving revision 1.1
diff -u -r1.1 Makefile
--- Makefile	1999/08/19 20:45:50	1.1
+++ Makefile	1999/08/28 02:19:30
@@ -5,7 +5,7 @@
 # in to the right place as necessary.
 
 all install clean:
-	(cd ../../../doc/en_US.ISO_8859-1/books/faq; make 'FORMATS=html-split html' DESTDIR=${DESTDIR}/data/FAQ ${.TARGET})
+	(cd ../../../doc/en_US.ISO_8859-1/books/faq && make 'FORMATS=html-split html' DESTDIR=${DESTDIR}/data/FAQ ${.TARGET})
 .if make(install)
 	(cd ${DESTDIR}/data/FAQ; ln -sf index.html FAQ.html)
 .endif
Index: handbook/Makefile
===================================================================
RCS file: /home/ncvs/www/en/handbook/Makefile,v
retrieving revision 1.2
diff -u -r1.2 Makefile
--- Makefile	1999/08/19 20:40:58	1.2
+++ Makefile	1999/08/28 02:19:53
@@ -15,4 +15,4 @@
 #
 
 all install clean:
-	(cd ../../../doc/en_US.ISO_8859-1/books/handbook; make FORMATS=html-split DESTDIR=${DESTDIR}/data/handbook ${.TARGET})
+	(cd ../../../doc/en_US.ISO_8859-1/books/handbook && make FORMATS=html-split DESTDIR=${DESTDIR}/data/handbook ${.TARGET})
Index: tutorials/Makefile
===================================================================
RCS file: /home/ncvs/www/en/tutorials/Makefile,v
retrieving revision 1.1
diff -u -r1.1 Makefile
--- Makefile	1999/08/19 20:49:29	1.1
+++ Makefile	1999/08/28 02:20:19
@@ -7,7 +7,7 @@
 DOCS = index.sgml
 
 all afterinstall clean: index.html
-	(cd ../../../doc/en_US.ISO_8859-1/articles; make 'FORMATS=html html-split' 'DESTDIR=${DESTDIR}/data/tutorials/$${.CURDIR:T}' ${.TARGET:S/afterinstall/install/})
-	(cd ../../../doc/en_US.ISO_8859-1/books/fdp-primer; make 'FORMATS=html html-split' DESTDIR=${DESTDIR}/data/tutorials/docproj-primer ${.TARGET:S/afterinstall/install/})
+	(cd ../../../doc/en_US.ISO_8859-1/articles && make 'FORMATS=html html-split' 'DESTDIR=${DESTDIR}/data/tutorials/$${.CURDIR:T}' ${.TARGET:S/afterinstall/install/})
+	(cd ../../../doc/en_US.ISO_8859-1/books/fdp-primer && make 'FORMATS=html html-split' DESTDIR=${DESTDIR}/data/tutorials/docproj-primer ${.TARGET:S/afterinstall/install/})
 
 .include "../web.mk"
-----

Jun Kuriyama // kuriyama@sky.rim.or.jp
            // kuriyama@FreeBSD.ORG


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?14281.16071.926203.50116H>