Changeset 401 in MondoRescue for branches/stable/documentation/Makefile.man


Ignore:
Timestamp:
Feb 17, 2006, 3:37:04 PM (18 years ago)
Author:
bcornec
Message:
  • Integrate some SuSE patches and spec tips
  • all the doc is now under documentation (man pages, pdf, generated doc)
  • delivery process adapted consequently
File:
1 moved

Legend:

Unmodified
Added
Removed
  • branches/stable/documentation/Makefile.man

    r399 r401  
    11#
    2 # Makefile for mondorescue documentation build
     2# Makefile for mondorescue man pages
    33#
    44# $Id$
    55#
    6 TARGET=mondorescue-howto
    7 SRC=$(shell ls *.sgml)
    8 DSL=$(TARGET).dsl
    9 IMAGESDIR=images
    10 IMAGES=$(shell ls ${IMAGESDIR}/*.png | sed 's/\.png/.eps/g')
     6MANPAGES=$(shell ls *.8)
     7HTMLSET=$(shell echo ${MANPAGES} | sed 's~.8~.8.html~g')
     8PDFSET=$(shell echo ${MANPAGES} | sed 's~.8~.8.pdf~g')
     9PSSET=$(shell echo ${MANPAGES} | sed 's~.8~.8.ps~g')
     10TXTSET=$(shell echo ${MANPAGES} | sed 's~.8~.8.txt~g')
    1111
    12 #
    13 # Man pages handling
    14 #
    15 MRMPDIR=../mondo/mondo/mondorestore
    16 MRMPNAM=mondorestore.8
    17 MAMPDIR=../mondo/mondo/mondoarchive
    18 MAMPNAM=mondoarchive.8
    19 MIMPDIR=../mindi
    20 MIMPNAM=mindi.8
    21 
    22 all: all-howto all-man
    23 
    24 all-howto: $(TARGET).ps $(TARGET).pdf $(TARGET)/index.html $(TARGET).txt $(TARGET).html $(TARGET).rtf
    25 
    26 all-man: .all-man-html .all-man-pdf .all-man-txt
    27 
    28 .all-man-html: $(MRMPNAM).html $(MAMPNAM).html $(MIMPNAM).html
     12.all-html: $(HTMLSET)
    2913    @echo ""
    3014    @echo "Generating Man pages in HTML format"
    3115    @echo "-----------------------------------"
    32     @touch .all-man-html
     16    @touch .all-html
    3317
    34 .all-man-pdf: $(MRMPNAM).pdf $(MAMPNAM).pdf $(MIMPNAM).pdf
     18.all-pdf: $(PDFSET)
    3519    @echo ""
    36     @echo "Generating Man pages in PDF and PS format"
     20    @echo "Generating Man pages in PDF format"
    3721    @echo "-----------------------------------------"
    38     @touch .all-man-pdf
     22    @touch .all-pdf
    3923
    40 .all-man-txt: $(MRMPNAM).txt $(MAMPNAM).txt $(MIMPNAM).txt
     24.all-ps: $(PSSET)
     25    @echo ""
     26    @echo "Generating Man pages in PS format"
     27    @echo "-----------------------------------------"
     28    @touch .all-ps
     29
     30.all-txt: $(TXTSET)
    4131    @echo ""
    4232    @echo "Generating Man pages in TXT format"
    4333    @echo "----------------------------------"
    44     @touch .all-man-txt
     34    @touch .all-txt
    4535
    46 $(MRMPNAM).html: $(MRMPDIR)/$(MRMPNAM)
     36%.8.html: %.8
    4737    @man2html -r $< > $@
    4838
    49 $(MAMPNAM).html: $(MAMPDIR)/$(MAMPNAM)
    50     @man2html -r $< > $@
     39%.8.ps: %.8
     40    @man2dvi ./$< > $<.dvi
     41    @dvips $<.dvi -o $@
     42    @rm -f $<.dvi
    5143
    52 $(MIMPNAM).html: $(MIMPDIR)/$(MIMPNAM)
    53     @man2html -r $< > $@
    54 
    55 $(MRMPNAM).ps: $(MRMPDIR)/$(MRMPNAM)
    56     @man2dvi $< > $(MRMPNAM).dvi
    57     @dvips $(MRMPNAM).dvi -o $@
    58     @rm -f $(MRMPNAM).dvi
    59 
    60 $(MAMPNAM).ps: $(MAMPDIR)/$(MAMPNAM)
    61     @man2dvi $< > $(MAMPNAM).dvi
    62     @dvips $(MAMPNAM).dvi -o $@
    63     @rm -f $(MAMPNAM).dvi
    64 
    65 $(MIMPNAM).ps: $(MIMPDIR)/$(MIMPNAM)
    66     @man2dvi $< > $(MIMPNAM).dvi
    67     @dvips $(MIMPNAM).dvi -o $@
    68     @rm -f $(MIMPNAM).dvi
    69 
    70 $(MRMPNAM).pdf: $(MRMPNAM).ps
     44%.8.pdf: %.8.ps
    7145    @ps2pdf $<
    7246
    73 $(MAMPNAM).pdf: $(MAMPNAM).ps
    74     @ps2pdf $<
    75 
    76 $(MIMPNAM).pdf: $(MIMPNAM).ps
    77     @ps2pdf $<
    78 
    79 $(MRMPNAM).txt: $(MRMPDIR)/$(MRMPNAM)
     47%.8.txt: %.8
    8048    @nroff -man $< > $@
    8149
    82 $(MAMPNAM).txt: $(MAMPDIR)/$(MAMPNAM)
    83     @nroff -man $< > $@
    84 
    85 $(MIMPNAM).txt: $(MIMPDIR)/$(MIMPNAM)
    86     @nroff -man $< > $@
    87 
    88 ${IMAGESDIR}/%.eps: ${IMAGESDIR}/%.png
    89     @echo "Converting $< to $@"
    90     @convert $< $@
    91        
    92 $(TARGET).txt: $(SRC)
    93     @echo ""
    94     @echo "Generating doc in TXT format"
    95     @echo "----------------------------"
    96     @docbook2txt $(TARGET).sgml
    97 
    98 $(TARGET).ps: $(SRC) $(DSL) $(IMAGES)
    99     @echo ""
    100     @echo "Generating doc in PostScript format"
    101     @echo "-----------------------------------"
    102     @docbook2ps -d $(TARGET).dsl'#print' $(TARGET).sgml
    103 
    104 $(TARGET)/index.html: $(SRC) $(DSL) $(IMAGES)
    105     @echo ""
    106     @echo "Generating all HTML pages"
    107     @echo "-------------------------"
    108     @rm -fr $(TARGET)
    109     @docbook2html -d $(TARGET).dsl'#html' -o $(TARGET) $(TARGET).sgml
    110 
    111 $(TARGET).html: $(SRC) $(DSL) $(IMAGES)
    112     @echo ""
    113     @echo "Generating doc in HTML format"
    114     @echo "-----------------------------"
    115     @docbook2html -u -d $(TARGET).dsl'#txt' $(TARGET).sgml
    116    
    117 $(TARGET).pdf: $(SRC) $(DSL) $(IMAGES)
    118     @echo ""
    119     @echo "Generating doc in PDF format"
    120     @echo "----------------------------"
    121     @docbook2pdf -d $(TARGET).dsl'#pdf' $(TARGET).sgml
    122 
    123 $(TARGET).rtf: $(SRC) $(DSL) $(IMAGES)
    124     @echo ""
    125     @echo "Generating doc in RTF format"
    126     @echo "----------------------------"
    127     @docbook2rtf -d $(TARGET).dsl'#print' $(TARGET).sgml
     50all: .all-html .all-pdf .all-ps .all-txt
    12851
    12952clean:
    13053    @echo ""
    131     @echo "Cleaning up the documentation directory"
     54    @echo "Cleaning up the documentation directory for man pages"
    13255    @echo ""
    133     @rm -fr $(TARGET).{aux,log,out,tex,dvi,pdf,ps,txt,rtf,html} $(TARGET)
     56    @rm -f *.8.{dvi,pdf,ps,txt,html}
    13457
    135 install: all
     58install-mindi: all
    13659    @echo ""
    137     @echo "Delivering mondorescue documentation"
     60    @echo "Delivering mindi man page"
    13861    @echo ""
    139     @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
     62    @if [ "${INSTALLDIR}" != "" ]; then mkdir -p ${INSTALLDIR} ; cp -a mindi.8.{html,pdf,ps,txt} mindi.8 ${INSTALLDIR} ; else echo "No INSTALLDIR specified aborting install"; fi
     63
     64install-mondo: all
     65    @echo ""
     66    @echo "Delivering mondo man pages"
     67    @echo ""
     68    @if [ "${INSTALLDIR}" != "" ]; then mkdir -p ${INSTALLDIR} ; cp -a mondo*.8.{html,pdf,ps,txt} mondo*.8 ${INSTALLDIR} ; else echo "No INSTALLDIR specified aborting install"; fi
Note: See TracChangeset for help on using the changeset viewer.