]>
Commit | Line | Data |
---|---|---|
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 | |
14 | ifdef NSGMLS | |
15 | ifdef SGMLSPL | |
16 | ifdef DOCBOOK2MAN | |
17 | ||
18 | LOCAL := sgml-manpage-$(firstword $(SOURCE)) | |
19 | $(LOCAL)-LIST := $(SOURCE) | |
20 | ||
21 | # Install generation hooks | |
22 | doc: $($(LOCAL)-LIST) | |
23 | veryclean: 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) | |
31 | veryclean/$(LOCAL): | |
32 | -rm -rf $($(@F)-LIST) | |
33 | ||
34 | HAVE_SGML=yes | |
35 | endif | |
36 | endif | |
37 | endif | |
38 | ||
39 | INCLUDES := | |
40 | ||
41 | ifndef HAVE_SGML | |
42 | # Strip from the source list any man pages we dont have compiled already | |
43 | SOURCE := $(wildcard $(SOURCE)) | |
44 | endif | |
45 | ||
46 | # Chain to the manpage rule | |
47 | ifneq ($(words $(SOURCE)),0) | |
48 | include $(MANPAGE_H) | |
49 | endif |