]> git.donarmstrong.com Git - debian/debian-policy.git/blob - Makefile
used some proper makefile dependencies, less crufty shell code et al
[debian/debian-policy.git] / Makefile
1 include debian/rules
2
3 policy.sgml: version.ent
4 menu-policy.sgml: version.ent
5 mime-policy.sgml: version.ent
6
7 %.validate: %
8         nsgmls -wall -gues $<
9
10 %.html/index.html: %.sgml
11         debiandoc2html $<
12
13 %.html.tar.gz: %.html/index.html
14         tar -czf $(<:/index.html=.tar.gz) $(<:/index.html=)
15
16 %.txt: %.sgml
17         debiandoc2text $<
18
19 %.txt.gz: %.txt
20         gzip -cf9 $< > $@
21
22 %.ps: %.sgml
23         debiandoc2latexps $<
24
25 %.pdf: %.sgml
26         debiandoc2latexpdf $<
27
28 # convenience aliases :)
29 html: policy.html/index.html
30 txt text: policy.txt
31 ps: policy.ps
32 pdf: policy.pdf
33 policy: html txt ps pdf
34
35 leavealone :=   $(FHS_HTML) $(FHS_FILES) $(FHS_ARCHIVE) \
36                 fhs-2.0.tar.gz fhs-changes-2.1.html \
37                 fsstnd-1.2.txt.gz libc6-migration.txt \
38                 upgrading-checklist.html virtual-package-names-list.txt
39               
40 .PHONY: distclean
41 distclean:
42         rm -rf $(filter-out $(leavealone),$(wildcard *.html))
43         rm -f $(filter-out $(leavealone),$(wildcard *.txt *.txt.gz *.html.tar.gz *.pdf *.ps))
44         rm -f *.lout* lout.li *.sasp* *.tex *.aux *.toc *.idx *.log *.out *.dvi
45         rm -f `find . -name "*~" -o -name "*.bak" -o -name ".#*" -o -name core`
46         rm -f version.ent
47         rm -f *.rej *.orig
48
49 # if a rule bombs out, delete the target
50 .DELETE_ON_ERROR:
51 # no default suffixes work here, don't waste time on them
52 .SUFFIXES: