]> git.saurik.com Git - apt.git/blame - buildlib/sgml_manpage.mak
Merged with debian-sid.
[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
b2e465d6
AL
14ifdef DOCBOOK2MAN
15
16LOCAL := sgml-manpage-$(firstword $(SOURCE))
17$(LOCAL)-LIST := $(SOURCE)
18
19# Install generation hooks
20doc: $($(LOCAL)-LIST)
21veryclean: veryclean/$(LOCAL)
22
23$($(LOCAL)-LIST) :: % : %.sgml $(INCLUDES)
24 echo Creating man page $@
b8a0f3fd 25 $(DOCBOOK2MAN) $<
b2e465d6
AL
26
27# Clean rule
28.PHONY: veryclean/$(LOCAL)
29veryclean/$(LOCAL):
30 -rm -rf $($(@F)-LIST)
31
32HAVE_SGML=yes
33endif
b2e465d6
AL
34
35INCLUDES :=
36
37ifndef HAVE_SGML
38# Strip from the source list any man pages we dont have compiled already
39SOURCE := $(wildcard $(SOURCE))
40endif
41
42# Chain to the manpage rule
43ifneq ($(words $(SOURCE)),0)
44include $(MANPAGE_H)
45endif