Merge branch 'master' into bug23712-rra
[debian-policy.git] / Makefile
blob9ab6801340181b7fb58dd9a554c02838a26c98c8
1 include debian/rules
3 policy.sgml: version.ent
4 menu-policy.sgml: version.ent
5 mime-policy.sgml: version.ent
6 perl-policy.sgml: version.ent
8 %.txt: %.org
9 $(EMACS) --batch -Q -l ./README-css.el -l org -l org-ascii --visit $^ \
10 --funcall org-export-as-ascii >/dev/null 2>&1
11 test "$@" != "README.txt" || \
12 perl -pli -e 's,./Process.org,Process.txt,g' $@
13 %.html: %.org
14 $(EMACS) --batch -Q -l ./README-css.el -l org --visit $^ \
15 --funcall org-export-as-html-batch >/dev/null 2>&1
17 %.validate: %
18 nsgmls -wall -gues $<
20 %.html/index.html: %.sgml
21 LANG=C debiandoc2html $<
23 %-1.html: %.sgml
24 LANG=C debiandoc2html -1 -b $*-1d $< && \
25 mv $*-1d.html/index.html $*-1.html && \
26 rmdir $*-1d.html
28 %.html.tar.gz: %.html/index.html
29 tar -czf $(<:/index.html=.tar.gz) $(<:/index.html=)
31 %.txt: %.sgml
32 LANG=C debiandoc2text $<
34 %.txt.gz: %.txt
35 gzip -cf9 $< > $@
37 %.ps: %.sgml
38 LANG=C debiandoc2latexps $<
40 %.ps.gz: %.ps
41 gzip -cf9 $< > $@
43 %.pdf: %.sgml
44 LANG=C debiandoc2latexpdf $<
46 %.pdf.gz: %.pdf
47 gzip -cf9 $< > $@
49 # convenience aliases :)
50 html: policy.html/index.html
51 html-1: policy-1.html
52 txt text: policy.txt
53 ps: policy.ps
54 pdf: policy.pdf
55 policy: html txt ps pdf
57 leavealone := $(FHS_HTML) $(FHS_FILES) $(FHS_ARCHIVE) \
58 libc6-migration.txt
60 .PHONY: distclean
61 distclean:
62 rm -rf $(filter-out $(leavealone),$(wildcard *.html))
63 rm -f $(filter-out $(leavealone),$(wildcard *.txt *.txt.gz *.html.tar.gz *.pdf *.ps))
64 rm -f *.lout* lout.li *.sasp* *.tex *.aux *.toc *.idx *.log *.out *.dvi *.tpt
65 rm -f `find . -name "*~" -o -name "*.bak" -o -name ".#*" -o -name core`
66 rm -f version.ent
67 rm -f *.rej *.orig
69 # if a rule bombs out, delete the target
70 .DELETE_ON_ERROR:
71 # no default suffixes work here, don't waste time on them
72 .SUFFIXES: