- MyPLC User's Guide
[myplc.git] / doc / Makefile
1 #
2 # MyPLC documentation
3 #
4 # Mark Huang <mlhuang@cs.princeton.edu>
5 # Copyright (C) 2006 The Trustees of Princeton University
6 #
7 # $Id: Makefile.in,v 1.6 2005/09/07 22:05:20 mlhuang Exp $
8 #
9
10 all: myplc.pdf
11
12 # Validate the XML
13 .%.xml.valid: %.xml
14         xmllint --valid --output $@ $<
15
16 # Compile it into other formats
17 FORMATS := dvi html man ps rtf tex texi txt
18
19 DOCBOOK2FLAGS := -V biblio-number=1
20
21 define docbook2
22 %.$(1): %.xml .%.xml.valid
23         docbook2$(1) --nochunks $$(DOCBOOK2FLAGS) $$<
24 endef
25
26 # docbook2pdf craps out on figures
27 %.pdf: %.ps
28         ps2pdf $< $@
29
30 $(foreach format,$(FORMATS),$(eval $(call docbook2,$(format))))
31
32 docclean:
33         rm -f $(patsubst %,*.%,$(FORMATS)) *.pdf .*.xml.valid
34
35 clean: docclean
36
37 .PHONY: docclean