]> git.saurik.com Git - apt.git/blame - buildlib/sgml_manpage.mak
Version update
[apt.git] / buildlib / sgml_manpage.mak
CommitLineData
b2e465d6
AL
1# -*- make -*-
2
3# This handles man pages in DocBook SGMLL format. We convert to the respective
4# output in the source directory then copy over to the final dest. This
5# means yodl is only needed if compiling from CVS
6
7# Input
8# $(SOURCE) - The documents to use, in the form foo.sect, ie apt-cache.8
9# the sgml files are called apt-cache.8.sgml
10
11# See defaults.mak for information about LOCAL
12
13# Some local definitions
14ifdef NSGMLS
15ifdef SGMLSPL
16ifdef DOCBOOK2MAN
17
18LOCAL := sgml-manpage-$(firstword $(SOURCE))
19$(LOCAL)-LIST := $(SOURCE)
20
21# Install generation hooks
22doc: $($(LOCAL)-LIST)
23veryclean: veryclean/$(LOCAL)
24
25$($(LOCAL)-LIST) :: % : %.sgml $(INCLUDES)
26 echo Creating man page $@
27 $(NSGMLS) $< | $(SGMLSPL) $(DOCBOOK2MAN)
28
29# Clean rule
30.PHONY: veryclean/$(LOCAL)
31veryclean/$(LOCAL):
32 -rm -rf $($(@F)-LIST)
33
34HAVE_SGML=yes
35endif
36endif
37endif
38
39INCLUDES :=
40
41ifndef HAVE_SGML
42# Strip from the source list any man pages we dont have compiled already
43SOURCE := $(wildcard $(SOURCE))
44endif
45
46# Chain to the manpage rule
47ifneq ($(words $(SOURCE)),0)
48include $(MANPAGE_H)
49endif