2007-02-01 23:29:55 -05:00
|
|
|
|
|
|
|
DOCNAME = ardour_manual
|
|
|
|
|
|
|
|
# Default values, only set if not set in book Makefile
|
2007-02-14 06:23:38 -05:00
|
|
|
OUTDIR ?= tmp
|
|
|
|
XMLFILE ?= xml/$(DOCNAME).xml
|
|
|
|
XSLFILE ?= xsl/html.xsl
|
|
|
|
CSSFILE ?= $(DOCNAME).css
|
|
|
|
XSLTPROC ?= xsltproc
|
|
|
|
#PWD = $(shell pwd)
|
|
|
|
|
2007-02-14 22:49:43 -05:00
|
|
|
help::
|
2007-08-15 21:53:50 -04:00
|
|
|
@echo " WARNING: The Ardour Scons build script must be run before "
|
|
|
|
@echo " building the manual. "
|
|
|
|
@echo
|
2007-02-14 22:49:43 -05:00
|
|
|
@echo " The Following is a list of supported build targets:"
|
|
|
|
@echo
|
|
|
|
@echo " html:"
|
|
|
|
@echo " Build HTML version of ardour manual."
|
|
|
|
@echo
|
|
|
|
@echo " test:"
|
|
|
|
@echo " Validate DocBook XML source."
|
|
|
|
@echo
|
|
|
|
@echo " format:"
|
|
|
|
@echo " Format DocBook XML source using xmlformat."
|
|
|
|
@echo
|
|
|
|
@echo " clean:"
|
|
|
|
@echo " Remove temporary files."
|
|
|
|
@echo
|
|
|
|
|
2007-02-14 06:23:38 -05:00
|
|
|
# xsltproc -output option gives I/O errors because??, so
|
|
|
|
# just move the html to the output directory
|
|
|
|
html:: clean
|
|
|
|
# creating output directory
|
|
|
|
-@mkdir $(OUTDIR)
|
|
|
|
# generating html
|
|
|
|
LANG=en_US.UTF-8 $(XSLTPROC) -xinclude $(XSLFILE) $(XMLFILE)
|
|
|
|
# copy html files to output directory
|
|
|
|
-@mv *.html $(OUTDIR)
|
|
|
|
# copy css file to output directory
|
|
|
|
-@cp css/$(CSSFILE) $(OUTDIR)/$(CSSFILE)
|
|
|
|
# copy the image files to the output directory
|
|
|
|
-@cp -r images $(OUTDIR)/images
|
2007-02-01 23:29:55 -05:00
|
|
|
|
|
|
|
.PHONY : html
|
|
|
|
|
2007-02-14 06:23:38 -05:00
|
|
|
test::
|
2007-02-14 22:49:43 -05:00
|
|
|
# validating book
|
2007-02-01 23:29:55 -05:00
|
|
|
xmllint --noout --postvalid --xinclude $(XMLFILE)
|
2007-02-06 10:50:05 -05:00
|
|
|
|
2007-02-01 23:29:55 -05:00
|
|
|
.PHONY : test
|
|
|
|
|
2007-02-14 22:49:43 -05:00
|
|
|
format:: test
|
2007-08-18 22:45:24 -04:00
|
|
|
@for file in `find xml/ -name '*.xml' -type f`; \
|
2007-02-14 22:49:43 -05:00
|
|
|
do xmlformat/xmlformat.pl --in-place --backup .bak \
|
|
|
|
--config-file xmlformat/xmlformat-ardour.conf $$file; \
|
|
|
|
done
|
|
|
|
|
|
|
|
.PHONY : format
|
|
|
|
|
2007-02-01 23:29:55 -05:00
|
|
|
clean::
|
2007-02-14 06:23:38 -05:00
|
|
|
@rm -rf $(OUTDIR)
|
2007-08-18 22:45:27 -04:00
|
|
|
@for file in `find xml/ -name '*.bak' -type f`; do \
|
|
|
|
rm $$file; done
|
2007-02-01 23:29:55 -05:00
|
|
|
|
|
|
|
.PHONY : clean
|
2007-02-06 10:50:05 -05:00
|
|
|
|
|
|
|
upload: html
|
|
|
|
cd tmp && tar cf - . | bzip2 > ../man.tar.bz2
|
|
|
|
scp man.tar.bz2 las@ardour.org:ardour.org
|
|
|
|
|
|
|
|
.PHONY : upload
|
|
|
|
|