Skip to content
Snippets Groups Projects
Commit 306c4c41 authored by Jorrit Fahlke's avatar Jorrit Fahlke
Browse files

merge revisions 5811:5814 from trunk

[[Imported from SVN: r5815]]
parent bc3194cc
No related branches found
No related tags found
No related merge requests found
# -*- Makefile -*-
# $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
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
doc-local:
doc-clean-local:
web-install-local:
doc-clean:
rm -f $(DOCFILES)
web-install: web-install-recursive
doc: doc-recursive
doc-clean: doc-clean-recursive
web-install-recursive \
doc-clean-recursive \
doc-recursive:
@set fnord $$MAKEFLAGS; amf=$$2; \
dot_seen=no; \
......@@ -37,3 +38,41 @@ doc-recursive:
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
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
# how to build doxygen documentation
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
......@@ -49,63 +47,65 @@ $(srcdir)/Doxyfile.in: FORCE
# 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)
$(DOXYGENTAG): FORCE Doxyfile $(DOXYGENHEADER) $(DOXYGENFOOTER)
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... ; \
$(DOXYGEN) Doxyfile > doxygen.log <&-; \
touch doxygen-tag ; \
touch $(DOXYGENTAG) ; \
if test "$$DOXYQUIET" != "1" && test -f doxyerr.log; \
then cat doxyerr.log; fi; \
if test -x "$(DUNEWEBDOXY)/update-doxygen.css"; \
then $(DUNEWEBDOXY)/update-doxygen.css $(abs_builddir)/html; fi; \
fi
doc-doxygen: $(DOXYGEN_HTML) $(DOXYGENHEADER) $(DOXYGENFOOTER)
doc-doxygen: $(DOXYGENTAG) $(DOXYGENHEADER) $(DOXYGENFOOTER)
else
doc-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
if DOXYGEN
doxygen-dist-install: doxygen-tag
set -e;\
mkdir $(distdir)/html; \
cd $(abs_builddir)/html; \
list=`echo $(DOXYGENHTMLFILES)`; \
cd $(abs_builddir); \
for i in $$list; do \
cp html/$$i $(distdir)/html; \
done;
doxygen-dist-install: $(DOXYGENTAG)
set -e; mkdir $(distdir)/html; \
$(MAKE) doxygen-html-install instcmd="cp -fp" instdir="$(distdir)/html"
set -e; dir=$(abs_srcdir); \
if test -f $(abs_builddir)/$(DOXYGENTAG); then dir=$(abs_builddir); fi; \
cp $$dir/$(DOXYGENTAG) $(distdir)/$(DOXYGENTAG)
dist-hook: doxygen-dist-install
html: doxygen-tag
endif # DOXYGEN
####
# how to install doxygen
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
install-doxygen: $(DOXYGENTAG)
set -e; $(mkinstalldirs) $(DESTDIR)/$(doxygendir); \
pwd; \
$(MAKE) doxygen-html-install instcmd="$(install_sh_DATA)" instdir="$(DESTDIR)/$(doxygendir)"
uninstall-doxygen-data:
list='$(DOXYGENHTMLFILES)'; \
for p in $$list; do \
rm -f $(DESTDIR)/$(doxygendir)/$$p; \
done
uninstall-doxygen:
rm -rf $(DESTDIR)/$(doxygendir)
install-data-local: install-doxygen-data
uninstall-local: uninstall-doxygen-data
# add doxygen to documentation-installation
install-documentation-local: install-doxygen
uninstall-documentation-local: uninstall-doxygen
endif # BUILD_DOCS
......@@ -124,20 +124,20 @@ web-install-doxygen:
else
web-install-doxygen:
endif # DUNEWEB
web-install-am: web-install-doxygen
web-install-local: web-install-doxygen
####
# how to clean the doxygen stuff
maintainer-clean-local: doxygen-maintainer-clean
doc-clean-local: doxygen-doc-clean
dist-clean-local: doxygen-dist-clean
doxygen-dist-clean:
rm -f doxygen.log doxygen-tag
rm -f doxygen.log doxyerr.log $(DOXYGENTAG)
doxygen-maintainer-clean:
rm -rf $(DOXYGENTAG) $(DOXYGEN_HTML) $(DOXYGENHEADER) $(DOXYGENFOOTER) *~
doxygen-doc-clean:
rm -rf html $(DOXYGENTAG) $(DOXYGENHEADER) $(DOXYGENFOOTER) *~
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
FORCE:
......@@ -25,3 +25,13 @@
.dvi.ps:
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
web-install-default:
endif
####
# how to clean up
web-build: $(PAGES)
web-clean:
rm -f $(PAGES)
-test -z $(PAGES) || rm -f $(PAGES)
maintainer-clean-local: web-clean
web-install-am: web-install-default
doc-am: web-build
doc-clean-local: web-clean
web-install-local: web-install-default
doc-local: web-build
......@@ -172,10 +172,8 @@ COMMANDS="update autogen configure make all exec status svn"
update_HELP="updated all modules from the repository"
autogen_HELP="run the autogen.sh script for each module"
configure_HELP="run configure for each module"
# "NOTE: the --with-dune* parameters will be generated by dunecontrol"
make_HELP="run make for each module"
all_HELP="\trun 'autogen', 'configure' and 'make' command for each module"
# "NOTE: run all for an initial setup"
exec_HELP="execute an arbitrary command in each module directory"
status_HELP="show vc status for all modules"
svn_HELP="\trun svn command for each svn managed module"
......@@ -312,14 +310,26 @@ run_default_configure () {
if test -d "$path/share/aclocal"; then
ACLOCAL_FLAGS="$ACLOCAL_FLAGS -I $path/share/aclocal"
fi
PARAMS="$PARAMS \"--with-$name=$path\""
if test -d "$path/$BUILDDIR"; then
PARAMS="$PARAMS \"--with-$name=$path/$BUILDDIR\""
else
PARAMS="$PARAMS \"--with-$name=$path\""
fi
done
if test "x$HAVE_duneweb" == "xyes"; then
PARAMS="$PARAMS \"--with-duneweb=$PATH_duneweb\""
fi
PARAMS="$PARAMS ACLOCAL_AMFLAGS=\"$ACLOCAL_FLAGS\""
echo ./configure "$PARAMS"
eval ./configure "$PARAMS" || exit 1
# create build directory of requested
if test -n "$BUILDDIR"; then
test -d "$BUILDDIR" || mkdir "$BUILDDIR"
SRCDIR="$PWD"
cd "$BUILDDIR"
eval "$SRCDIR/configure" "$PARAMS" || exit 1
else
eval ./configure "$PARAMS" || exit 1
fi
else
if test -f configure.in || test -f configure.ac; then
echo "ERROR: configure.[in|ac] found, but configure missing." >&2
......@@ -334,6 +344,7 @@ run_default_configure () {
}
run_default_make () {
test ! -d "$BUILDDIR" || cd "$BUILDDIR"
PARAMS="$CMD_FLAGS"
echo make "$PARAMS"
eval $MAKE "$PARAMS"
......@@ -386,6 +397,8 @@ usage () {
echo " not built successfully on the previous run)"
echo " --opts=FILE load default options from FILE"
echo " (see dune-common/doc/example.opts)"
echo " --builddir=NAME make out-of-source builds in a subdir NAME."
echo " This directory is create inside each module."
echo " --[COMMAND]-opts=opts set options for COMMAND"
echo " (this is mainly useful for the all COMMAND)"
echo "COMMANDS:"
......@@ -507,6 +520,15 @@ while test $# -gt 0; do
export ONLY="$ONLY $MODULE"
done
;;
--builddir=*)
if test "x$arg" = "x"; then
usage
echo "ERROR: Parameter for --builddir is missing" >&2
echo >&2
exit 1;
fi
export BUILDDIR=$arg
;;
--skipversioncheck)
export SKIPVERSIONCHECK=yes
;;
......
......@@ -20,7 +20,8 @@ EXTRAINSTALL=example.opts
# install the html pages
docdir=$(datadir)/doc/dune-common
doc_DATA = $(PAGES) example.opts
DOCFILES = $(PAGES)
DOCFILES_EXTRA = example.opts
EXTRA_DIST = $(PAGES) example.opts
......
# $Id: Makefile.am 4499 2006-04-13 14:56:35Z christi $
if BUILD_DOCS
DOCS=buildsystem.pdf buildsystem.ps
endif
# setting like in dune-web
CURDIR=doc/buildsystem
# position of the web base directory,
# relative to $(CURDIR)
BASEDIR=..
EXTRAINSTALL = buildsystem.pdf
EXTRA_DIST = $(DOCS)
BASEDIR=../..
# install the html pages
buildsystemdir=$(datadir)/doc/dune-common/buildsystem
buildsystem_DATA = $(DOCS)
docdir=$(datadir)/doc/dune-common/buildsystem
if BUILD_DOCS
DOCFILES=buildsystem.pdf
EXTRA_DIST=buildsystem.pdf
endif
# include rules for wml -> html transformation
# include predefined rules
include $(top_srcdir)/am/webstuff
include $(top_srcdir)/am/latex
# remove html pages on ``make clean''
CLEANFILES = auto *.aux *.dvi *.log *.out *.toc
# PDFs and PSs are only clean in svn version not in the tarballs
SVNCLEANFILES = *.pdf *.ps
clean-local:
if test -e $(top_srcdir)/$(CURDIR)/doxygen/Doxydep; then rm -rf $(SVNCLEANFILES) ; fi
# include further rules needed by Dune
include $(top_srcdir)/am/global-rules
......@@ -15,15 +15,9 @@ CURDIR=doc/devel
# install the html pages
develdir=$(datadir)/doc/dune-common/devel
if BUILD_DOCS
devel_DATA = $(PAGES)
EXTRA_DIST= $(PAGES)
DOCFILES = $(PAGES)
EXTRA_DIST = $(PAGES)
endif
include $(top_srcdir)/am/webstuff
# remove html pages on ``make clean'' if we are not a tarball
SVNCLEANFILES = $(PAGES)
clean-local:
if test -e $(top_srcdir)/doc/doxygen/Doxydep; then rm -rf $(SVNCLEANFILES); fi
include $(top_srcdir)/am/global-rules
......@@ -12,11 +12,8 @@ endif
endif
# add some more stuff to install and tarball
doxygen_DATA = $(PAGES)
DOCFILES = $(PAGES)
EXTRA_DIST = $(PAGES)
include $(top_srcdir)/am/doxygen
include $(top_srcdir)/am/global-rules
foo:
echo $(PAGES)
......@@ -23,10 +23,10 @@ AC_DEFUN([DUNE_MODULE_ADD_SUMMARY_ENTRY],[
m4_pushdef([_DUNE_MODULE], [m4_toupper(_dune_module)])
result="$with_[]_dune_module"
AS_IF([test -n "$_DUNE_MODULE[]_ROOT"],[
result="$result ($_DUNE_MODULE[]_ROOT)"
result="$result ($_DUNE_MODULE[]_ROOT)"
])
AS_IF([test -n "$_DUNE_MODULE[]_VERSION"],[
result="$result version $_DUNE_MODULE[]_VERSION"
result="$result version $_DUNE_MODULE[]_VERSION"
])
DUNE_ADD_SUMMARY_MOD_ENTRY(_dune_name,[$result])
])
......@@ -131,10 +131,16 @@ AC_DEFUN([DUNE_CHECK_MODULES],[
AS_IF([test -d "$_DUNE_MODULE[]_ROOT/include/dune"],[
# Dune was installed into directory given by with-dunecommon
_DUNE_MODULE[]_CPPFLAGS="-I$_DUNE_MODULE[]_ROOT/include"
_DUNE_MODULE[]_VERSION="`PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$_DUNE_MODULE[]_ROOT/lib/pkgconfig $PKG_CONFIG --modversion _dune_name`" 2>/dev/null
_DUNE_MODULE[]_BUILDDIR=_DUNE_MODULE[]_ROOT
_DUNE_MODULE[]_VERSION="`PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$_DUNE_MODULE[]_ROOT/lib/pkgconfig $PKG_CONFIG --modversion _dune_name`" 2>/dev/null
],[
_DUNE_MODULE[]_CPPFLAGS="-I$_DUNE_MODULE[]_ROOT"
_DUNE_MODULE[]_VERSION="`grep Version $_DUNE_MODULE[]_ROOT/dune.module | sed -e 's/^Version: *//'`" 2>/dev/null
_DUNE_MODULE[]_SRCDIR=$_DUNE_MODULE[]_ROOT
# extract src and build path from Makefile, if found
AS_IF([test -f $_DUNE_MODULE[]_ROOT/Makefile],[
_DUNE_MODULE[]_SRCDIR="`grep '^abs_top_srcdir = ' $_DUNE_MODULE[]_ROOT/Makefile | sed -e 's/^abs_top_srcdir = //'`"
])
_DUNE_MODULE[]_CPPFLAGS="-I$_DUNE_MODULE[]_SRCDIR"
_DUNE_MODULE[]_VERSION="`grep Version $_DUNE_MODULE[]_SRCDIR/dune.module | sed -e 's/^Version: *//'`" 2>/dev/null
])
ifelse(_dune_symbol,,,[
_DUNE_MODULE[]_LDFLAGS="-L$_DUNE_MODULE[]_ROOT/lib"
......@@ -298,7 +304,7 @@ AC_DEFUN([DUNE_SYMLINK],[
])
],[
# if we are in the source directory we can make sure that there is no directory
AC_MSG_ERROR([Module is using the DUNE[]_SYMLINK directive but contains a directory 'dune'!])
AC_MSG_ERROR([Module is using the DUNE[]_SYMLINK directive but contains a directory 'dune'!])
])
],[
echo Creating dune-symlink...
......@@ -337,10 +343,10 @@ AC_DEFUN([DUNE_WEB],
],[
AC_MSG_ERROR([Dune-Web directory $with_duneweb not found!])
])
with_duneweb=no
with_duneweb=no
])
])
DUNE_ADD_SUMMARY_ENTRY([dune web],[$with_duneweb])
DUNE_ADD_SUMMARY_ENTRY([dune web],[$with_duneweb])
],[
with_duneweb=no
])
......
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