- added instructions how to update the online documentation
[bochs-mirror.git] / doc / docbook / Makefile.in
blobea60bc0e9e30442b83c587b4eeaae6abb038c4d6
1 ###################################################################
2 # doc/docbook/Makefile
3 # $Id: Makefile.in,v 1.22 2008/02/05 22:33:34 sshwarts Exp $
5 # Builds documentation in various formats from SGML source, and
6 # allows easy update to the Bochs web site.
8 ###################################################################
10 prefix = @prefix@
11 srcdir = @srcdir@
12 docdir = $(prefix)/share/doc/bochs
13 DOCBOOK2HTML = @DOCBOOK2HTML@
14 WGET = @WGET@
15 TARGZ = bochsdoc.tar.gz
16 RENDERED_DOC_URL = http://bochs.sf.net/doc/docbook/$(TARGZ)
18 DESTDIR=
20 # name of the major documentation sections
21 SECTIONS=user documentation development
22 SECTION_HTML=$(SECTIONS:%=%/index.html)
24 # these files get installed in addition to the sections
25 EXTRAS=index.html images
27 # complete list of what to install
28 INSTALL_LIST=$(SECTIONS) $(EXTRAS)
30 # ssh to this server to install the docs
31 REMOTE_HOST=shell.sf.net
33 # path of preexisting install on the remote server. Each section
34 # will go into a subdirectory of $REMOTE_PATH, as in
35 # $REMOTE_PATH/user.
36 REMOTE_PATH=/home/groups/b/bo/bochs/htdocs/doc/docbook
38 # -x means don't try to forward X authorization, it won't work for SF
39 SSH=ssh -x
41 all: $(SECTION_HTML)
43 user/index.html: $(srcdir)/user/user.dbk
44 -mkdir -p user
45 $(DOCBOOK2HTML) -o user $(srcdir)/user/user.dbk
47 documentation/index.html: $(srcdir)/documentation/documentation.dbk
48 -mkdir -p documentation
49 $(DOCBOOK2HTML) -o documentation $(srcdir)/documentation/documentation.dbk
51 development/index.html: $(srcdir)/development/development.dbk
52 -mkdir -p development
53 $(DOCBOOK2HTML) -o development $(srcdir)/development/development.dbk
55 fixperm::
56 # fix permissions locally so that tar will install things right
57 chmod 664 `find $(INSTALL_LIST) -type f -print`
58 chmod 775 `find $(INSTALL_LIST) -type d -print`
60 copy_from_srcdir::
61 for i in $(EXTRAS); do if test -e $(srcdir)/$$i -a ! -e $$i; then cp -r $(srcdir)/$$i $$i; fi; done
63 $(TARGZ): all copy_from_srcdir fixperm
64 rm -f $(TARGZ)
65 tar cf - --exclude=CVS --exclude=.cvsignore --exclude=*.dbk $(INSTALL_LIST) | gzip > $(TARGZ)
67 install: all copy_from_srcdir
68 for i in $(DESTDIR)$(docdir); do if test ! -d $$i; then mkdir -p $$i; fi; done
69 #for i in $(INSTALL_LIST); do cp -r $$i $(DESTDIR)$(docdir); done
70 for i in $(INSTALL_LIST); do tar cf - --exclude=CVS --exclude=.cvsignore --exclude=*.dbk $$i | ( cd $(DESTDIR)$(docdir); tar xf - ); done
72 test_sfuser:
73 @if test "$$SFUSER" = ""; then SFUSER=`whoami`; export SFUSER; fi; \
74 echo Your Source Forge username is $${SFUSER}.
75 @echo 'If this is not correct, set the environment variable $$SFUSER.'
77 # Install the stuff on the remote server using ssh. It will assume that your
78 # local username is the same as your Source Forge username, unless you define
79 # an environment variable SFUSER.
80 webinst: $(TARGZ)
81 # copy to remote
82 @echo Installing documentation on $(REMOTE_PATH)
83 if test "$$SFUSER" = ""; then SFUSER=`whoami`; export SFUSER; fi; \
84 scp $(TARGZ) $${SFUSER}@$(REMOTE_HOST):$(REMOTE_PATH); \
85 $(SSH) $${SFUSER}@$(REMOTE_HOST) "cd $(REMOTE_PATH) && umask 002 && gunzip -c $(TARGZ) | tar xvf -"
87 # Download rendered docs in a TAR file from the Bochs web site using wget.
88 # This is useful for getting documentation onto platforms that don't have
89 # docbook tools.
90 dl_docs::
91 rm -f $(TARGZ)
92 $(WGET) $(RENDERED_DOC_URL)
93 gunzip -c $(TARGZ) | tar xvf -
94 touch */*.html
96 clean:
97 # remove generated files
98 for S in $(SECTIONS); do \
99 rm -f $$S/*.html $$S/*.htm $$S/*.ps $$S/*.pdf $$S/*.out; \
100 done
101 @RMCOMMAND@ $(TARGZ)
103 dist-clean: clean
104 rm -f Makefile