Changeset 2474


Ignore:
Timestamp:
28/03/2009 12:25:05 (3 years ago)
Author:
chris
Message:

Reorganise docs in trunk to match distribution layout, which is cleaner,
and makes Makefile work on distributions and trunk equally.

Location:
box/trunk
Files:
3 added
2 edited
22 moved

Legend:

Unmodified
Added
Removed
  • box/trunk/distribution/boxbackup/DISTRIBUTION-MANIFEST.txt

    r2473 r2474  
    2020test/bbackupd/testfiles 
    2121test/backupdiff 
    22 docs/api-docs/raidfile docs/api-notes 
    23 docs/api-docs/raidfile/lib_raidfile docs/api-notes/lib_raidfile 
    24 docs/api-docs/backup docs/api-notes 
    25 docs/box-html docs/htmlguide 
    26 docs/box-html/adminguide docs/htmlguide/adminguide 
    27 docs/box-html/images docs/htmlguide/images 
    28 docs/box-html/instguide docs/htmlguide/instguide 
    29 docs/box-html/man-html docs/htmlguide/manpages 
     22docs/Makefile 
     23docs/tools 
     24docs/api-notes 
     25docs/api-notes/lib_raidfile 
     26docs/htmlguide 
     27docs/htmlguide/adminguide 
     28docs/htmlguide/images 
     29docs/htmlguide/instguide 
     30docs/htmlguide/manpages 
    3031docs/man 
    31 MKDIR docs/docbook 
    32 RUN cd docs; sed -i"" -e '/^ExceptionCodes/,/^$/s/\(.*\)/# &/' Makefile 
    33 docs/Makefile docs/docbook/Makefile 
    34 docs/ExceptionCodes.xml docs/docbook/ExceptionCodes.xml 
    35 docs/adminguide.xml docs/docbook/adminguide.xml 
    36 docs/bb-book.xsl docs/docbook/bb-book.xsl 
    37 docs/bb-man.xsl.tmpl docs/docbook/bb-man.xsl.tmpl 
    38 docs/bb-nochunk-book.xsl docs/docbook/bb-nochunk-book.xsl 
    39 docs/bbackupctl.xml docs/docbook/bbackupctl.xml 
    40 docs/bbackupd-config.xml docs/docbook/bbackupd-config.xml 
    41 docs/bbackupd.conf.xml docs/docbook/bbackupd.conf.xml 
    42 docs/bbackupd.xml docs/docbook/bbackupd.xml 
    43 docs/bbackupquery.xml docs/docbook/bbackupquery.xml 
    44 docs/bbstoreaccounts.xml docs/docbook/bbstoreaccounts.xml 
    45 docs/bbstored-certs.xml docs/docbook/bbstored-certs.xml 
    46 docs/bbstored-config.xml docs/docbook/bbstored-config.xml 
    47 docs/bbstored.conf.xml docs/docbook/bbstored.conf.xml 
    48 docs/bbstored.xml docs/docbook/bbstored.xml 
    49 docs/instguide.xml docs/docbook/instguide.xml 
    50 docs/raidfile-config.xml docs/docbook/raidfile-config.xml 
    51 docs/raidfile.conf.xml docs/docbook/raidfile.conf.xml 
    52 docs/html docs/docbook/html 
    53 docs/html/images docs/docbook/html/images 
    54 RUN svn revert docs/Makefile 
     32# RUN cd docs; sed -i"" -e '/^ExceptionCodes/,/^$/s/\(.*\)/# &/' Makefile 
     33docs/docbook/Makefile 
     34docs/docbook/ExceptionCodes.xml 
     35docs/docbook/adminguide.xml 
     36docs/docbook/bb-book.xsl 
     37docs/docbook/bb-man.xsl.tmpl 
     38docs/docbook/bb-nochunk-book.xsl 
     39docs/docbook/bbackupctl.xml 
     40docs/docbook/bbackupd-config.xml 
     41docs/docbook/bbackupd.conf.xml 
     42docs/docbook/bbackupd.xml 
     43docs/docbook/bbackupquery.xml 
     44docs/docbook/bbstoreaccounts.xml 
     45docs/docbook/bbstored-certs.xml 
     46docs/docbook/bbstored-config.xml 
     47docs/docbook/bbstored.conf.xml 
     48docs/docbook/bbstored.xml 
     49docs/docbook/instguide.xml 
     50docs/docbook/raidfile-config.xml 
     51docs/docbook/raidfile.conf.xml 
     52docs/docbook/html 
     53docs/docbook/html/images 
     54# RUN svn revert docs/Makefile 
    5555TODO.txt 
    5656BUGS.txt 
  • box/trunk/docs/Makefile

    r2410 r2474  
    44 
    55DBPROC=xsltproc 
    6 BOOKXSL=bb-book.xsl 
    7 NOCHUNKBOOKXSL=bb-nochunk-book.xsl 
    8 MANXSL=bb-man.xsl 
    9 HTMLPREFIX=box-html 
    10 VPATH= adminguide 
    11 .SUFFIXES: .html .xml .1 .5 .8 
     6 
     7DOCBOOK_DIR = docbook 
     8HTML_DIR = htmlguide 
     9MAN_DIR = man 
     10 
     11BOOKXSL = $(DOCBOOK_DIR)/bb-book.xsl 
     12NOCHUNKBOOKXSL = $(DOCBOOK_DIR)/bb-nochunk-book.xsl 
     13MANXSL = $(DOCBOOK_DIR)/bb-man.xsl 
     14 
     15# VPATH= adminguide 
     16# .SUFFIXES: .html .xml .1 .5 .8 
    1217 
    1318all: docs 
    1419 
    1520docs: instguide adminguide manpages 
    16         @mkdir -p $(HTMLPREFIX)/images 
    17         @cp html/images/*.png $(HTMLPREFIX)/images/. 
    18         @cp html/*.css $(HTMLPREFIX)/. 
     21        @mkdir -p $(HTML_DIR)/images 
     22        @cp $(DOCBOOK_DIR)/html/images/*.png $(HTML_DIR)/images/. 
     23        @cp $(DOCBOOK_DIR)/html/*.css $(HTML_DIR)/. 
     24        @cp $(DOCBOOK_DIR)/html/*.ico $(HTML_DIR)/. 
    1925 
    20 adminguide: $(HTMLPREFIX)/adminguide/index.html  
     26adminguide: $(HTML_DIR)/adminguide/index.html  
    2127 
    22 $(HTMLPREFIX)/adminguide/index.html: adminguide.xml ExceptionCodes.xml $(BOOKXSL) 
     28$(HTML_DIR)/adminguide/index.html: $(DOCBOOK_DIR)/adminguide.xml $(DOCBOOK_DIR)/ExceptionCodes.xml $(BOOKXSL) 
    2329        # docname=`echo $@ | sed -e 's/\/index.html//'` 
    24         $(DBPROC) -o $(HTMLPREFIX)/adminguide/ $(BOOKXSL) adminguide.xml 
     30        $(DBPROC) -o $(HTML_DIR)/adminguide/ $(BOOKXSL) $< 
    2531 
    26 instguide: $(HTMLPREFIX)/instguide/index.html  
     32instguide: $(HTML_DIR)/instguide/index.html  
    2733 
    28 $(HTMLPREFIX)/instguide/index.html: instguide.xml $(BOOKXSL) 
    29         $(DBPROC) -o $(HTMLPREFIX)/instguide/ $(BOOKXSL) instguide.xml 
     34$(HTML_DIR)/instguide/index.html: $(DOCBOOK_DIR)/instguide.xml $(BOOKXSL) 
     35        $(DBPROC) -o $(HTML_DIR)/instguide/ $(BOOKXSL) $< 
    3036 
    31 ExceptionCodes.xml: ../ExceptionCodes.txt 
    32         perl ./generate_except_xml.pl 
     37$(DOCBOOK_DIR)/ExceptionCodes.xml: ../ExceptionCodes.txt 
     38        perl tools/generate_except_xml.pl $< $@ 
    3339 
    3440manpages: $(MANXSL) man-dirs man-nroff man-html 
     
    4652         sed -e "s,%%DOCBOOK%%,$${DOCBOOK}," $(MANXSL).tmpl > $(MANXSL) 
    4753 
    48 man-dirs: man/.there $(HTMLPREFIX)/man-html/.there 
     54man-dirs: man/.there $(HTML_DIR)/man-html/.there 
    4955 
    50 $(HTMLPREFIX)/man-html/.there: 
    51         if [ ! -d $(HTMLPREFIX)/man-html ]; then mkdir -p $(HTMLPREFIX)/man-html; touch $(HTMLPREFIX)/man-html/.there; fi 
     56$(HTML_DIR)/man-html/.there: 
     57        mkdir -p $(HTML_DIR)/man-html 
     58        touch $(HTML_DIR)/man-html/.there 
    5259 
    5360man/.there: 
    54         if [ ! -d man ]; then mkdir man; touch man/.there; fi 
     61        then mkdir -p man 
     62        touch man/.there 
    5563 
    5664NROFF_PAGES = bbackupd.8 bbackupd-config.8 bbackupctl.8 bbackupquery.8 \ 
     
    5967        bbackupd.conf.5 bbstored.conf.5 raidfile.conf.5 
    6068 
    61 man-nroff: $(NROFF_PAGES) 
     69NROFF_FILES = $(NROFF_PAGES:%=$(MAN_DIR)/%.gz) 
    6270 
    63 HTML_PAGES = bbackupd.html bbackupd-config.html bbackupctl.html \ 
    64         bbackupquery.html bbstored.html bbstored-config.html \ 
    65         bbstoreaccounts.html bbstored-certs.html raidfile-config.html \ 
    66         bbackupd.conf.html bbstored.conf.html raidfile.conf.html 
     71man-nroff: $(NROFF_FILES) 
    6772 
    68 man-html: $(HTML_PAGES) 
     73HTML_FILES_1 = $(NROFF_PAGES:%.5=%.html) 
     74HTML_FILES_2 = $(HTML_FILES_1:%.8=%.html) 
     75HTML_FILES   = $(HTML_FILES_2:%=$(HTML_DIR)/man-html/%) 
    6976 
    70 .xml.html: 
    71         @$(DBPROC) -o $@ $(NOCHUNKBOOKXSL) $< 
    72         @cp $@ $(HTMLPREFIX)/man-html/. 
     77man-html: $(HTML_FILES) 
    7378 
    74 .xml.8 .xml.5: $(MANXSL) 
    75         @$(DBPROC) -o $@ $(MANXSL) $< 
    76         @cp $@ man/ 
    77         @rm -f man/$@.gz 
    78         @gzip -f -9 man/$@ 
     79$(HTML_DIR)/man-html/%.html: $(DOCBOOK_DIR)/%.xml $(NOCHUNKBOOKXSL) 
     80        $(DBPROC) -o $@ $(NOCHUNKBOOKXSL) $< 
     81 
     82$(MAN_DIR)/%.8.gz: $(DOCBOOK_DIR)/%.xml $(MANXSL) 
     83        $(DBPROC) -o $(@:.gz=) $(MANXSL) $< 
     84        gzip $(@:.gz=) 
     85 
     86$(MAN_DIR)/%.5.gz: $(DOCBOOK_DIR)/%.xml $(MANXSL) 
     87        $(DBPROC) -o $(@:.gz=) $(MANXSL) $< 
     88        gzip $(@:.gz=) 
    7989 
    8090dockit: clean docs 
    81         tar zcf documentation-kit-0.10.tar.gz $(HTMLPREFIX)/ 
     91        tar zcf documentation-kit-0.10.tar.gz $(HTML_DIR)/ 
    8292 
    8393clean: 
    84         if [ -d ./$(HTMLPREFIX) ]; then rm -rf $(HTMLPREFIX) ; fi 
    85         if [ -d ./man ]; then  rm -rf ./man/; fi 
    86         if [ -f ExceptionCodes.xml ]; then rm ExceptionCodes.xml; fi 
    87         rm -f $(NROFF_PAGES) $(HTML_PAGES) 
    88         if [ -f documentation-kit-0.10.tar.gz ]; then rm documentation-kit-0.10.tar.gz; fi 
     94        rm -f $(HTML_FILES) 
     95        rm -f $(NROFF_FILES) 
     96        rm -f $(DOCBOOK_DIR)/ExceptionCodes.xml 
     97        rm -f documentation-kit-0.10.tar.gz 
    8998 
    9099 
  • box/trunk/docs/tools/generate_except_xml.pl

    r2151 r2474  
    22use strict; 
    33 
    4 open (EXCEPT, "<../ExceptionCodes.txt") or die "Can't open ../ExceptionCodes.txt: $!\n"; 
    5 open (DOCBOOK, ">ExceptionCodes.xml") or die "Can't open Exceptioncodes.xml for writing: $!\n"; 
     4open (EXCEPT,  "< $ARGV[0]") or die "Can't open $ARGV[0]: $!\n"; 
     5open (DOCBOOK, "> $ARGV[1]") or die "Can't open $ARGV[1] for writing: $!\n"; 
    66 
    77print DOCBOOK <<EOD; 
Note: See TracChangeset for help on using the changeset viewer.