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