Skip to content
Snippets Groups Projects
Commit 0b278d53 authored by Christian Engwer's avatar Christian Engwer
Browse files

clean up webstuff and doxygen rules

- add proper web-install target that seperated recursion and local targets
- move web-install to documentation, so that you can call "make web.install" from top-src
- provide fallback targets, if doxygen and/or wml is missing

[[Imported from SVN: r5792]]
parent 50035dae
No related branches found
No related tags found
No related merge requests found
......@@ -3,15 +3,20 @@
maintainer-clean-local: doc-clean
doc-am: doc-local
###
# build doc / web-install recursively
doc-am:
web-install-am: web-install-local
doc-local:
doc-clean:
rm -f $(DOCFILES)
web-install: web-install-recursive
doc: doc-recursive
web-install-recursive:
doc-recursive:
@set fnord $$MAKEFLAGS; amf=$$2; \
dot_seen=no; \
......
# -*-makefile-automake-*-
if BUILD_DOCS
DOXYGENTAG = doxygen-tag
DOXYGEN_HTML = html
# EXTRAINSTALL in the html subdirectory
DOXYGENHTMLFILES = *.html *.css *.png *.gif
DOXYGENDISTFILES = doxygen-tag
DOXYGENINSTALL = $(DOXYGENHTMLFILES) ../doxygen.log ../doxyerr.log
endif # BUILD_DOCS
DISTCLEANFILES = doxygen.log doxygen-tag
doxygendir = $(docdir)/doxygen
####
# doxygen style files
if DUNEWEB
if WML
DUNEWEBDOXY = @DUNEWEBDIR@/doc/doxygen
# themeing doxygen
DOXYGENHEADER = doxy-header.html
DOXYGENFOOTER = doxy-footer.html
DUNEWEBDOXY = @DUNEWEBDIR@/doc/doxygen
# themeing doxygen
DOXYGENHEADER = doxy-header.html
DOXYGENFOOTER = doxy-footer.html
doxy-header.html: BASEDIR=../../..
doxy-footer.html: BASEDIR=../../..
......@@ -32,38 +26,28 @@ doxy-footer.html: @DUNEWEBDIR@/doc/doxygen/doxy-footer.wml
endif # WML
endif # DUNEWEB
if DOXYGEN
DOXYGENFILES = $(DOXYGEN_HTML) $(DOXYGENHEADER) $(DOXYGENFOOTER)
endif # DOXYGEN
#we need this in the distribution
####
# how to build doxygen documentation
if BUILD_DOCS
install-doxygen-data: $(DOXYGEN_HTML)
$(mkinstalldirs) $(DESTDIR)/$(doxygendir); \
dir=$(srcdir); \
if test -d ./html; then dir=.; fi; echo "dir=$$dir"; \
list='$(DOXYGENHTMLFILES)'; \
for p in $$list; do \
$(install_sh_DATA) $$dir/html/$$p $(DESTDIR)/$(doxygendir); \
done
uninstall-doxygen-data:
list='$(DOXYGENHTMLFILES)'; \
for p in $$list; do \
rm -f $(DESTDIR)/$(doxygendir)/$$p; \
done
install-data-local: install-doxygen-data
uninstall-local: uninstall-doxygen-data
DOXYGENTAG = doxygen-tag
DOXYGEN_HTML = html
# EXTRAINSTALL in the html subdirectory
DOXYGENHTMLFILES = *.html *.css *.png *.gif
DOXYGENDISTFILES = doxygen-tag
DOXYGENINSTALL = $(DOXYGENHTMLFILES) ../doxygen.log ../doxyerr.log
endif # BUILD_DOCS
if DOXYGEN
DUNEDOXYNIZE=@DUNE_COMMON_ROOT@/bin/dunedoxynize
$(srcdir)/Doxyfile.in: FORCE
if test -f $(srcdir)/Doxylocal && test $(srcdir)/Doxylocal -nt $(srcdir)/Doxyfile.in; then \
cd $(top_srcdir) && $(DUNEDOXYNIZE); \
fi
# build doxygen when 'make doc' is called
# what files does the doxygen-generated stuff depend on (find-syntax)
DOXYGEN_DEPENDON = -name \*.cc -o -name \*.hh -o -name \*.png -o -name Doxyfile -o -name modules
# check dependency ourself to be robust
doxygen-tag: FORCE Doxyfile $(DOXYGENHEADER) $(DOXYGENFOOTER)
set -e; \
......@@ -76,7 +60,15 @@ doxygen-tag: FORCE Doxyfile $(DOXYGENHEADER) $(DOXYGENFOOTER)
if test -x "$(DUNEWEBDOXY)/update-doxygen.css"; \
then $(DUNEWEBDOXY)/update-doxygen.css $(abs_builddir)/html; fi; \
fi
doc-doxygen: $(DOXYGEN_HTML) $(DOXYGENHEADER) $(DOXYGENFOOTER)
else
doc-doxygen:
endif # DOXYGEN
doc-am: doc-doxygen
####
# how to store doxygen in the tarball
if DOXYGEN
doxygen-dist-install: doxygen-tag
set -e;\
mkdir $(distdir)/html; \
......@@ -91,17 +83,37 @@ dist-hook: doxygen-dist-install
html: doxygen-tag
DUNEDOXYNIZE=@DUNE_COMMON_ROOT@/bin/dunedoxynize
endif # DOXYGEN
$(srcdir)/Doxyfile.in: FORCE
if test -f $(srcdir)/Doxylocal && test $(srcdir)/Doxylocal -nt $(srcdir)/Doxyfile.in; then \
cd $(top_srcdir) && $(DUNEDOXYNIZE); \
fi
####
# how to install doxygen
if BUILD_DOCS
include $(top_srcdir)/am/webstuff
install-doxygen-data: $(DOXYGEN_HTML)
$(mkinstalldirs) $(DESTDIR)/$(doxygendir); \
dir=$(srcdir); \
if test -d ./html; then dir=.; fi; echo "dir=$$dir"; \
list='$(DOXYGENHTMLFILES)'; \
for p in $$list; do \
$(install_sh_DATA) $$dir/html/$$p $(DESTDIR)/$(doxygendir); \
done
if WML
# how to install the doxygen documentation
uninstall-doxygen-data:
list='$(DOXYGENHTMLFILES)'; \
for p in $$list; do \
rm -f $(DESTDIR)/$(doxygendir)/$$p; \
done
install-data-local: install-doxygen-data
uninstall-local: uninstall-doxygen-data
endif # BUILD_DOCS
####
# howto install doxygen in the web page
include $(top_srcdir)/am/webstuff
if DUNEWEB
# how to install the doxygen documentation for the web site
web-install-doxygen:
if test -d $(DUNEWEBDIR) && test -r $(DUNEWEBDIR)/Make.global ; then \
pushd html; \
......@@ -109,15 +121,22 @@ web-install-doxygen:
EXTRAINSTALL="$(DOXYGENINSTALL)" CURDIR="$(CURDIR)/@DUNE_MOD_NAME@-html" install ; \
popd; \
fi
endif # WML
else
web-install-doxygen:
endif # DUNEWEB
web-install-am: web-install-doxygen
web-install: web-install-doxygen web-install-default
endif # DOXYGEN
####
# how to clean the doxygen stuff
maintainer-clean-local: doxygen-maintainer-clean
dist-clean-local: doxygen-dist-clean
clean-local: clean-doxygen
doxygen-dist-clean:
rm -f doxygen.log doxygen-tag
clean-doxygen:
rm -rf $(DOXYGENTAG) $(DOXYGENFILES) *~
doxygen-maintainer-clean:
rm -rf $(DOXYGENTAG) $(DOXYGEN_HTML) $(DOXYGENHEADER) $(DOXYGENFOOTER) *~
test -f Doxylocal && rm -f Doxygen.in
# nice trick from the GNU make infopage to force a rule to run
FORCE:
......@@ -9,19 +9,25 @@
# CURDIR should be defined in the same way as in dune-web
####
# how to run wml
if DUNEWEB
WMLCMD = cd $(DUNEWEBDIR) && @WML@ --nocd -DROOT=$(BASEDIR)
else
WMLCMD = cd $(DUNE_COMMON_ROOT)/doc && @WML@ --nocd
endif
####
# how to build html files
if WML
.wml.html:
$(WMLCMD) -I $(abs_srcdir) $(abs_builddir)/$< -o $(abs_builddir)/$@
endif
####
# howto install into the webpage
if DUNEWEB
web-install-default: all
web-install-default: doc
if test -d $(DUNEWEBDIR) && test -r $(DUNEWEBDIR)/Make.global ; then \
for DIR in $(SUBDIRS) ; do \
$(MAKE) -C $$DIR web-install || exit 1; \
......@@ -29,6 +35,8 @@ web-install-default: all
$(MAKE) -f $(DUNEWEBDIR)/Make.global \
EXTRAINSTALL="$(EXTRAINSTALL)" CURDIR="$(CURDIR)" install ; \
fi
else
web-install-default:
endif
web-install: web-install-default
web-install-am: web-install-default
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment