]> git.donarmstrong.com Git - debian/debian-policy.git/blob - Makefile
Explicitly load org-ascii when generating text files
[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 -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 endif
17
18 %.validate: %
19         nsgmls -wall -gues $<
20
21 %.html/index.html: %.sgml
22         LANG=C debiandoc2html $<
23
24 %-1.html: %.sgml
25         LANG=C debiandoc2html -1 -b $*-1d $< && \
26         mv $*-1d.html/index.html $*-1.html && \
27         rmdir $*-1d.html
28
29 %.html.tar.gz: %.html/index.html
30         tar -czf $(<:/index.html=.tar.gz) $(<:/index.html=)
31
32 %.txt: %.sgml
33         LANG=C debiandoc2text $<
34
35 %.txt.gz: %.txt
36         gzip -cf9 $< > $@
37
38 %.ps: %.sgml
39         LANG=C debiandoc2latexps $<
40
41 %.ps.gz: %.ps
42         gzip -cf9 $< > $@
43
44 %.pdf: %.sgml
45         LANG=C debiandoc2latexpdf $<
46
47 %.pdf.gz: %.pdf
48         gzip -cf9 $< > $@
49
50 # convenience aliases :)
51 html: policy.html/index.html
52 html-1: policy-1.html
53 txt text: policy.txt
54 ps: policy.ps
55 pdf: policy.pdf
56 policy: html txt ps pdf
57
58 leavealone :=   $(FHS_HTML) $(FHS_FILES) $(FHS_ARCHIVE) \
59                 libc6-migration.txt \
60                 upgrading-checklist.html virtual-package-names-list.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: