]> git.donarmstrong.com Git - debian/debian-policy.git/blob - Makefile
Merge branch 'master' into bug504880-rra
[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 perl-policy.sgml: version.ent
7
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
16
17 %.validate: %
18         nsgmls -wall -gues $<
19
20 %.html/index.html: %.sgml
21         LANG=C debiandoc2html $<
22
23 %-1.html: %.sgml
24         LANG=C debiandoc2html -1 -b $*-1d $< && \
25         mv $*-1d.html/index.html $*-1.html && \
26         rmdir $*-1d.html
27
28 %.html.tar.gz: %.html/index.html
29         tar -czf $(<:/index.html=.tar.gz) $(<:/index.html=)
30
31 %.txt: %.sgml
32         LANG=C debiandoc2text $<
33
34 %.txt.gz: %.txt
35         gzip -cf9 $< > $@
36
37 %.ps: %.sgml
38         LANG=C debiandoc2latexps $<
39
40 %.ps.gz: %.ps
41         gzip -cf9 $< > $@
42
43 %.pdf: %.sgml
44         LANG=C debiandoc2latexpdf $<
45
46 %.pdf.gz: %.pdf
47         gzip -cf9 $< > $@
48
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
56
57 leavealone :=   $(FHS_HTML) $(FHS_FILES) $(FHS_ARCHIVE) \
58                 libc6-migration.txt
59               
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
68
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: