File: Makefile

package info (click to toggle)
debian-policy 3.9.1.0
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 1,448 kB
  • ctags: 47
  • sloc: xml: 750; makefile: 192; perl: 124; lisp: 73
file content (74 lines) | stat: -rw-r--r-- 1,854 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
include debian/rules

policy.sgml: version.ent
menu-policy.sgml: version.ent
mime-policy.sgml: version.ent
perl-policy.sgml: version.ent

ifneq (,$(strip $(HAVE_ORG_EMACS)))
%.txt: %.org
	$(EMACS) --batch -Q -l ./README-css.el -l org -l org-ascii --visit $^ \
          --funcall org-export-as-ascii >/dev/null 2>&1
	test "$@" != "README.txt"  ||                            \
           perl -pli -e 's,./Process.org,Process.txt,g' $@
%.html: %.org
	$(EMACS) --batch -Q -l ./README-css.el -l org --visit $^ \
          --funcall org-export-as-html-batch >/dev/null 2>&1
endif

%.validate: %
	nsgmls -wall -gues $<

%.html/index.html: %.sgml
	LANG=C debiandoc2html $<

%-1.html: %.sgml
	LANG=C debiandoc2html -1 -b $*-1d $< && \
        mv $*-1d.html/index.html $*-1.html && \
        rmdir $*-1d.html

%.html.tar.gz: %.html/index.html
	tar -czf $(<:/index.html=.tar.gz) $(<:/index.html=)

%.txt: %.sgml
	LANG=C debiandoc2text $<

%.txt.gz: %.txt
	gzip -cf9 $< > $@

%.ps: %.sgml
	LANG=C debiandoc2latexps $<

%.ps.gz: %.ps
	gzip -cf9 $< > $@

%.pdf: %.sgml
	LANG=C debiandoc2latexpdf $<

%.pdf.gz: %.pdf
	gzip -cf9 $< > $@

# convenience aliases :)
html: policy.html/index.html
html-1: policy-1.html
txt text: policy.txt
ps: policy.ps
pdf: policy.pdf
policy: html txt ps pdf

leavealone :=	$(FHS_HTML) $(FHS_FILES) $(FHS_ARCHIVE) \
		libc6-migration.txt
	      
.PHONY: distclean
distclean:
	rm -rf $(filter-out $(leavealone),$(wildcard *.html))
	rm -f $(filter-out $(leavealone),$(wildcard *.txt *.txt.gz *.html.tar.gz *.pdf *.ps))
	rm -f *.lout* lout.li *.sasp* *.tex *.aux *.toc *.idx *.log *.out *.dvi *.tpt
	rm -f `find . -name "*~" -o -name "*.bak" -o -name ".#*" -o -name core`
	rm -f version.ent
	rm -f *.rej *.orig

# if a rule bombs out, delete the target
.DELETE_ON_ERROR:
# no default suffixes work here, don't waste time on them
.SUFFIXES: