summaryrefslogtreecommitdiff
path: root/boxbackup/Makefile
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2008-01-20 23:33:45 +0000
committerChris Wilson <chris+github@qwirx.com>2008-01-20 23:33:45 +0000
commit36b1955f36f90bd4a8fb5195dcf62611571c1fdf (patch)
tree25d685697257e6e407d3ec0b52f116dc87576e3f /boxbackup/Makefile
parente1b13eeb4845c32c5554f78b0ec95dd120948482 (diff)
Move documentation/boxbackup to documentation, part 2
Diffstat (limited to 'boxbackup/Makefile')
-rw-r--r--boxbackup/Makefile66
1 files changed, 66 insertions, 0 deletions
diff --git a/boxbackup/Makefile b/boxbackup/Makefile
new file mode 100644
index 00000000..aefa3ee2
--- /dev/null
+++ b/boxbackup/Makefile
@@ -0,0 +1,66 @@
+
+
+# Process DocBook to HTML
+
+DBPROC=/usr/bin/xsltproc
+BOOKXSL=bb-book.xsl
+NOCHUNKBOOKXSL=bb-nochunk-book.xsl
+MANXSL=bb-man.xsl
+HTMLPREFIX=box-html
+VPATH= adminguide
+.SUFFIXES: .html .xml
+
+all: docs
+
+docs: instguide adminguide manpages
+ mkdir -p $(HTMLPREFIX)/images
+ cp html/images/*.png $(HTMLPREFIX)/images/.
+ cp html/*.css $(HTMLPREFIX)/.
+
+adminguide: $(HTMLPREFIX)/adminguide/index.html
+
+$(HTMLPREFIX)/adminguide/index.html: adminguide.xml ExceptionCodes.xml $(BOOKXSL)
+ # docname=`echo $@ | sed -e 's/\/index.html//'`
+ $(DBPROC) -o $(HTMLPREFIX)/adminguide/ $(BOOKXSL) adminguide.xml
+
+instguide: $(HTMLPREFIX)/instguide/index.html
+
+$(HTMLPREFIX)/instguide/index.html: instguide.xml $(BOOKXSL)
+ $(DBPROC) -o $(HTMLPREFIX)/instguide/ $(BOOKXSL) instguide.xml
+
+ExceptionCodes.xml: ../../ExceptionCodes.txt
+ perl ./generate_except_xml.pl
+
+manpages: man-dirs man-nroff man-html
+
+man-dirs: man-pages/.there $(HTMLPREFIX)/man-html/.there
+
+$(HTMLPREFIX)/man-html/.there:
+ if [ ! -d man-html ]; then mkdir -p $(HTMLPREFIX)/man-html; touch $(HTMLPREFIX)/man-html/.there; fi
+
+man-pages/.there:
+ if [ ! -d man-pages ]; then mkdir man-pages; touch man-pages/.there; fi
+
+man-nroff: bbackupquery.1 bbackupctl.1 bbstoreaccounts.1 bbstored-config.1 raidfile-config.1 bbstored-certs.1
+
+man-html: bbackupquery.html bbackupctl.html bbstoreaccounts.html bbstored-config.html raidfile-config.html bbstored-certs.html
+
+%.html: %.xml
+ $(DBPROC) -o $@ $(NOCHUNKBOOKXSL) $<
+ mv $@ $(HTMLPREFIX)/man-html/.
+
+%.1: %.xml
+ $(DBPROC) -o $@ $(MANXSL) $<
+ mv $@ man-pages/.
+ gzip -f -9 man-pages/$@
+
+dockit: clean docs
+ tar zcf documentation-kit-0.10.tar.gz $(HTMLPREFIX)/
+
+clean:
+ if [ -d ./$(HTMLPREFIX) ]; then rm -rf $(HTMLPREFIX) ; fi
+ if [ -d ./man-pages ]; then rm -rf ./man-pages/; fi
+ if [ -f ExceptionCodes.xml ]; then rm ExceptionCodes.xml; fi
+ if [ -f documentation-kit-0.10.tar.gz ]; then rm documentation-kit-0.10.tar.gz; fi
+
+