1 ###################################################################
3 # $Id: Makefile.jade,v 1.2 2002/12/13 17:23:00 bdenney Exp $
5 # Builds documentation in various formats from SGML source, and
6 # allows easy update to the Bochs web site.
8 ###################################################################
10 # name of the major documentation sections
11 SECTIONS=user documentation development
13 # these files get installed in addition to the sections
14 EXTRAS=README index.html images include
16 # complete list of what to install
17 INSTALL_LIST=$(SECTIONS) $(EXTRAS)
19 # ssh to this server to install the docs
20 REMOTE_HOST=shell.sf.net
22 # path of preexisting install in, on the remote server. Each section
23 # will go into a subdirectory of $REMOTE_PATH, as in
25 REMOTE_PATH=/home/groups/b/bo/bochs/htdocs/doc/docbook
27 # -x means don't try to forward X authorization, it won't work for SF
30 # docbook defines and stuff
31 DSSSL_ROOT=/usr/share/sgml/docbook/stylesheet/dsssl/modular/
32 HTML_STYLESHEET=$(DSSSL_ROOT)/html/docbook.dsl
34 JADE_ARGS=-t sgml -d $(HTML_STYLESHEET) # -V nochunks
35 SGML_VALIDATE=nsgmls -s
39 all_html: user/book1.html documentation/book1.html development/book1.html
41 user/book1.html: user/user.dbk
43 export i=user; cd $$i; $(JADE) $(JADE_ARGS) $$i.dbk
44 cp user/book1.htm user/book1.html
46 documentation/book1.html: documentation/documentation.dbk
47 rm -f documentation/*.htm*
48 export i=documentation; cd $$i; $(JADE) $(JADE_ARGS) $$i.dbk
49 cp documentation/book1.htm documentation/book1.html
51 development/book1.html: development/development.dbk
52 rm -f development/*.htm*
53 export i=development; cd $$i; $(JADE) $(JADE_ARGS) $$i.dbk
54 cp development/book1.htm development/book1.html
57 for i in $(SECTIONS); do $(SGML_VALIDATE) $$i/$$i.dbk; done
59 # install the stuff on the remote server using ssh. The bryce->bdenney
60 # stuff is just because Bryce's local username and sourceforge
61 # username don't match. If your usernames match then the "whoami"
64 # fix <TITLE> tags in all html files
65 ./fixtitles.pl `find . -name '*.htm'`
66 ./fixtitles.pl `find . -name '*.html'`
67 # fix permissions locally so that tar will install things right
68 chmod 664 `find $(INSTALL_LIST) -type f -print`
69 chmod 775 `find $(INSTALL_LIST) -type d -print`
71 @echo Installing documentation on $(REMOTE_PATH)
73 bryce) sfuser=bdenney;; \
74 daemian) sfuser=vasudeva;; \
75 *) sfuser=`whoami`;; \
77 tar cf - $(INSTALL_LIST) | \
78 $(SSH) $$sfuser@$(REMOTE_HOST) "cd $(REMOTE_PATH) && umask 002 && tar xvf -"
81 #remove generated files
82 for S in $(SECTIONS); do \
83 rm -f $$S/*.htm* $$S/*.ps $$S/*.pdf $$S/*.out $$S/*.rtf $$S/*.tex $$S/*.fot; \