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

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