]> git.saurik.com Git - apt.git/blame_incremental - buildlib/debiandoc.mak
- add method to open (maybe) clearsigned files transparently
[apt.git] / buildlib / debiandoc.mak
... / ...
CommitLineData
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
13LOCAL := debiandoc-$(firstword $(SOURCE))
14$(LOCAL)-HTML := $(addsuffix .html,$(addprefix $(DOC)/,$(basename $(SOURCE))))
15$(LOCAL)-TEXT := $(addsuffix .text,$(addprefix $(DOC)/,$(basename $(SOURCE))))
16
17debiandoc:
18
19#---------
20
21# Rules to build HTML documentations
22ifdef DEBIANDOC_HTML
23
24# Install generation hooks
25debiandoc: $($(LOCAL)-HTML)
26veryclean: veryclean/html/$(LOCAL)
27
28vpath %.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)
36veryclean/html/$(LOCAL):
37 -rm -rf $($(@F)-HTML)
38
39endif
40
41#---------
42
43# Rules to build Text documentations
44ifdef DEBIANDOC_TEXT
45
46# Install generation hooks
47debiandoc: $($(LOCAL)-TEXT)
48veryclean: veryclean/text/$(LOCAL)
49
50vpath %.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)
57veryclean/text/$(LOCAL):
58 -rm -rf $($(@F)-TEXT)
59
60endif