changes to help strp silence
[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 help::
13         @echo " WARNING: The Ardour Scons build script must be run before "
14         @echo " building the manual. "
15         @echo
16         @echo " The Following is a list of supported build targets:"
17         @echo
18         @echo " html:"
19         @echo "     Build HTML version of ardour manual."
20         @echo
21         @echo " test:"
22         @echo "     Validate DocBook XML source."
23         @echo
24         @echo " format:"
25         @echo "     Format DocBook XML source using xmlformat."
26         @echo
27         @echo " clean:"
28         @echo "     Remove temporary files."
29         @echo
30
31 # xsltproc -output option gives I/O errors because??, so 
32 # just move the html to the output directory
33 html:: clean
34         # creating output directory
35         -@mkdir $(OUTDIR)
36         # generating html
37         LANG=en_US.UTF-8 $(XSLTPROC) -xinclude $(XSLFILE) $(XMLFILE)
38         # copy html files to output directory
39         -@mv *.html $(OUTDIR)
40         # copy css file to output directory
41         -@cp css/$(CSSFILE) $(OUTDIR)/$(CSSFILE)
42         # copy the image files to the output directory
43         -@cp -r images  $(OUTDIR)/images
44
45 .PHONY : html
46
47 test::
48         # validating book
49         xmllint --noout --postvalid --xinclude $(XMLFILE)
50
51 .PHONY : test
52
53 format:: test
54         @for file in `find xml/ -name '*.xml' -type f`; \
55                 do xmlformat/xmlformat.pl --in-place --backup .bak \
56                 --config-file xmlformat/xmlformat-ardour.conf $$file; \
57                 done
58
59 .PHONY : format
60
61 clean::
62         @rm -rf $(OUTDIR)
63         @for file in `find xml/ -name '*.bak' -type f`; do \
64                 rm $$file; done
65
66 .PHONY : clean
67
68 upload: html
69         cd tmp && tar cf - . | bzip2 > ../man.tar.bz2
70         scp man.tar.bz2 las@ardour.org:ardour.org
71
72 .PHONY : upload
73