Whamcloud - gitweb
LUDOC-8 Make Jenkins build manual using a Makefile. 14/1214/13
authorRichard Henwood <rhenwood@whamcloud.com>
Mon, 24 Oct 2011 18:55:12 +0000 (13:55 -0500)
committerRichard Henwood <rhenwood@whamcloud.com>
Wed, 26 Oct 2011 04:23:25 +0000 (23:23 -0500)
This Makefile supports building on Mac,
Ubuntu 11.04 and RHEL6.  TMP var is intended to be portable.

diff target is temporarily disabled.

Signed-off-by: Richard Henwood <rhenwood@whamcloud.com>
Change-Id: Iaf494b91725bc78c745a4df47e64c8725163e37d

Makefile

index b733cb3..b97f6ec 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,23 +1,30 @@
 SRC_XML=$(wildcard *.xml)
 SRC_IMG=$(wildcard figures/*.png)
 SRCS=$(SRC_XML) $(SRC_IMG)
-TEMP=/tmp
+TMP?=/tmp
 
 TGT_BASE=lustre_manual
 MASTER_URL=http://build.whamcloud.com/job/lustre-manual/lastSuccessfulBuild/
 MASTER_XHTML=$(MASTER_URL)/artifact/_out/$(TGT_BASE).xhtml
-TGT_MASTER=$(TEMP)/mastermanual
+TGT_MASTER=$(TMP)/mastermanual
 
 
-RNG_LIN=/usr/share/xml/docbook/schema/rng/5.0/docbookxi.rng
+RNG_UBN=/usr/share/xml/docbook/schema/rng/5.0/docbookxi.rng
+RNG_REL=/usr/share/xml/docbook5/schema/rng/5.0/docbookxi.rng
 RNG_MAC=/opt/local/share/xml/docbook/5.0/rng/docbookxi.rng
-RNG=$(or $(shell ls $(RNG_LIN) 2> /dev/null), \
+RNG=$(or $(shell ls $(RNG_UBN) 2> /dev/null), \
+        $(shell ls $(RNG_REL) 2> /dev/null), \
         $(shell ls $(RNG_MAC) 2> /dev/null))
-XSL_LIN=/usr/share/xml/docbook/stylesheet/docbook-xsl-ns
+XSL_UBN=/usr/share/xml/docbook/stylesheet/docbook-xsl-ns
+XSL_REL=/usr/share/sgml/docbook/xsl-ns-stylesheets-1.75.2
 XSL_MAC=/opt/local/share/xsl/docbook-xsl
-XSL=$(or $(shell ls -d $(XSL_LIN) 2> /dev/null), \
+XSL=$(or $(shell ls -d $(XSL_UBN) 2> /dev/null), \
+        $(shell ls -d $(XSL_REL) 2> /dev/null), \
         $(shell ls -d $(XSL_MAC) 2> /dev/null))
 
+.PHONY: all
+all: clean xhtml html pdf
+
 .PHONY: check
 check: $(SRC_XML)
        xmllint --noout --xinclude --noent --relaxng $(RNG) ./index.xml
@@ -67,4 +74,5 @@ push:
 
 .PHONY: clean
 clean:
-       rm $(TGT_BASE).html $(TGT_BASE).xhtml $(TGT_BASE).pdf
+       rm -f $(TGT_BASE).html $(TGT_BASE).xhtml $(TGT_BASE).pdf\
+               mastermanual.revision mastermanual.index