[Fusionforge-commits] r14095 - branches/Branch_5_1/src/docs/docbook

Olivier Berger olberger at fusionforge.org
Tue Aug 9 11:16:58 CEST 2011


Author: olberger
Date: 2011-08-09 11:16:58 +0200 (Tue, 09 Aug 2011)
New Revision: 14095

Modified:
   branches/Branch_5_1/src/docs/docbook/Makefile
   branches/Branch_5_1/src/docs/docbook/README
Log:
A bit more handy so that make debianhtml is done once and make then starts working

Modified: branches/Branch_5_1/src/docs/docbook/Makefile
===================================================================
--- branches/Branch_5_1/src/docs/docbook/Makefile	2011-08-05 11:42:15 UTC (rev 14094)
+++ branches/Branch_5_1/src/docs/docbook/Makefile	2011-08-09 09:16:58 UTC (rev 14095)
@@ -1,7 +1,10 @@
+
+#XSLTPROC = xsltproc -v
+XSLTPROC = xsltproc
 SRC = docbook/
 TARGET = build/
 XSL = xsl/
-DOCBOOK_XSL = ${XSL}docbook/
+DOCBOOK_XSL = ${XSL}docbook
 DB2LATEX_XSL = ${XSL}db2latex/
 XSLFOP = /usr/share/xml/docbook/stylesheet/docbook-xsl/fo/
 FOP = fop
@@ -19,13 +22,13 @@
 	#
 	@for book in ${BOOKS}; do \
 		echo '# . Generating HTML output for book '$$book; \
-		xsltproc --xinclude --output ${TARGET}$$book/$$book.plain.html ${XSL}book_html.xsl ${SRC}$$book.xml; \
+		$(XSLTPROC) --xinclude --output ${TARGET}$$book/$$book.plain.html ${XSL}book_html.xsl ${SRC}$$book.xml; \
 		tar -czf ${TARGET}$$book/$$book.plain.tar.gz ${TARGET}$$book/$$book.plain.html; \
 	done;
 
 	@for article in ${ARTICLES}; do \
 		echo '# . Generating HTML output for article '$$article; \
-		xsltproc --xinclude --output ${TARGET}$$article/$$article.plain.html ${XSL}article_html.xsl ${SRC}$$article/$$article.xml; \
+		$(XSLTPROC) --xinclude --output ${TARGET}$$article/$$article.plain.html ${XSL}article_html.xsl ${SRC}$$article/$$article.xml; \
 		tar -czf ${TARGET}$$article/$$article.plain.tar.gz ${TARGET}$$article/$$article.plain.html; \
 	done;
 	#
@@ -39,14 +42,14 @@
 	@for book in ${BOOKS}; do \
 		echo '# . Generating HTML chunked output for book '$$book; \
 		test -d ${TARGET}$$book/$$book || mkdir ${TARGET}$$book/$$book.chunk; \
-		xsltproc --xinclude --stringparam base.dir ${TARGET}$$book/$$book.chunk/ ${XSL}book_html_chunk.xsl ${SRC}$$book.xml ${DEVNULL}; \
+		$(XSLTPROC) --xinclude --stringparam base.dir ${TARGET}$$book/$$book.chunk/ ${XSL}book_html_chunk.xsl ${SRC}$$book.xml ${DEVNULL}; \
 		tar -czf ${TARGET}$$book/$$book.chunk.tar.gz ${TARGET}$$book/$$book.chunk; \
 	done;
 
 	@for article in ${ARTICLES}; do \
 		echo '# . Generating HTML chunked output for article '$$article; \
 		test -d ${TARGET}$$article/$$article || mkdir ${TARGET}$$article/$$article.chunk; \
-		xsltproc --xinclude --stringparam base.dir ${TARGET}$$article/$$article.chunk/ ${XSL}article_html_chunk.xsl ${SRC}$$article/$$article.xml ${DEVNULL}; \
+		$(XSLTPROC) --xinclude --stringparam base.dir ${TARGET}$$article/$$article.chunk/ ${XSL}article_html_chunk.xsl ${SRC}$$article/$$article.xml ${DEVNULL}; \
 		tar -czf ${TARGET}$$article/$$article.chunk.tar.gz ${TARGET}$$article/$$article.chunk; \
 	done;
 	#
@@ -57,7 +60,7 @@
 # and saved in /usr/share/gforge/www/help/guide/
 html-guide: $(SRC)/user_guide/user_guide.xml
 	rm -f guide/ug_* guide/bk*
-	xsltproc --xinclude --stringparam use.id.as.filename 1 --stringparam chunk.section.depth 2 --stringparam chunker.output.indent yes --stringparam chunker.output.encoding UTF-8 --stringparam base.dir guide/ --stringparam html.stylesheet docbook.css ${XSL}article_html_chunk.xsl $<
+	$(XSLTPROC) --xinclude --stringparam use.id.as.filename 1 --stringparam chunk.section.depth 2 --stringparam chunker.output.indent yes --stringparam chunker.output.encoding UTF-8 --stringparam base.dir guide/ --stringparam html.stylesheet docbook.css ${XSL}article_html_chunk.xsl $<
 	cp css/docbook.css guide/docbook.css
 #	rm -f guide/images/*
 #	cp -p images/* guide/images/
@@ -71,13 +74,13 @@
 	#$(FOP) -fo tmp.fo -pdf help_guide/user_guide.pdf
 	@for book in ${BOOKS}; do \
 		echo '# . Generating PDF output for book '$$book; \
