]> git.saurik.com Git - apt.git/blame_incremental - buildlib/debiandoc.mak
* apt-pkg/acquire-worker.cc:
[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
17#---------
18
19# Rules to build HTML documentations
20ifdef DEBIANDOC_HTML
21
22# Install generation hooks
23doc: $($(LOCAL)-HTML)
24veryclean: veryclean/html/$(LOCAL)
25
26vpath %.sgml $(SUBDIRS)
27$(DOC)/%.html: %.sgml
28 echo Creating html for $< to $@
29 -rm -rf $@
30 (HERE=`pwd`; cd $(@D) && $(DEBIANDOC_HTML) $$HERE/$<)
31
32# Clean rule
33.PHONY: veryclean/html/$(LOCAL)
34veryclean/html/$(LOCAL):
35 -rm -rf $($(@F)-HTML)
36
37endif
38
39#---------
40
41# Rules to build Text documentations
42ifdef DEBIANDOC_TEXT
43
44# Install generation hooks
45doc: $($(LOCAL)-TEXT)
46veryclean: veryclean/text/$(LOCAL)
47
48vpath %.sgml $(SUBDIRS)
49$(DOC)/%.text: %.sgml
50 echo Creating text for $< to $@
51 $(DEBIANDOC_TEXT) -O $< > $@
52
53# Clean rule
54.PHONY: veryclean/text/$(LOCAL)
55veryclean/text/$(LOCAL):
56 -rm -rf $($(@F)-TEXT)
57
58endif