3 # This handles man pages with po4a. We convert to the respective
4 # output in the source directory then copy over to the final dest. This
5 # means po4a is only needed if compiling from bzr
8 # $(LC) - The language code of the translation
10 # See defaults.mak for information about LOCAL
12 # generate a list of accepted man page translations
13 SOURCE = $(patsubst %.xml,%,$(wildcard *.$(LC).?.xml))
16 # Do not use XMLTO, build the manpages directly with XSLTPROC
19 STYLESHEET=../manpage-style.xsl
21 LOCAL := po4a-manpage-$(firstword $(SOURCE))
22 $(LOCAL)-LIST := $(SOURCE)
24 # Install generation hooks
26 veryclean: veryclean/$(LOCAL)
28 $($(LOCAL)-LIST) :: % : %.xml $(INCLUDES)
29 echo Creating man page $@
30 $(XSLTPROC) -o $@ $(STYLESHEET) $< || exit 200 # why xsltproc doesn't respect the -o flag here???
31 test -f $(subst .$(LC),,$@) || echo FIXME: xsltproc respect the -o flag now, workaround can be removed
32 mv -f $(subst .$(LC),,$@) $@
35 .PHONY: veryclean/$(LOCAL)
37 -rm -rf $($(@F)-LIST) apt.ent apt.$(LC).8 \
38 $(addsuffix .xml,$($(@F)-LIST)) \
39 offline.$(LC).sgml guide.$(LC).sgml
44 # take care of the rest
45 SOURCE := $(SOURCE) $(wildcard apt.$(LC).8)
49 # Strip from the source list any man pages we dont have compiled already
50 SOURCE := $(wildcard $(SOURCE))
53 # Chain to the manpage rule
54 ifneq ($(words $(SOURCE)),0)
58 # Debian Doc SGML Documents
59 SOURCE := $(wildcard *.$(LC).sgml)
60 DEBIANDOC_HTML_OPTIONS=-l $(LC).UTF-8
61 include $(DEBIANDOC_H)