2001-06-15 04:40:42 +04:00
|
|
|
###################################################################
|
|
|
|
# doc/docbook/Makefile
|
2011-02-25 18:32:08 +03:00
|
|
|
# $Id$
|
2001-06-15 04:40:42 +04:00
|
|
|
#
|
|
|
|
# Builds documentation in various formats from SGML source, and
|
|
|
|
# allows easy update to the Bochs web site.
|
|
|
|
#
|
|
|
|
###################################################################
|
|
|
|
|
2002-12-13 20:20:27 +03:00
|
|
|
prefix = @prefix@
|
2002-12-13 22:26:11 +03:00
|
|
|
srcdir = @srcdir@
|
2020-01-27 21:22:12 +03:00
|
|
|
abs_srcdir = @abs_srcdir@
|
2002-12-13 20:20:27 +03:00
|
|
|
docdir = $(prefix)/share/doc/bochs
|
2005-07-30 19:04:26 +04:00
|
|
|
WGET = @WGET@
|
2002-12-15 00:24:55 +03:00
|
|
|
TARGZ = bochsdoc.tar.gz
|
2021-06-13 11:02:33 +03:00
|
|
|
RENDERED_DOC_URL = https://bochs.sourceforge.io/doc/docbook/$(TARGZ)
|
2002-12-13 20:20:27 +03:00
|
|
|
|
2020-01-27 21:22:12 +03:00
|
|
|
# docbook-utils build if found
|
|
|
|
DOCBOOK2HTML = @DOCBOOK2HTML@
|
|
|
|
ifeq ($(DOCBOOK2HTML), not_found)
|
|
|
|
# jade build
|
|
|
|
HTML_STYLESHEET = $(abs_srcdir)/include/docbook-utils.dsl\#html
|
|
|
|
JADE = @JADE@
|
|
|
|
JADE_ARGS = -t sgml -i html -d $(HTML_STYLESHEET) # -V nochunks
|
|
|
|
SGML_VALIDATE = nsgmls -s
|
|
|
|
DOCBOOK2HTML = $(JADE) $(JADE_ARGS)
|
|
|
|
endif
|
|
|
|
|
2004-10-29 21:04:02 +04:00
|
|
|
DESTDIR=
|
|
|
|
|
2001-06-15 04:40:42 +04:00
|
|
|
# name of the major documentation sections
|
2001-06-15 04:09:05 +04:00
|
|
|
SECTIONS=user documentation development
|
2005-12-07 01:15:50 +03:00
|
|
|
SECTION_HTML=$(SECTIONS:%=%/index.html)
|
2001-06-15 04:40:42 +04:00
|
|
|
|
|
|
|
# these files get installed in addition to the sections
|
2002-12-15 18:30:01 +03:00
|
|
|
EXTRAS=index.html images
|
2001-06-15 04:40:42 +04:00
|
|
|
|
|
|
|
# complete list of what to install
|
|
|
|
INSTALL_LIST=$(SECTIONS) $(EXTRAS)
|
|
|
|
|
2014-05-04 20:11:05 +04:00
|
|
|
# scp to this server (only upload supported)
|
|
|
|
REMOTE_HOST=web.sf.net
|
2001-06-15 04:40:42 +04:00
|
|
|
|
2002-12-13 20:20:27 +03:00
|
|
|
# path of preexisting install on the remote server. Each section
|
2001-06-15 04:40:42 +04:00
|
|
|
# will go into a subdirectory of $REMOTE_PATH, as in
|
|
|
|
# $REMOTE_PATH/user.
|
2014-05-04 20:11:05 +04:00
|
|
|
REMOTE_PATH=htdocs/doc/docbook
|
2001-06-09 11:00:58 +04:00
|
|
|
|
2002-12-13 20:20:27 +03:00
|
|
|
all: $(SECTION_HTML)
|
|
|
|
|
2005-12-07 01:15:50 +03:00
|
|
|
user/index.html: $(srcdir)/user/user.dbk
|
2002-12-15 16:14:27 +03:00
|
|
|
-mkdir -p user
|
2020-01-27 21:22:12 +03:00
|
|
|
cd user; $(DOCBOOK2HTML) user.dbk
|
2003-01-22 02:07:29 +03:00
|
|
|
|
2005-12-07 01:15:50 +03:00
|
|
|
documentation/index.html: $(srcdir)/documentation/documentation.dbk
|
2002-12-15 16:14:27 +03:00
|
|
|
-mkdir -p documentation
|
2020-01-27 21:22:12 +03:00
|
|
|
cd documentation; $(DOCBOOK2HTML) documentation.dbk
|
2003-01-22 02:07:29 +03:00
|
|
|
|
2005-12-07 01:15:50 +03:00
|
|
|
development/index.html: $(srcdir)/development/development.dbk
|
2002-12-15 16:14:27 +03:00
|
|
|
-mkdir -p development
|
2020-01-27 21:22:12 +03:00
|
|
|
cd development; $(DOCBOOK2HTML) development.dbk
|
2002-12-13 20:20:27 +03:00
|
|
|
|
|
|
|
fixperm::
|
2001-06-15 04:40:42 +04:00
|
|
|
# fix permissions locally so that tar will install things right
|
|
|
|
chmod 664 `find $(INSTALL_LIST) -type f -print`
|
|
|
|
chmod 775 `find $(INSTALL_LIST) -type d -print`
|
2002-12-13 20:20:27 +03:00
|
|
|
|
2002-12-15 00:24:55 +03:00
|
|
|
copy_from_srcdir::
|
2002-12-16 08:46:49 +03:00
|
|
|
for i in $(EXTRAS); do if test -e $(srcdir)/$$i -a ! -e $$i; then cp -r $(srcdir)/$$i $$i; fi; done
|
2002-12-15 00:24:55 +03:00
|
|
|
|
|
|
|
$(TARGZ): all copy_from_srcdir fixperm
|
|
|
|
rm -f $(TARGZ)
|
2011-11-06 16:11:46 +04:00
|
|
|
tar cf - --exclude=.svn --exclude=*.dbk $(INSTALL_LIST) | gzip > $(TARGZ)
|
2002-12-15 00:24:55 +03:00
|
|
|
|
|
|
|
install: all copy_from_srcdir
|
2003-12-08 02:36:58 +03:00
|
|
|
for i in $(DESTDIR)$(docdir); do if test ! -d $$i; then mkdir -p $$i; fi; done
|
2003-11-14 03:38:54 +03:00
|
|
|
#for i in $(INSTALL_LIST); do cp -r $$i $(DESTDIR)$(docdir); done
|
2011-11-06 16:11:46 +04:00
|
|
|
for i in $(INSTALL_LIST); do tar cf - --exclude=.svn --exclude=*.dbk $$i | ( cd $(DESTDIR)$(docdir); tar xf - ); done
|
2002-12-13 20:20:27 +03:00
|
|
|
|
|
|
|
test_sfuser:
|
|
|
|
@if test "$$SFUSER" = ""; then SFUSER=`whoami`; export SFUSER; fi; \
|
|
|
|
echo Your Source Forge username is $${SFUSER}.
|
|
|
|
@echo 'If this is not correct, set the environment variable $$SFUSER.'
|
|
|
|
|
2014-05-04 20:11:05 +04:00
|
|
|
# Upload the stuff to the remote server using scp. It will assume that your
|
2002-12-13 20:20:27 +03:00
|
|
|
# local username is the same as your Source Forge username, unless you define
|
2014-05-04 20:11:05 +04:00
|
|
|
# an environment variable SFUSER. Unpacking must be done with the
|
|
|
|
# interactive shell (see developer doc).
|
|
|
|
upload_docs: $(TARGZ)
|
2001-06-15 04:40:42 +04:00
|
|
|
# copy to remote
|
2014-05-04 20:11:05 +04:00
|
|
|
@echo Uploading documentation to $(REMOTE_PATH)
|
2002-12-13 20:20:27 +03:00
|
|
|
if test "$$SFUSER" = ""; then SFUSER=`whoami`; export SFUSER; fi; \
|
2014-05-04 20:11:05 +04:00
|
|
|
scp $(TARGZ) $${SFUSER},bochs@$(REMOTE_HOST):$(REMOTE_PATH);
|
2002-12-15 00:24:55 +03:00
|
|
|
|
|
|
|
# Download rendered docs in a TAR file from the Bochs web site using wget.
|
|
|
|
# This is useful for getting documentation onto platforms that don't have
|
|
|
|
# docbook tools.
|
|
|
|
dl_docs::
|
|
|
|
rm -f $(TARGZ)
|
|
|
|
$(WGET) $(RENDERED_DOC_URL)
|
|
|
|
gunzip -c $(TARGZ) | tar xvf -
|
|
|
|
touch */*.html
|
2001-06-09 11:00:58 +04:00
|
|
|
|
|
|
|
clean:
|
2005-12-07 01:15:50 +03:00
|
|
|
# remove generated files
|
2001-06-15 04:09:05 +04:00
|
|
|
for S in $(SECTIONS); do \
|
2002-12-05 23:53:13 +03:00
|
|
|
rm -f $$S/*.html $$S/*.htm $$S/*.ps $$S/*.pdf $$S/*.out; \
|
2001-06-15 04:09:05 +04:00
|
|
|
done
|
2002-12-15 00:24:55 +03:00
|
|
|
@RMCOMMAND@ $(TARGZ)
|
2002-12-13 20:20:27 +03:00
|
|
|
|
2002-12-13 22:17:22 +03:00
|
|
|
dist-clean: clean
|
2002-12-13 22:26:11 +03:00
|
|
|
rm -f Makefile
|