]> git.saurik.com Git - apt.git/blob - buildlib/debiandoc.mak
rework the parameter creation for the Hashsum test
[apt.git] / buildlib / debiandoc.mak
1 # -*- make -*-
2
3 # This processes debian-doc sgml to produce html and plain text output
4
5 # Input
6 # $(SOURCE) - The documents to use
7
8 # All output is writtin to files in the build doc directory
9
10 # See defaults.mak for information about LOCAL
11
12 # Some local definitions
13 LOCAL := debiandoc-$(firstword $(SOURCE))
14 $(LOCAL)-HTML := $(addsuffix .html,$(addprefix $(DOC)/,$(basename $(SOURCE))))
15 $(LOCAL)-TEXT := $(addsuffix .text,$(addprefix $(DOC)/,$(basename $(SOURCE))))
16
17 debiandoc:
18
19 #---------
20
21 # Rules to build HTML documentations
22 ifdef DEBIANDOC_HTML
23
24 # Install generation hooks
25 debiandoc: $($(LOCAL)-HTML)
26 veryclean: veryclean/html/$(LOCAL)
27
28 vpath %.sgml $(SUBDIRS)
29 $(DOC)/%.html: %.sgml
30 echo Creating html for $< to $@
31 -rm -rf $@
32 (HERE=`pwd`; cd $(@D) && $(DEBIANDOC_HTML) $(DEBIANDOC_HTML_OPTIONS) $$HERE/$<) || exit 199
33
34 # Clean rule
35 .PHONY: veryclean/html/$(LOCAL)
36 veryclean/html/$(LOCAL):
37 -rm -rf $($(@F)-HTML)
38
39 endif
40
41 #---------
42
43 # Rules to build Text documentations
44 ifdef DEBIANDOC_TEXT
45
46 # Install generation hooks
47 debiandoc: $($(LOCAL)-TEXT)
48 veryclean: veryclean/text/$(LOCAL)
49
50 vpath %.sgml $(SUBDIRS)
51 $(DOC)/%.text: %.sgml
52 echo Creating text for $< to $@
53 $(DEBIANDOC_TEXT) -O $< > $@ || exit 198
54
55 # Clean rule
56 .PHONY: veryclean/text/$(LOCAL)
57 veryclean/text/$(LOCAL):
58 -rm -rf $($(@F)-TEXT)
59
60 endif