Added the BSD licensed xmlformat utility for keeping the xml pretty
[ardour.git] / manual / Makefile
1
2 DOCNAME         = ardour_manual
3
4 # Default values, only set if not set in book Makefile
5 OUTDIR   ?= tmp
6 XMLFILE  ?= xml/$(DOCNAME).xml
7 XSLFILE  ?= xsl/html.xsl
8 CSSFILE  ?= $(DOCNAME).css
9 XSLTPROC ?= xsltproc
10 #PWD              = $(shell pwd)
11
12 # xsltproc -output option gives I/O errors because??, so 
13 # just move the html to the output directory
14 html:: clean
15         # creating output directory
16         -@mkdir $(OUTDIR)
17         # generating html
18         LANG=en_US.UTF-8 $(XSLTPROC) -xinclude $(XSLFILE) $(XMLFILE)
19         # copy html files to output directory
20         -@mv *.html $(OUTDIR)
21         # copy css file to output directory
22         -@cp css/$(CSSFILE) $(OUTDIR)/$(CSSFILE)
23         # copy the image files to the output directory
24         -@cp -r images  $(OUTDIR)/images
25
26 .PHONY : html
27
28 test::
29         xmllint --noout --postvalid --xinclude $(XMLFILE)
30
31 .PHONY : test
32
33 clean::
34         @rm -rf $(OUTDIR)
35
36 .PHONY : clean
37
38 upload: html
39         cd tmp && tar cf - . | bzip2 > ../man.tar.bz2
40         scp man.tar.bz2 las@ardour.org:ardour.org
41
42 .PHONY : upload
43