1 ###################################################################
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 ###################################################################
12 docdir
= $(prefix)/share
/doc
/bochs
13 DOCBOOK2HTML
= @DOCBOOK2HTML@
15 TARGZ
= bochsdoc.
tar.gz
16 RENDERED_DOC_URL
= http
://bochs.sf.net
/doc
/docbook
/$(TARGZ
)
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
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
43 user
/index.html
: $(srcdir)/user
/user.dbk
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
53 $(DOCBOOK2HTML
) -o development
$(srcdir)/development
/development.dbk
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`
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
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
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.
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
92 $(WGET
) $(RENDERED_DOC_URL
)
93 gunzip
-c
$(TARGZ
) |
tar xvf
-
97 # remove generated files
98 for S in
$(SECTIONS
); do \
99 rm -f
$$S/*.html
$$S/*.htm
$$S/*.ps
$$S/*.pdf
$$S/*.out
; \