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

* make out-of-source build work

* make distcheck work
* make out-of-source builds for tarballs work
... all this only for dune-common...

[[Imported from SVN: r5811]]
parent a83e1dce
No related branches found
No related tags found
No related merge requests found
# -*- Makefile -*- # -*- Makefile -*-
# $Id: global-rules 5267 2008-09-10 10:45:42Z christi $ # $Id: global-rules 5267 2008-09-10 10:45:42Z christi $
maintainer-clean-local: doc-clean maintainer-clean-local: doc-clean-am
### ###
# build doc / web-install recursively # build doc / web-install recursively
doc-am: doc-clean-am: clean-am doc-clean-documentation doc-clean-local
doc-am: doc-all-documentation doc-local
web-install-am: web-install-local web-install-am: web-install-local
doc-local: doc-local:
doc-clean-local:
web-install-local: web-install-local:
doc-clean:
rm -f $(DOCFILES)
web-install: web-install-recursive web-install: web-install-recursive
doc: doc-recursive doc: doc-recursive
doc-clean: doc-clean-recursive
web-install-recursive \ web-install-recursive \
doc-clean-recursive \
doc-recursive: doc-recursive:
@set fnord $$MAKEFLAGS; amf=$$2; \ @set fnord $$MAKEFLAGS; amf=$$2; \
dot_seen=no; \ dot_seen=no; \
...@@ -37,3 +38,41 @@ doc-recursive: ...@@ -37,3 +38,41 @@ doc-recursive:
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail" fi; test -z "$$fail"
install-data-local: install-documentation
uninstall-local: uninstall-documentation
####
# "implementations"
doc-all-documentation: $(DOCFILES)
doc-clean-documentation:
-test -z "$(DOCFILES)" || rm -f $(DOCFILES)
install-documentation: $(DOCFILES) install-documentation-local
@$(NORMAL_INSTALL)
test -z "$(docdir)" || $(MKDIR_P) "$(DESTDIR)$(docdir)"
@list='$(DOCFILES) $(DOCFILES_EXTRA)'; test -n "$(docdir)" || list=; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
done | \
while read files; do \
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(docdir)'"; \
$(INSTALL_DATA) $$files "$(DESTDIR)$(docdir)" || exit $$?; \
done
uninstall-documentation: uninstall-documentation-local
@$(NORMAL_UNINSTALL)
@list='$(DOCFILES) $(DOCFILES_EXTRA)'; test -n "$(docdir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
test -n "$$files" || exit 0; \
echo " ( cd '$(DESTDIR)$(docdir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(docdir)" && rm -f $$files
.PHONY: uninstall-documentation uninstall-documentation-local \
install-documentation install-documentation-local \
doc-clean-am doc-am web-install-am \
doc-local doc-clean-local web-install-local \
web-install doc doc-clean \
web-install-recursive doc-clean-recursive doc-recursive
...@@ -30,10 +30,8 @@ endif # DUNEWEB ...@@ -30,10 +30,8 @@ endif # DUNEWEB
# how to build doxygen documentation # how to build doxygen documentation
if BUILD_DOCS if BUILD_DOCS
DOXYGENTAG = doxygen-tag DOXYGENTAG = doxygen-tag
DOXYGEN_HTML = html
# EXTRAINSTALL in the html subdirectory # EXTRAINSTALL in the html subdirectory
DOXYGENHTMLFILES = *.html *.css *.png *.gif DOXYGENHTMLFILES = *.html *.css *.png *.gif
DOXYGENDISTFILES = doxygen-tag
DOXYGENINSTALL = $(DOXYGENHTMLFILES) ../doxygen.log ../doxyerr.log DOXYGENINSTALL = $(DOXYGENHTMLFILES) ../doxygen.log ../doxyerr.log
endif # BUILD_DOCS endif # BUILD_DOCS
...@@ -49,63 +47,65 @@ $(srcdir)/Doxyfile.in: FORCE ...@@ -49,63 +47,65 @@ $(srcdir)/Doxyfile.in: FORCE
# what files does the doxygen-generated stuff depend on (find-syntax) # 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 DOXYGEN_DEPENDON = -name \*.cc -o -name \*.hh -o -name \*.png -o -name Doxyfile -o -name modules
# check dependency ourself to be robust # check dependency ourself to be robust
doxygen-tag: FORCE Doxyfile $(DOXYGENHEADER) $(DOXYGENFOOTER) $(DOXYGENTAG): FORCE Doxyfile $(DOXYGENHEADER) $(DOXYGENFOOTER)
set -e; \ set -e; \
if test ! -e doxygen-tag || test x"`find $(top_srcdir) \( $(DOXYGEN_DEPENDON) \) -a -cnewer doxygen-tag -print`" != x ; then \ if test ! -f "$(VPATH)/$(DOXYGENTAG)" && ( test ! -e $(DOXYGENTAG) \
|| test x"`find $(top_srcdir) \( $(DOXYGEN_DEPENDON) \) -a -cnewer $(DOXYGENTAG) -print`" != x ); then \
echo Running doxygen. This may take a while... ; \ echo Running doxygen. This may take a while... ; \
$(DOXYGEN) Doxyfile > doxygen.log <&-; \ $(DOXYGEN) Doxyfile > doxygen.log <&-; \
touch doxygen-tag ; \ touch $(DOXYGENTAG) ; \
if test "$$DOXYQUIET" != "1" && test -f doxyerr.log; \ if test "$$DOXYQUIET" != "1" && test -f doxyerr.log; \
then cat doxyerr.log; fi; \ then cat doxyerr.log; fi; \
if test -x "$(DUNEWEBDOXY)/update-doxygen.css"; \ if test -x "$(DUNEWEBDOXY)/update-doxygen.css"; \
then $(DUNEWEBDOXY)/update-doxygen.css $(abs_builddir)/html; fi; \ then $(DUNEWEBDOXY)/update-doxygen.css $(abs_builddir)/html; fi; \
fi fi
doc-doxygen: $(DOXYGEN_HTML) $(DOXYGENHEADER) $(DOXYGENFOOTER) doc-doxygen: $(DOXYGENTAG) $(DOXYGENHEADER) $(DOXYGENFOOTER)
else else
doc-doxygen: doc-doxygen:
endif # DOXYGEN endif # DOXYGEN
doc-am: doc-doxygen doc-local: doc-doxygen
doxygen-html-install:
set -e; \
OLDPWD=$$PWD; \
dir=$(abs_srcdir); \
if test -d $(abs_builddir)/$(DOXYGENTAG); then dir=$(abs_builddir); fi; \
cd "$$dir/html/"; \
list=`echo $(DOXYGENHTMLFILES)`; \
cd "$$OLDPWD"; \
for p in $$list; do \
$(instcmd) $$dir/html/$$p $(instdir); \
done;
#### ####
# how to store doxygen in the tarball # how to store doxygen in the tarball
if DOXYGEN if DOXYGEN
doxygen-dist-install: doxygen-tag doxygen-dist-install: $(DOXYGENTAG)
set -e;\ set -e; mkdir $(distdir)/html; \
mkdir $(distdir)/html; \ $(MAKE) doxygen-html-install instcmd="cp -fp" instdir="$(distdir)/html"
cd $(abs_builddir)/html; \ set -e; dir=$(abs_srcdir); \
list=`echo $(DOXYGENHTMLFILES)`; \ if test -f $(abs_builddir)/$(DOXYGENTAG); then dir=$(abs_builddir); fi; \
cd $(abs_builddir); \ cp $$dir/$(DOXYGENTAG) $(distdir)/$(DOXYGENTAG)
for i in $$list; do \
cp html/$$i $(distdir)/html; \
done;
dist-hook: doxygen-dist-install dist-hook: doxygen-dist-install
html: doxygen-tag
endif # DOXYGEN endif # DOXYGEN
#### ####
# how to install doxygen # how to install doxygen
if BUILD_DOCS if BUILD_DOCS
install-doxygen-data: $(DOXYGEN_HTML) install-doxygen: $(DOXYGENTAG)
$(mkinstalldirs) $(DESTDIR)/$(doxygendir); \ set -e; $(mkinstalldirs) $(DESTDIR)/$(doxygendir); \
dir=$(srcdir); \ pwd; \
if test -d ./html; then dir=.; fi; echo "dir=$$dir"; \ $(MAKE) doxygen-html-install instcmd="$(install_sh_DATA)" instdir="$(DESTDIR)/$(doxygendir)"
list='$(DOXYGENHTMLFILES)'; \
for p in $$list; do \
$(install_sh_DATA) $$dir/html/$$p $(DESTDIR)/$(doxygendir); \
done
uninstall-doxygen-data: uninstall-doxygen:
list='$(DOXYGENHTMLFILES)'; \ rm -rf $(DESTDIR)/$(doxygendir)
for p in $$list; do \
rm -f $(DESTDIR)/$(doxygendir)/$$p; \
done
install-data-local: install-doxygen-data # add doxygen to documentation-installation
uninstall-local: uninstall-doxygen-data install-documentation-local: install-doxygen
uninstall-documentation-local: uninstall-doxygen
endif # BUILD_DOCS endif # BUILD_DOCS
...@@ -124,20 +124,20 @@ web-install-doxygen: ...@@ -124,20 +124,20 @@ web-install-doxygen:
else else
web-install-doxygen: web-install-doxygen:
endif # DUNEWEB endif # DUNEWEB
web-install-am: web-install-doxygen web-install-local: web-install-doxygen
#### ####
# how to clean the doxygen stuff # how to clean the doxygen stuff
maintainer-clean-local: doxygen-maintainer-clean doc-clean-local: doxygen-doc-clean
dist-clean-local: doxygen-dist-clean dist-clean-local: doxygen-dist-clean
doxygen-dist-clean: doxygen-dist-clean:
rm -f doxygen.log doxygen-tag rm -f doxygen.log doxyerr.log $(DOXYGENTAG)
doxygen-maintainer-clean: doxygen-doc-clean:
rm -rf $(DOXYGENTAG) $(DOXYGEN_HTML) $(DOXYGENHEADER) $(DOXYGENFOOTER) *~ rm -rf html $(DOXYGENTAG) $(DOXYGENHEADER) $(DOXYGENFOOTER) *~
rm -f doxyerr.log doxygen.log rm -f doxyerr.log doxygen.log
test -f Doxylocal && rm -f Doxygen.in test ! -f Doxylocal || rm -f Doxygen.in
# nice trick from the GNU make infopage to force a rule to run # nice trick from the GNU make infopage to force a rule to run
FORCE: FORCE:
...@@ -25,3 +25,13 @@ ...@@ -25,3 +25,13 @@
.dvi.ps: .dvi.ps:
TEXINPUTS=.:$(srcdir):${TEXINPUTS}: $(DVIPS) $* -o TEXINPUTS=.:$(srcdir):${TEXINPUTS}: $(DVIPS) $* -o
TEXCLEANFILES = *.aux *.bbl *.blg *.log *.out *.toc *.dvi
clean-local: latex-clean
doc-clean-local: latex-doc-clean
latex-clean:
-test -z "$(TEXCLEANFILES)" || rm -f $(TEXCLEANFILES)
-rm -rf auto
latex-doc-clean: latex-clean
-rm -f *.pdf *.ps
...@@ -39,10 +39,12 @@ else ...@@ -39,10 +39,12 @@ else
web-install-default: web-install-default:
endif endif
####
# how to clean up
web-build: $(PAGES) web-build: $(PAGES)
web-clean: web-clean:
rm -f $(PAGES) -test -z $(PAGES) || rm -f $(PAGES)
maintainer-clean-local: web-clean doc-clean-local: web-clean
web-install-am: web-install-default web-install-local: web-install-default
doc-am: web-build doc-local: web-build
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