source: MondoRescue/branches/stable/documentation/Makefile@ 338

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

Documentation management:

  • old HTML doc suppressed from mondo tree
  • new doc generated on the fly during build of packages
File size: 1.8 KB
Line 
1TARGET=mondorescue-howto
2SRC=$(shell ls *.sgml)
3DSL=$(TARGET).dsl
4IMAGESDIR=images
5IMAGES=$(shell ls ${IMAGESDIR}/*.png | sed 's/\.png/.eps/g')
6
7all: $(TARGET).ps $(TARGET).pdf $(TARGET)/index.html $(TARGET).txt $(TARGET).html $(TARGET).rtf
8
9${IMAGESDIR}/%.eps: ${IMAGESDIR}/%.png
10 @echo "Converting $< to $@"
11 @convert $< $@
12
13$(TARGET).txt: $(SRC)
14 @echo ""
15 @echo "Generating doc in TXT format"
16 @echo "----------------------------"
17 @docbook2txt $(TARGET).sgml
18
19$(TARGET).ps: $(SRC) $(DSL) $(IMAGES)
20 @echo ""
21 @echo "Generating doc in PostScript format"
22 @echo "-----------------------------------"
23 @docbook2ps -d $(TARGET).dsl'#print' $(TARGET).sgml
24
25$(TARGET)/index.html: $(SRC) $(DSL) $(IMAGES)
26 @echo ""
27 @echo "Generating all HTML pages"
28 @echo "-------------------------"
29 @rm -fr $(TARGET)
30 @docbook2html -d $(TARGET).dsl'#html' -o $(TARGET) $(TARGET).sgml
31
32$(TARGET).html: $(SRC) $(DSL) $(IMAGES)
33 @echo ""
34 @echo "Generating doc in HTML format"
35 @echo "-----------------------------"
36 @docbook2html -u -d $(TARGET).dsl'#txt' $(TARGET).sgml
37
38$(TARGET).pdf: $(SRC) $(DSL) $(IMAGES)
39 @echo ""
40 @echo "Generating doc in PDF format"
41 @echo "----------------------------"
42 @docbook2pdf -d $(TARGET).dsl'#pdf' $(TARGET).sgml
43
44$(TARGET).rtf: $(SRC) $(DSL) $(IMAGES)
45 @echo ""
46 @echo "Generating doc in RTF format"
47 @echo "----------------------------"
48 @docbook2rtf -d $(TARGET).dsl'#print' $(TARGET).sgml
49
50clean:
51 @echo ""
52 @echo "Cleaning up the documentation directory"
53 @echo ""
54 @rm -fr $(TARGET).{aux,log,out,tex,dvi,pdf,ps,txt,rtf,html} $(TARGET)
55
56install: all
57 @echo ""
58 @echo "Delivering mondorescue documentation"
59 @echo ""
60 @if [ "${INSTALLDIR}" != "" ]; then 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.