-		xsltproc --xinclude --output ${TARGET}$$book/$$book.fo ${XSLFOP}docbook.xsl ${SRC}$$book.xml ${DEVNULL}; \
+		$(XSLTPROC) --xinclude --output ${TARGET}$$book/$$book.fo ${XSLFOP}docbook.xsl ${SRC}$$book.xml ${DEVNULL}; \
 		(cd ${TARGET}$$book; $(FOP) -fo $$book.fo -pdf $$book.pdf ${DEVNULL};); \
 	done;
 
 	@for article in ${ARTICLES}; do \
 		echo '# . Generating PDF output for article '$$article; \
-		xsltproc --xinclude --output ${TARGET}$$article/$$article.fo ${XSLFOP}docbook.xsl ${SRC}$$article/$$article.xml ${DEVNULL}; \
+		$(XSLTPROC) --xinclude --output ${TARGET}$$article/$$article.fo ${XSLFOP}docbook.xsl ${SRC}$$article/$$article.xml ${DEVNULL}; \
 		(cd ${TARGET}$$article; $(FOP) -fo $$article.fo -pdf $$article.pdf ${DEVNULL};); \
 	done;
 	#
@@ -90,7 +93,7 @@
 	#
 	@for book in ${BOOKS}; do \
 		echo '# . Generating PDF output for book '$$book; \
-		xsltproc --xinclude --output ${TARGET}$$book/$$book.tex ${XSL}book_pdf.xsl ${SRC}$$book.xml ${DEVNULL}; \
+		$(XSLTPROC) --xinclude --output ${TARGET}$$book/$$book.tex ${XSL}book_pdf.xsl ${SRC}$$book.xml ${DEVNULL}; \
 		(cd ${TARGET}$$book; pdflatex -interaction=batchmode $$book.tex ${DEVNULL};); \
 		(cd ${TARGET}$$book; pdflatex -interaction=batchmode $$book.tex ${DEVNULL};); \
 		(cd ${TARGET}$$book; pdflatex -interaction=batchmode $$book.tex ${DEVNULL};); \
@@ -99,7 +102,7 @@
 
 	@for article in ${ARTICLES}; do \
 		echo '# . Generating PDF output for article '$$article; \
-		xsltproc --xinclude --output ${TARGET}$$article/$$article.tex ${XSL}article_pdf.xsl ${SRC}$$article/$$article.xml ${DEVNULL}; \
+		$(XSLTPROC) --xinclude --output ${TARGET}$$article/$$article.tex ${XSL}article_pdf.xsl ${SRC}$$article/$$article.xml ${DEVNULL}; \
 		(cd ${TARGET}$$article; pdflatex -interaction=batchmode $$article.tex ${DEVNULL};); \
 		(cd ${TARGET}$$article; pdflatex -interaction=batchmode $$article.tex ${DEVNULL};); \
 		(cd ${TARGET}$$article; pdflatex -interaction=batchmode $$article.tex ${DEVNULL};); \
@@ -158,20 +161,35 @@
 	# Cleaning build environment
 	#
 	@-rm -rf $(TARGET)*
+	@-rm -rf guide/
 	# Done
 	##
+
+clobber: clean
+	##
+	# Hard cleaning build environment
+	#
 	@[ -L xsl/docbook ] && rm xsl/docbook || true
 	@[ -L xsl/db2latex/xsl ] && rm xsl/db2latex/xsl || true
 	@[ -d xsl/db2latex ] && rmdir xsl/db2latex || true
+	# Done
+	##
 
-
 debian: debianhtml debianpdf
 
 debianhtml:
 	@echo "=====> Intalling necessary packages"
 	@sudo apt-get install docbook-xml docbook-xsl libxml2-utils xsltproc
 	@echo "=====> Link to docbook"
-	@[ ! -L xsl/docbook ] && ln -s /usr/share/xml/docbook/stylesheet/nwalsh xsl/docbook || echo "docbook link already done"
+	@if [ ! -L $(DOCBOOK_XSL) ]; then \
+		if [ -d /usr/share/xml/docbook/stylesheet/nwalsh ]; then \
+			ln -s /usr/share/xml/docbook/stylesheet/nwalsh $(DOCBOOK_XSL) ; \
+		elif [ -d /usr/share/xml/docbook/stylesheet/docbook-xsl ]; then \
+			ln -s /usr/share/xml/docbook/stylesheet/docbook-xsl $(DOCBOOK_XSL) ; \
+		fi; \
+	else \
+		echo "docbook link already done" ; \
+	fi
 	@make html
 
 debianpdfold:

Modified: branches/Branch_5_1/src/docs/docbook/README
===================================================================
--- branches/Branch_5_1/src/docs/docbook/README	2011-08-05 11:42:15 UTC (rev 14094)
+++ branches/Branch_5_1/src/docs/docbook/README	2011-08-09 09:16:58 UTC (rev 14095)
@@ -1,7 +1,15 @@
 build/		:	where generated documents will be put
+guide/		:	same
 docbook/	:	docbook sources
 xsl/		:	xsl stylesheets
 xsl/db2latex	:	link to db2latex stylesheets
 xsl/docbook	:	link to docbook stylesheets
 
 Please DO NOT generate docs in your local CVS tree.
+
+Note to Debian users : you may need to issue :
+ $ make debianhtml
+instead of  :
+ $ make html
+or simply :
+ $ make debian




More information about the Fusionforge-commits mailing list