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