]>
Commit | Line | Data |
---|---|---|
ac966541 AL |
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 | ||
1098ae37 DK |
17 | debiandoc: |
18 | ||
ac966541 AL |
19 | #--------- |
20 | ||
21 | # Rules to build HTML documentations | |
22 | ifdef DEBIANDOC_HTML | |
23 | ||
24 | # Install generation hooks | |
1098ae37 | 25 | debiandoc: $($(LOCAL)-HTML) |
ac966541 AL |
26 | veryclean: veryclean/html/$(LOCAL) |
27 | ||
28 | vpath %.sgml $(SUBDIRS) | |
29 | $(DOC)/%.html: %.sgml | |
30 | echo Creating html for $< to $@ | |
31 | -rm -rf $@ | |
b6d189ca | 32 | (HERE=`pwd`; cd $(@D) && $(DEBIANDOC_HTML) $(DEBIANDOC_HTML_OPTIONS) $$HERE/$<) || exit 199 |
ac966541 AL |
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 | |
1098ae37 | 47 | debiandoc: $($(LOCAL)-TEXT) |
ac966541 AL |
48 | veryclean: veryclean/text/$(LOCAL) |
49 | ||
50 | vpath %.sgml $(SUBDIRS) | |
51 | $(DOC)/%.text: %.sgml | |
52 | echo Creating text for $< to $@ | |
b6d189ca | 53 | $(DEBIANDOC_TEXT) -O $< > $@ || exit 198 |
ac966541 AL |
54 | |
55 | # Clean rule | |
56 | .PHONY: veryclean/text/$(LOCAL) | |
57 | veryclean/text/$(LOCAL): | |
58 | -rm -rf $($(@F)-TEXT) | |
59 | ||
60 | endif |