Changeset 2477 for box/trunk/docs


Ignore:
Timestamp:
28/03/2009 15:41:09 (3 years ago)
Author:
chris
Message:

Fix the docs Makefile to work on both linux and BSD again.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • box/trunk/docs/Makefile

    r2474 r2477  
    1313MANXSL = $(DOCBOOK_DIR)/bb-man.xsl 
    1414 
    15 # VPATH= adminguide 
    16 # .SUFFIXES: .html .xml .1 .5 .8 
     15VPATH = $(DOCBOOK_DIR) 
     16.SUFFIXES: .html .xml .gz .1 .5 .8 
    1717 
    1818all: docs 
     
    2424        @cp $(DOCBOOK_DIR)/html/*.ico $(HTML_DIR)/. 
    2525 
    26 adminguide: $(HTML_DIR)/adminguide/index.html  
     26adminguide: $(DOCBOOK_DIR)/ExceptionCodes.xml $(HTML_DIR)/adminguide/index.html  
    2727 
    28 $(HTML_DIR)/adminguide/index.html: $(DOCBOOK_DIR)/adminguide.xml $(DOCBOOK_DIR)/ExceptionCodes.xml $(BOOKXSL) 
    29         # docname=`echo $@ | sed -e 's/\/index.html//'` 
    30         $(DBPROC) -o $(HTML_DIR)/adminguide/ $(BOOKXSL) $< 
     28# all sources ($>) is exactly the right args for xsltproc 
     29$(HTML_DIR)/adminguide/index.html: $(BOOKXSL) $(DOCBOOK_DIR)/adminguide.xml 
     30        $(DBPROC) -o $(HTML_DIR)/adminguide/ $> 
    3131 
    3232instguide: $(HTML_DIR)/instguide/index.html  
    3333 
    34 $(HTML_DIR)/instguide/index.html: $(DOCBOOK_DIR)/instguide.xml $(BOOKXSL) 
    35         $(DBPROC) -o $(HTML_DIR)/instguide/ $(BOOKXSL) $< 
     34$(HTML_DIR)/instguide/index.html: $(BOOKXSL) $(DOCBOOK_DIR)/instguide.xml 
     35        $(DBPROC) -o $(HTML_DIR)/instguide/ $> 
    3636 
     37# $< is empty on BSD make when making this rule, $> has all sources 
     38# $< has the target on GNU make, $> is empty 
    3739$(DOCBOOK_DIR)/ExceptionCodes.xml: ../ExceptionCodes.txt 
    38         perl tools/generate_except_xml.pl $< $@ 
     40        perl tools/generate_except_xml.pl $< $> $@ 
    3941 
    4042manpages: $(MANXSL) man-dirs man-nroff man-html 
     
    5961 
    6062man/.there: 
    61         then mkdir -p man 
     63        mkdir -p man 
    6264        touch man/.there 
    6365 
     
    7779man-html: $(HTML_FILES) 
    7880 
     81# GNU make 
    7982$(HTML_DIR)/man-html/%.html: $(DOCBOOK_DIR)/%.xml $(NOCHUNKBOOKXSL) 
    8083        $(DBPROC) -o $@ $(NOCHUNKBOOKXSL) $< 
    8184 
     85# GNU make 
    8286$(MAN_DIR)/%.8.gz: $(DOCBOOK_DIR)/%.xml $(MANXSL) 
    8387        $(DBPROC) -o $(@:.gz=) $(MANXSL) $< 
    8488        gzip $(@:.gz=) 
    8589 
     90# GNU make 
    8691$(MAN_DIR)/%.5.gz: $(DOCBOOK_DIR)/%.xml $(MANXSL) 
    8792        $(DBPROC) -o $(@:.gz=) $(MANXSL) $< 
    8893        gzip $(@:.gz=) 
     94 
     95# BSD make: the final colon (:) is required to make this line valid syntax 
     96# for a dummy rule in GNU make. It creates a dummy rule in BSD make too. 
     97# Both dummy rules are harmless. 
     98.for MAN_PAGE in $(NROFF_PAGES) : 
     99$(MAN_DIR)/$(MAN_PAGE).gz: $(DOCBOOK_DIR)/$(MAN_PAGE:R).xml 
     100        $(DBPROC) -o $(.TARGET:.gz=) $(MANXSL) $> 
     101        gzip $(@:.gz=) 
     102 
     103$(HTML_DIR)/man-html/$(MAN_PAGE:R).html: $(DOCBOOK_DIR)/$(MAN_PAGE:R).xml 
     104        $(DBPROC) -o $@ $(NOCHUNKBOOKXSL) $> 
     105.endfor : 
    89106 
    90107dockit: clean docs 
Note: See TracChangeset for help on using the changeset viewer.