]> git.donarmstrong.com Git - debian/debian-policy.git/blob - Makefile
autopkgtest.desc: replace reference to packages-tests by autopkgtest
[debian/debian-policy.git] / Makefile
1 include debian/rules
2
3 policy.sgml: version.ent
4 menu-policy.sgml: version.ent
5 perl-policy.sgml: version.ent
6
7 %.txt: %.org
8         $(EMACS) --batch -Q -l ./README-css.el -l org --visit $^ \
9           --funcall org-ascii-export-to-ascii
10         test "$@" != "README.txt"  ||                            \
11            perl -pli -e 's,./Process.org,Process.txt,g' $@
12 %.html: %.org
13         $(EMACS) --batch -Q -l ./README-css.el -l org --visit $^ \
14            --funcall org-html-export-to-html
15
16 %.validate: %
17         nsgmls -wall -gues $<
18
19 %.html/index.html: %.sgml
20         LANG=C debiandoc2html $<
21
22 %-1.html: %.sgml
23         LANG=C debiandoc2html -1 -b $*-1d $< && \
24         mv $*-1d.html/index.html $*-1.html && \
25         rmdir $*-1d.html
26
27 %.html.tar.gz: %.html/index.html
28         GZIP=-n9 tar -czf $(<:/index.html=.tar.gz) $(<:/index.html=)
29
30 %.txt: %.sgml
31         LANG=C debiandoc2text $<
32
33 %.txt.gz: %.txt
34         gzip -ncf9 $< > $@
35
36 %.ps: %.sgml
37         LANG=C debiandoc2latexps $<
38
39 %.ps.gz: %.ps
40         gzip -ncf9 $< > $@
41
42 %.pdf: %.sgml
43         LANG=C debiandoc2latexpdf $<
44
45 %.pdf.gz: %.pdf
46         gzip -ncf9 $< > $@
47
48 # This is a temporary hack to fold the upgrading-checklist into the Policy
49 # HTML directory so that it can be deployed alongside Policy on
50 # www.debian.org in a way that lets the cross-document links work properly.
51 # The correct solution is to make upgrading-checklist an appendix of Policy,
52 # which will probably be done as part of a general conversion to DocBook.
53 policy.html.tar.gz:: policy.html/upgrading-checklist.html
54 policy.html/upgrading-checklist.html: upgrading-checklist-1.html \
55                                       policy.html/index.html
56         cp -p $< $@
57
58 # convenience aliases :)
59 html: policy.html/index.html
60 html-1: policy-1.html
61 txt text: policy.txt
62 ps: policy.ps
63 pdf: policy.pdf
64 policy: html txt ps pdf
65
66 leavealone :=   $(FHS_HTML) $(FHS_FILES) $(FHS_ARCHIVE) \
67                 libc6-migration.txt
68               
69 .PHONY: distclean
70 distclean:
71         rm -rf $(filter-out $(leavealone),$(wildcard *.html))
72         rm -f $(filter-out $(leavealone),$(wildcard *.txt *.txt.gz *.html.tar.gz *.pdf *.ps))
73         rm -f *.lout* lout.li *.sasp* *.tex *.aux *.toc *.idx *.log *.out *.dvi *.tpt
74         rm -f `find . -name "*~" -o -name "*.bak" -o -name ".#*" -o -name core`
75         rm -f version.ent
76         rm -f *.rej *.orig
77
78 # if a rule bombs out, delete the target
79 .DELETE_ON_ERROR:
80 # no default suffixes work here, don't waste time on them
81 .SUFFIXES: