source: MondoRescue/branches/2.2.2/mondo-doc/Makefile.howto@ 1236

Last change on this file since 1236 was 541, checked in by bcornec, 18 years ago

Stable is reverted to r436 (2.0.7) to put it in line with 2.0.8 and start from there over

File size: 1.9 KB
Line 
1#
2# Makefile for mondorescue howto
3#
4# $Id$
5#
6TARGET=mondorescue-howto
7SRC=$(shell ls *.sgml)
8DSL=$(TARGET).dsl
9IMAGESDIR=images
10IMAGES=$(shell ls ${IMAGESDIR}/*.png | sed 's/\.png/.eps/g')
11
12all: $(TARGET).ps $(TARGET).pdf $(TARGET)/index.html $(TARGET).txt $(TARGET).html $(TARGET).rtf
13
14${IMAGESDIR}/%.eps: ${IMAGESDIR}/%.png
15 @echo "Converting $< to $@"
16 @convert $< $@
17
18$(TARGET).txt: $(SRC)
19 @echo ""
20 @echo "Generating doc in TXT format"
21 @echo "----------------------------"
22 @docbook2txt $(TARGET).sgml
23
24$(TARGET).ps: $(SRC) $(DSL) $(IMAGES)
25 @echo ""
26 @echo "Generating doc in PostScript format"
27 @echo "-----------------------------------"
28 @docbook2ps -d $(TARGET).dsl'#print' $(TARGET).sgml
29
30$(TARGET)/index.html: $(SRC) $(DSL) $(IMAGES)
31 @echo ""
32 @echo "Generating all HTML pages"
33 @echo "-------------------------"
34 @rm -fr $(TARGET)
35 @docbook2html -d $(TARGET).dsl'#html' -o $(TARGET) $(TARGET).sgml
36
37$(TARGET).html: $(SRC) $(DSL) $(IMAGES)
38 @echo ""
39 @echo "Generating doc in HTML format"
40 @echo "-----------------------------"
41 @docbook2html -u -d $(TARGET).dsl'#txt' $(TARGET).sgml
42
43$(TARGET).pdf: $(SRC) $(DSL) $(IMAGES)
44 @echo ""
45 @echo "Generating doc in PDF format"
46 @echo "----------------------------"
47 @docbook2pdf -d $(TARGET).dsl'#pdf' $(TARGET).sgml
48
49$(TARGET).rtf: $(SRC) $(DSL) $(IMAGES)
50 @echo ""
51 @echo "Generating doc in RTF format"
52 @echo "----------------------------"
53 @docbook2rtf -d $(TARGET).dsl'#print' $(TARGET).sgml
54
55clean:
56 @echo ""
57 @echo "Cleaning up the documentation directory for the Howto"
58 @echo ""
59 @rm -fr $(TARGET).{aux,log,out,tex,dvi,pdf,ps,txt,rtf,html} $(TARGET)
60
61install: all
62 @echo ""
63 @echo "Delivering mondorescue howto"
64 @echo ""
65 @if [ "${INSTALLDIR}" != "" ]; then mkdir -p ${INSTALLDIR} ; cp -a $(TARGET).{html,pdf,ps,txt,rtf} $(TARGET) ${INSTALLDIR} ; cp -a ${IMAGESDIR} ${INSTALLDIR}/$(TARGET) ; else echo "No INSTALLDIR specified aborting install"; fi
Note: See TracBrowser for help on using the repository browser.