]> git.donarmstrong.com Git - debian/debian-policy.git/blob - Makefile
[bug545548-srivasta]: Add Documentation
[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 ifneq (,$(strip $(HAVE_ORG_EMACS)))
8 %.txt: %.org
9         $(EMACS) --batch -Q -l ./README-css.el -l org --visit $^ \
10           --funcall org-export-as-ascii >/dev/null 2>&1
11 %.html: %.org
12         $(EMACS) --batch -Q -l ./README-css.el -l org --visit $^ \
13           --funcall org-export-as-html-batch >/dev/null 2>&1
14 endif
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         tar -czf $(<:/index.html=.tar.gz) $(<:/index.html=)
29
30 %.txt: %.sgml
31         LANG=C debiandoc2text $<
32
33 %.txt.gz: %.txt
34         gzip -cf9 $< > $@
35
36 %.ps: %.sgml
37         LANG=C debiandoc2latexps $<
38
39 %.ps.gz: %.ps
40         gzip -cf9 $< > $@
41
42 %.pdf: %.sgml
43         LANG=C debiandoc2latexpdf $<
44
45 %.pdf.gz: %.pdf
46         gzip -cf9 $< > $@
47
48 # convenience aliases :)
49 html: policy.html/index.html
50 html-1: policy-1.html
51 txt text: policy.txt
52 ps: policy.ps
53 pdf: policy.pdf
54 policy: html txt ps pdf
55
56 leavealone :=   $(FHS_HTML) $(FHS_FILES) $(FHS_ARCHIVE) \
57                 libc6-migration.txt \
58                 upgrading-checklist.html virtual-package-names-list.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: