forked from OSInside/kiwi-legacy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
85 lines (68 loc) · 2.19 KB
/
Makefile
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# /.../
# Makefile for building kiwi Cook Book (HTML and PDF) plus
# manual pages.
# ----
#
KV=`cat Revision.txt`
DB=/usr/share/xml/docbook/stylesheet/nwalsh/current/
MAIN=kiwi-doc.xml
MAN=KIWI*config.sh.1 KIWI*images.sh.1 KIWI*kiwirc.1 kiwi.1
SOURCE=kiwi-doc.xml kiwi-doc-*.xml kiwi-man-*.xml
FIG=images/*.fig
FOPCONFIG=etc/fop.xml
NONET=--nonet
all: revision html pdf man devdoc
devdoc:
${MAKE} -C ../devdoc all
html:kiwi.html
mv kiwi.html ../
pdf:kiwi.pdf
mv kiwi.pdf ../
man:${MAN}
mv KIWI::config.sh.1 ../
mv KIWI::images.sh.1 ../
mv KIWI::kiwirc.1 ../
mv kiwi.1 ../
images/*.png:${FIG}
make -C images all
.tmp.xml:${SOURCE} images/*.png
@echo "Validating..."
xmllint ${NONET} --xinclude --postvalid --output .tmp.xml ${MAIN}
@echo "Resolving XIncludes..."
xsltproc ${NONET} --xinclude --output .tmp.xml \
xslt/profiling/db4index-profile.xsl ${MAIN}
kiwi.fo:.tmp.xml
xsltproc ${NONET} --output kiwi.fo xslt/fo/docbook.xsl .tmp.xml
kiwi.html:.tmp.xml
@echo "Transforming HTML..."
xsltproc ${NONET} --output ./kiwi.html xslt/html/docbook.xsl .tmp.xml
kiwi.pdf:.tmp.xml kiwi.fo
@echo "Transforming PDF..."
fop -c ${FOPCONFIG} kiwi.fo kiwi.pdf
KIWI*config.sh.1:kiwi-man-config.sh.xml
cat kiwi-man-config.sh.xml | sed -e "s@_KV_@${KV}@" > .tmp.man
xsltproc ${NONET} ${DB}/manpages/docbook.xsl .tmp.man
KIWI*images.sh.1:kiwi-man-images.sh.xml
cat kiwi-man-images.sh.xml | sed -e "s@_KV_@${KV}@" > .tmp.man
xsltproc ${NONET} ${DB}/manpages/docbook.xsl .tmp.man
KIWI*kiwirc.1:kiwi-man-kiwirc.xml
cat kiwi-man-kiwirc.xml | sed -e "s@_KV_@${KV}@" > .tmp.man
xsltproc ${NONET} ${DB}/manpages/docbook.xsl .tmp.man
kiwi.1:kiwi-man.xml
cat kiwi-man.xml | sed -e "s@_KV_@${KV}@" > .tmp.man
xsltproc ${NONET} ${DB}/manpages/docbook.xsl .tmp.man
clean:
rm -f .tmp.xml .tmp.man
rm -f ${MAN}
rm -f kiwi.html
rm -f kiwi.pdf
rm -f kiwi.fo
check:
@echo "Checking for packages..."
rpm -q libxml2-2 libxslt-devel graphviz-perl \
docbook_4 docbook-xsl-stylesheets \
xmlgraphics-fop xmlgraphics-batik dejavu-fonts sil-charis-fonts \
xmlgraphics-commons excalibur-avalon-framework
revision:
cat ../../rpm/kiwi.spec | grep Version: | cut -f2 -d: | cut -f1-2 -d. |\
tr -d " " | tr -d "\n" > Revision.txt