From 8403f0ec190316b05859470e303210e9990c2fd5 Mon Sep 17 00:00:00 2001 From: Richard Henwood Date: Mon, 24 Oct 2011 13:55:12 -0500 Subject: [PATCH] LUDOC-8 Make Jenkins build manual using a Makefile. 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 Change-Id: Iaf494b91725bc78c745a4df47e64c8725163e37d --- Makefile | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index b733cb3..b97f6ec 100644 --- 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 -- 1.8.3.1