source: trunk/documentation/Makefile.howto @ 507

Last change on this file since 507 was 507, checked in by bcornec, 13 years ago

merge -r489:506 $SVN_M/branches/stable

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    @ln -sf $(IMAGESDIR) $(TARGET)
37
38$(TARGET).html: $(SRC) $(DSL) $(IMAGES)
39    @echo ""
40    @echo "Generating doc in HTML format"
41    @echo "-----------------------------"
42    @docbook2html -u -d $(TARGET).dsl'#txt' $(TARGET).sgml
43   
44$(TARGET).pdf: $(SRC) $(DSL) $(IMAGES)
45    @echo ""
46    @echo "Generating doc in PDF format"
47    @echo "----------------------------"
48    @docbook2pdf -d $(TARGET).dsl'#pdf' $(TARGET).sgml
49
50$(TARGET).rtf: $(SRC) $(DSL) $(IMAGES)
51    @echo ""
52    @echo "Generating doc in RTF format"
53    @echo "----------------------------"
54    @docbook2rtf -d $(TARGET).dsl'#print' $(TARGET).sgml
55
56clean:
57    @echo ""
58    @echo "Cleaning up the documentation directory for the Howto"
59    @echo ""
60    @rm -fr $(TARGET).{aux,log,out,tex,dvi,pdf,ps,txt,rtf,html} $(TARGET)
61
62install: all
63    @echo ""
64    @echo "Delivering mondorescue howto"
65    @echo ""
66    @if [ "${INSTALLDIR}" != "" ]; then mkdir -p ${INSTALLDIR} ; cp -a $(TARGET).{html,pdf,ps,txt,rtf} $(TARGET) ${INSTALLDIR} ; else echo "No INSTALLDIR specified aborting install"; fi
Note: See TracBrowser for help on using the repository browser.