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