]> projects.mako.cc - to_fork_or_not/blob - Makefile
Added changes from Jonathan Carter feedback.
[to_fork_or_not] / Makefile
1 #!/usr/bin/make -f
2
3 SOURCE = to_fork_or_not_to_fork.xml
4 OUTPUT_STEM = to_fork_or_not_to_fork
5
6 CURRENT_DISTRO = $(shell test -e /etc/debian_version && echo "debian")
7 ifeq ($(CURRENT_DISTRO),debian)
8         NWDBXSL = /usr/share/xml/docbook/stylesheet/nwalsh/html/docbook.xsl
9 else
10         NWDBXSL = /usr/share/xml/docbook/stylesheet/nwalsh/current/html/docbook.xsl
11 endif
12
13 html:
14         xsltproc -o "$(OUTPUT_STEM).html" "$(NWDBXSL)" "$(SOURCE)"
15
16 pdf:
17         xmlto fo "$(SOURCE)"
18         fop "$(OUTPUT_STEM).fo" "$(OUTPUT_STEM).pdf" 
19         
20 build: html pdf
21
22 viewpdf: pdf
23         xpdf "$(OUTPUT_STEM).pdf"
24         
25 validate:
26         xmllint --noout --noent "$(SOURCE)"
27
28 # Remove the mess
29 clean:
30         rm -rf "$(OUTPUT_STEM).html" "$(OUTPUT_STEM).fo" "$(OUTPUT_STEM).pdf" 
31         
32 #       rm -rf ./tmp
33
34
35 # some future rules
36 #move:
37 #install: build move

Benjamin Mako Hill || Want to submit a patch?