[339] | 1 | #
|
---|
[401] | 2 | # Makefile for mondorescue howto
|
---|
[339] | 3 | #
|
---|
| 4 | # $Id$
|
---|
| 5 | #
|
---|
[326] | 6 | TARGET=mondorescue-howto
|
---|
| 7 | SRC=$(shell ls *.sgml)
|
---|
| 8 | DSL=$(TARGET).dsl
|
---|
[338] | 9 | IMAGESDIR=images
|
---|
| 10 | IMAGES=$(shell ls ${IMAGESDIR}/*.png | sed 's/\.png/.eps/g')
|
---|
[326] | 11 |
|
---|
[401] | 12 | all: $(TARGET).ps $(TARGET).pdf $(TARGET)/index.html $(TARGET).txt $(TARGET).html $(TARGET).rtf
|
---|
[331] | 13 |
|
---|
[338] | 14 | ${IMAGESDIR}/%.eps: ${IMAGESDIR}/%.png
|
---|
[331] | 15 | @echo "Converting $< to $@"
|
---|
| 16 | @convert $< $@
|
---|
[326] | 17 |
|
---|
[327] | 18 | $(TARGET).txt: $(SRC)
|
---|
[331] | 19 | @echo ""
|
---|
| 20 | @echo "Generating doc in TXT format"
|
---|
| 21 | @echo "----------------------------"
|
---|
| 22 | @docbook2txt $(TARGET).sgml
|
---|
[326] | 23 |
|
---|
[327] | 24 | $(TARGET).ps: $(SRC) $(DSL) $(IMAGES)
|
---|
[331] | 25 | @echo ""
|
---|
| 26 | @echo "Generating doc in PostScript format"
|
---|
| 27 | @echo "-----------------------------------"
|
---|
| 28 | @docbook2ps -d $(TARGET).dsl'#print' $(TARGET).sgml
|
---|
[326] | 29 |
|
---|
| 30 | $(TARGET)/index.html: $(SRC) $(DSL) $(IMAGES)
|
---|
[331] | 31 | @echo ""
|
---|
| 32 | @echo "Generating all HTML pages"
|
---|
| 33 | @echo "-------------------------"
|
---|
| 34 | @rm -fr $(TARGET)
|
---|
| 35 | @docbook2html -d $(TARGET).dsl'#html' -o $(TARGET) $(TARGET).sgml
|
---|
[326] | 36 |
|
---|
| 37 | $(TARGET).html: $(SRC) $(DSL) $(IMAGES)
|
---|
[331] | 38 | @echo ""
|
---|
| 39 | @echo "Generating doc in HTML format"
|
---|
| 40 | @echo "-----------------------------"
|
---|
| 41 | @docbook2html -u -d $(TARGET).dsl'#txt' $(TARGET).sgml
|
---|
[326] | 42 |
|
---|
[327] | 43 | $(TARGET).pdf: $(SRC) $(DSL) $(IMAGES)
|
---|
[331] | 44 | @echo ""
|
---|
| 45 | @echo "Generating doc in PDF format"
|
---|
| 46 | @echo "----------------------------"
|
---|
| 47 | @docbook2pdf -d $(TARGET).dsl'#pdf' $(TARGET).sgml
|
---|
[326] | 48 |
|
---|
[327] | 49 | $(TARGET).rtf: $(SRC) $(DSL) $(IMAGES)
|
---|
[331] | 50 | @echo ""
|
---|
| 51 | @echo "Generating doc in RTF format"
|
---|
| 52 | @echo "----------------------------"
|
---|
| 53 | @docbook2rtf -d $(TARGET).dsl'#print' $(TARGET).sgml
|
---|
[326] | 54 |
|
---|
| 55 | clean:
|
---|
[331] | 56 | @echo ""
|
---|
[401] | 57 | @echo "Cleaning up the documentation directory for the Howto"
|
---|
[331] | 58 | @echo ""
|
---|
| 59 | @rm -fr $(TARGET).{aux,log,out,tex,dvi,pdf,ps,txt,rtf,html} $(TARGET)
|
---|
[338] | 60 |
|
---|
| 61 | install: all
|
---|
| 62 | @echo ""
|
---|
[401] | 63 | @echo "Delivering mondorescue howto"
|
---|
[338] | 64 | @echo ""
|
---|
[541] | 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
|
---|