summaryrefslogtreecommitdiff
blob: f38cdb26da0a8b880ac293806dd1591fdf261436 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#
# webapp-config/doc/Makefile
#		Simple Makefile to rebuild the documentation from the
#		docbook XML sources
#
#		Part of the webapp-config package
#
# Copyright (c) 1999-2005 Gentoo Foundation
#       Released under v2 of the GNU GPL
#
# Author(s)     Stuart Herbert <stuart@gentoo.org>
#               Renat Lumpau   <rl03@gentoo.org>
#               Gunnar Wrobel  <php@gunnarwrobel.de>
#
# ========================================================================

MAN_PAGES = webapp-config.8 webapp-config.5 webapp-eclass.5
HTML_PAGES = webapp-config.8.html webapp-config.5.html webapp-eclass.5.html

all: man html

html: $(HTML_PAGES)

man: $(MAN_PAGES)

clean:
	rm -f $(MAN_PAGES)
	rm -f $(HTML_PAGES)

%.html: %.xml
	@echo HTML $@
	@xmlto html-nochunks $< 2>/dev/null

%: %.xml
	@echo MAN $@
	@xmlto man $< 2>/dev/null
	@cat $@ | sed -e 's/$$/.fred/g;' | tr -d '\n' | sed -e 's/.fred.fred\./.fred./g;' | sed -e 's/.fred/\n/g;' > $@.temp
	@mv $@.temp $@