]> git.saurik.com Git - apt.git/blame - buildlib/debiandoc.mak
re-add compat pkgSrcRecords::File::MD5Hash
[apt.git] / buildlib / debiandoc.mak
CommitLineData
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
13LOCAL := debiandoc-$(firstword $(SOURCE))
14$(LOCAL)-HTML := $(addsuffix .html,$(addprefix $(DOC)/,$(basename $(SOURCE))))
15$(LOCAL)-TEXT := $(addsuffix .text,$(addprefix $(DOC)/,$(basename $(SOURCE))))
16
1098ae37
DK
17debiandoc:
18
ac966541
AL
19#---------
20
21# Rules to build HTML documentations
22ifdef DEBIANDOC_HTML
23
24# Install generation hooks
1098ae37 25debiandoc: $($(LOCAL)-HTML)
ac966541
AL
26veryclean: veryclean/html/$(LOCAL)
27
28vpath %.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)
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
1098ae37 47debiandoc: $($(LOCAL)-TEXT)
ac966541
AL
48veryclean: veryclean/text/$(LOCAL)
49
50vpath %.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)
57veryclean/text/$(LOCAL):
58 -rm -rf $($(@F)-TEXT)
59
60endif