Skip to content
Snippets Groups Projects
Commit bbbdd62a authored by Dominic Kempf's avatar Dominic Kempf
Browse files

Merge branch 'feature/remove-autotools' into 'master'

Feature/remove autotools

Finally, after 4.5 years of discussion, development and testing, we get rid of Autotools! :champagne: Thanks to Markus, Dominic and everybody who joined this journey.

The Dune website no longer uses WML, so can get rid of the Autotools. I propose to merge this branch and see what happens. There are more Autotools left-overs, we have to find and remove them. If everything goes well, we can remove Autotools from the other core modules as well.

See merge request !118
parents ecb6e5dd fa343ff7
Branches
Tags
1 merge request!118Feature/remove autotools
Pipeline #
......@@ -21,8 +21,6 @@ add_subdirectory("lib")
add_subdirectory("share")
add_subdirectory("dune")
add_subdirectory("bin")
add_subdirectory("m4")
add_subdirectory("am")
add_subdirectory("doc")
add_subdirectory("cmake/modules")
add_subdirectory("cmake/scripts")
......
......@@ -37,7 +37,7 @@ need to run
to install Dune (you may need root-permissions for the install
part depending on the prefix set)
A more comprehensive introduction to the build system can be found in [2].
A more comprehensive introduction to the build system can be found in [0].
Passing options to the build process
------------------------------------
......@@ -45,50 +45,31 @@ Passing options to the build process
Using the dunecontrol script the following atomic commands can be
executed:
- autogen (runs autogen in each module, only needed when downloaded
via svn)
- configure (runs the configure tests for each module
- exec (executes a command in each module directory)
- make (runs make for each module)
- update (updates the svn version)
- configure (runs the CMake configuration tests for each module)
- exec (executes a command in each module source directory)
- bexec (executes a command in each module build directory)
- make (builds each module)
- update (updates the Git or Subversion version)
The composite command all simply runs autogen, configure and make for
The composite command all simply runs configure and make for
each module.
As it is often not convenient (and for the target all impossible) to
specify the options for each command as parameters after the call, one
can pass the options via file specified by the --opts=<file>
option. For each atomic command one specify the options via a line
<COMMAND_UPPERCASE>_FLAGS=<flags> # e.g.: MAKE_FLAGS=install
The available options for make and svn are the natural ones. The
configure commands available can be found by issuing
dunecontrol --only=dune-common configure --help
and for autogen by
dunecontrol --only=dune-common autogen --help
(In the svn version this has to be called after running autogen.)
As it is often not convenient to specify the desired options after
the duncontroll call, one can pass the options via a file specified
by the --opts=<file> option. Specify the options via the variable
CMAKE_FLAGS=<flags>
An example of an options file is
# use a special compiler (g++ version 3.4) and install to a custom
# directory, default is /usr/local/bin
CONFIGURE_FLAGS="CXX=g++-3.4 --prefix='/tmp/Hu Hu'"
# Set the default target of make to install. Now the call above will
# not just build the DUNE modules but also install it
MAKE_FLAGS=install
# The default versions of automake and autogen are not sufficient
# therefore we need to specify what versions to use
AUTOGEN_FLAGS="--ac=2.59 --am=1.9
# use a special compiler (g++ version 5.0),
# install to a custom directory, default is /usr/local/bin,
# disable the external library SuperLU,
# and use Ninja-build instead of make as the build-tool
CMAKE_FLAGS="-DCMAKE_CXX_COMPILER=g++-5 -DCMAKE_INSTALL_PREFIX='/tmp/HuHu' -DCMAKE_DISABLE_FIND_PACKAGE_SuperLU=true -GNinja"
Links
-----
0. http://www.dune-project.org/doc/installation-notes.html
1. http://www.dune-project.org/download.html
2. http://dune-project.org/doc/buildsystem/buildsystem.pdf
# we need the module file to be able to build via dunecontrol
EXTRA_DIST= CMakeLists.txt dune.module
# don't follow the full GNU-standard
# we need automake 1.9 or newer
AUTOMAKE_OPTIONS = foreign 1.9
SUBDIRS = cmake dune lib share doc bin m4 am
# use configured compiler for "make distcheck"
DISTCHECK_CONFIGURE_FLAGS = CXX="$(CXX)" CC="$(CC)" --enable-parallel=@ENABLE_PARALLEL@ MPICC="$(MPICC)"
include $(top_srcdir)/am/global-rules
include $(top_srcdir)/am/top-rules
# Distribute and install config.h.cmake
configdir = $(datadir)/dune-common
dist_config_DATA = config.h.cmake
include $(top_srcdir)/am/cmake-pkg-config
Preparing the SVN-sources
=========================
Additional to the software mentioned in README you'll need the
following programs installed on your system:
automake >= 1.9
autoconf >= 2.62
libtool
For the documentation to build you'll need doxygen, wml, convert and latex
installed.
Dune also features a self-test. As some components (e.g. Albert,
UG) depend on external libraries their self-tests will only run if
those libraries are found. The paths to their installation prefix
would then need to be passed via --with-...= parameters to configure.
Important! If you don't want to develop Dune itself you won't need to
provide external components! The Dune-library and -headers are
independent of other libraries, instead the applications can choose
which parts to use.
install(PROGRAMS
checklog
cmake-pkg-config
documentation
doxygen
global-rules
headercheck
inkscape.am
latex
no-check-without-lib
sourcescheck
top-rules
webstuff
DESTINATION ${CMAKE_INSTALL_DATADIR}/dune-common/am
)
am_DATA = inkscape.am webstuff global-rules sourcescheck \
no-check-without-lib latex checklog doxygen top-rules \
headercheck documentation cmake-pkg-config
# Not all file names seem to be treated equal by _DATA.
# inkscape.am no-check-without-lib have to be listed in
# EXTRA_DIST to be included into the tarball.
EXTRA_DIST = CMakeLists.txt inkscape.am no-check-without-lib
amdir = $(datadir)/dune-common/am
include $(top_srcdir)/am/global-rules
# -*- Makefile -*-
#
# check-log
#
# This file implements the build-rules needed by the automated tests.
# "make check-log" will build the whole package and run all tests. For
# each test a log file under $(topsrc_dir)/check-log is created which
# contains the name of the test and what kind of test it was (build,
# lib, run, ...). If a test fails this is logged, but all other tests
# are still run.
#
# make OPTIONS:
# LOG_TIMING - specific command to measure the time needed for each test
# example: "make LOG_TIMING='time -p' check-log"
#
# IMPLEMENTATION: check-log depends on different targets for different
# kinds of tests. These can run idividually by calling check-log-XXX.
# Possible variants are (in order of dependence)
# - libs (build all libraries)
# - build (build all applications and tests)
# - test (run each test from $(TESTS))
# - sources (run sourcescheck in each directory)
# - headers (run headercheck for each header)
# - dir (create dir entries for database, no actual tests are run)
#
LOG_FILE = $(top_srcdir)/check-log.log
LOG_DIR = $(top_srcdir)/check-log
LOG_STORE = $(SHELL) $(DUNE_COMMON_ROOT)/bin/check-log-store $(LOG_FILE) $(LOG_DIR)
LOG_TIMING =
LOG_SET_OPTIONS = \
path=`test "$(subdir)" = "." && \
echo "/@PACKAGE_NAME@" || echo "/@PACKAGE_NAME@/$(subdir)"`; \
ppath=`dirname $$path`; \
dir=`basename $$path`
$(DUNE_COMMON_ROOT)/bin/check-log-store: $(DUNE_COMMON_ROOT)/bin/check-log-store.in
cd $(DUNE_COMMON_ROOT)/bin/ && $(MAKE) check-log-store
check-log: $(DUNE_COMMON_ROOT)/bin/check-log-store
check-log:
rm -f $(LOG_FILE)
check-log: check-log-libs
check-log: check-log-build
check-log: check-log-test
check-log: check-log-sources
check-log: check-log-headers
check-log: check-log-dir
check-log-libs: check-log-libs-recursive
check-log-build: check-log-build-recursive
check-log-test: check-log-test-recursive
check-log-sources: check-log-sources-recursive
check-log-headers: check-log-headers-recursive
check-log-dir: check-log-dir-recursive
check-log-headers-am:
$(LOG_SET_OPTIONS); \
list=`echo $(headercheck_PATTERN)`; \
test "$$list" != "$(headercheck_PATTERN)" || exit 0; \
for f in $$list; do \
echo "$(headercheck_IGNORE)" | tr ' ' '\n' | grep -q "$$f"; \
if echo "$(headercheck_IGNORE)" | tr ' ' '\n' | grep -q "$$f"; then continue; fi; \
$(LOG_TIMING) ($(MAKE) headercheck-am SILENT=0 HEADER=$$f; \
$(MAKE) headercheck-am SILENT=0 HEADER=$$f NO_CONFIG_H=1) > $(LOG_FILE) 2>&1; \
$(LOG_STORE) "headercheck" "$$f" "$$path"; \
done
check-log-sources-am:
$(LOG_SET_OPTIONS); \
$(LOG_TIMING) $(MAKE) sourcescheck-am > $(LOG_FILE) 2>&1; \
$(LOG_STORE) "sources" "Makefile.am" "$$path"
check-log-libs-am:
$(LOG_SET_OPTIONS); \
for lib in $(LTLIBRARIES); do \
$(LOG_TIMING) ($(MAKE) $$lib) > $(LOG_FILE) 2>&1; \
$(LOG_STORE) "lib" "$$lib" "$$path"; \
done;
check-log-build-am:
$(LOG_SET_OPTIONS); \
for target in $(check_PROGRAMS) $(PROGRAMS); do \
$(LOG_TIMING) ($(MAKE) $$target) > $(LOG_FILE) 2>&1; \
$(LOG_STORE) "build" "$$target" "$$path"; \
done;
check-log-test-am:
@LOG () { \
echo "$$1" > $(LOG_FILE).2; \
cat $(LOG_FILE) >> $(LOG_FILE).2; \
mv $(LOG_FILE).2 $(LOG_FILE); \
}; \
$(LOG_SET_OPTIONS); \
for tst in $(TESTS); do \
if test -f ./$$tst; then dir=./; \
elif test -f $$tst; then dir=; \
else dir="$(srcdir)/"; fi; \
echo "TEST $${dir}$$tst"; \
if $(LOG_TIMING) $(TESTS_ENVIRONMENT) $${dir}$$tst > $(LOG_FILE) 2>&1; then \
case " $(XFAIL_TESTS) " in \
*" $$tst "*) \
LOG "ERROR: XPASS ($$tst)"; \
$(LOG_STORE) "run" "$$tst" "$$path" 1 0; \
;; \
*) \
LOG "SUCCESS: PASS ($$tst)"; \
$(LOG_STORE) "run" "$$tst" "$$path" 0 0; \
;; \
esac; \
elif test $$? -ne 77; then \
case " $(XFAIL_TESTS) " in \
*" $$tst "*) \
LOG "SUCCESS: XFAIL ($$tst)"; \
$(LOG_STORE) "run" "$$tst" "$$path" 0 0; \
;; \
*) \
LOG "ERROR: FAIL ($$tst)"; \
$(LOG_STORE) "run" "$$tst" "$$path" 1 0; \
;; \
esac; \
else \
LOG "WARNING: SKIP ($$tst)"; \
$(LOG_STORE) "run" "$$tst" "$$path" 0 1; \
fi; \
done;
check-log-dir-am:
$(LOG_SET_OPTIONS); \
$(LOG_STORE) "dir" "$$dir" "$$ppath"
check-log-libs-recursive \
check-log-build-recursive \
check-log-test-recursive \
check-log-sources-recursive \
check-log-headers-recursive \
check-log-dir-recursive:
@set fnord $$MAKEFLAGS; amf=$$2; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
dot_seen=yes; \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
.PHONY: check-log \
check-log-lib check-log-lib-am check-log-lib-recursive \
check-log-build check-log-build-am check-log-build-recursive \
check-log-test check-log-test-am check-log-test-recursive \
check-log-sources check-log-sources-am check-log-sources-recursive \
check-log-dir check-log-dir-am check-log-dir-recursive
install-exec-local:
echo "set($(PACKAGE)_PREFIX \"$(prefix)\")" > $(PACKAGE)-config.tmp; \
echo "set($(PACKAGE)_INCLUDE_DIRS \"$(includedir)\")" >> $(PACKAGE)-config.tmp; \
if test -d $(top_srcdir)/cmake/scripts; then \
echo "set($(PACKAGE)_SCRIPT_DIR \"$(datadir)/dune/cmake/scripts\")" >> $(PACKAGE)-config.tmp; \
fi; \
if test "$(PACKAGE)" = "dune-common"; then \
echo "set(DOXYSTYLE_FILE \"$(datadir)/dune-common/doc/doxygen/Doxystyle\")" >> $(PACKAGE)-config.tmp; \
fi; \
if test -d $(top_srcdir)/cmake/modules; then \
echo "set($(PACKAGE)_MODULE_PATH \"$(datadir)/dune/cmake/modules\")" >> $(PACKAGE)-config.tmp; \
fi; \
echo "#set($(PACKAGE)_FAKE_CMAKE_PKGCONFIG TRUE)">> $(PACKAGE)-config.tmp; \
lib=`echo $(PACKAGE) | $(SED) 's/-//g'`; \
for suffix in .a .so; do \
if test -f $(DESTDIR)$(libdir)/lib$$lib$$suffix; then \
echo "set($(PACKAGE)_LIBRARIES \"$$lib\")">> $(PACKAGE)-config.tmp; \
if test "$$suffix" = ".a"; then \
static="STATIC"; \
fi; \
echo "add_library($$lib $$static IMPORTED)" >> $(PACKAGE)-config.tmp; \
echo "set_property(TARGET $$lib APPEND PROPERTY IMPORTED_CONFIGURATIONS NOCONFIG)" >> $(PACKAGE)-config.tmp; \
echo "set_target_properties($$lib PROPERTIES IMPORTED_LINK_INTERFACE_LANGUAGES_NOCONFIG \"CXX\" IMPORTED_LOCATION_NOCONFIG $(libdir)/lib$$lib$$suffix)" >> $(PACKAGE)-config.tmp; \
break; \
fi; \
done; \
$(mkinstalldirs) $(DESTDIR)$(libdir)/cmake/$(PACKAGE) || exit 1; \
$(INSTALL_DATA) $(PACKAGE)-config.tmp $(DESTDIR)$(libdir)/cmake/$(PACKAGE)/$(PACKAGE)-config.cmake; \
rm $(PACKAGE)-config.tmp; \
full_version="$(DUNE_MOD_VERSION_MAJOR)"."$(DUNE_MOD_VERSION_MINOR)"."$(DUNE_MOD_VERSION_REVISION)"; \
echo "set(PACKAGE_VERSION \"$$full_version\")" >$(PACKAGE)-config-version.tmp; \
echo >>$(PACKAGE)-config-version.tmp; \
echo "if(\"\$${PACKAGE_FIND_VERSION_MAJOR}\" EQUAL \"$(DUNE_MOD_VERSION_MAJOR)\"" >> $(PACKAGE)-config-version.tmp; \
echo " AND \"\$${PACKAGE_FIND_VERSION_MINOR}\" EQUAL \"$(DUNE_MOD_VERSION_MINOR)\")">>$(PACKAGE)-config-version.tmp; \
echo " set (PACKAGE_VERSION_COMPATIBLE 1)" >>$(PACKAGE)-config-version.tmp; \
echo " if (\"\$${PACKAGE_FIND_VERSION}\" VERSION_EQUAL \"$$full_version\")" >> $(PACKAGE)-config-version.tmp; \
echo " set(PACKAGE_VERSION_EXACT 1)" >> $(PACKAGE)-config-version.tmp; \
echo " endif()" >> $(PACKAGE)-config-version.tmp; \
echo "endif()" >> $(PACKAGE)-config-version.tmp; \
$(INSTALL_DATA) $(PACKAGE)-config-version.tmp $(DESTDIR)$(libdir)/cmake/$(PACKAGE)/$(PACKAGE)-config-version.cmake; \
rm $(PACKAGE)-config-version.tmp
# -*- Makefile -*-
maintainer-clean-local: doc-clean-am
###
# build doc / web-install recursively
doc-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:
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; \
target=`echo $@ | sed s/-recursive//`; \
list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
echo "Making $$target in $(subdir)/$$subdir"; \
if test "$$subdir" = "."; then \
dot_seen=yes; \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
done; \
if test "$$dot_seen" = "no"; then \
$(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
# -*-makefile-automake-*-
doxygendir = $(docdir)/doxygen
####
# doxygen style files
if DUNEWEB
if WML
DUNEWEBDOXY = @DUNEWEBDIR@/doc/doxygen
# themeing doxygen
DOXYGENHEADER = doxy-header.html
DOXYGENFOOTER = doxy-footer.html
doxy-header.html: BASEDIR=../../..
doxy-footer.html: BASEDIR=../../..
doxy-header.html: WMLOPTS=
doxy-footer.html: WMLOPTS=
doxy-header.html: @DUNEWEBDIR@/doc/doxygen/doxy-header.wml
$(WMLCMD) -I @DUNEWEBDIR@/doc/doxygen/ @DUNEWEBDIR@/doc/doxygen/doxy-header.wml -o $(abs_builddir)/doxy-header.html
doxy-footer.html: @DUNEWEBDIR@/doc/doxygen/doxy-footer.wml
$(WMLCMD) -I @DUNEWEBDIR@/doc/doxygen/ @DUNEWEBDIR@/doc/doxygen/doxy-footer.wml -o $(abs_builddir)/doxy-footer.html
endif # WML
endif # DUNEWEB
####
# how to build doxygen documentation
# EXTRAINSTALL in the html subdirectory
DOXYGENHTMLFILES = *.html *.css *.png *.gif
DOXYGENINSTALL = $(DOXYGENHTMLFILES) ../doxygen.log ../doxyerr.log
if DOXYGEN
if BUILD_DOCS
# disable dependency tracking when working without doxygen/documentation
DOXYGENTAG = doxygen-tag
endif # BUILD_DOCS
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 modules
# check dependency ourself to be robust
$(DOXYGENTAG): FORCE Doxyfile $(DOXYGENHEADER) $(DOXYGENFOOTER)
set -e; \
DTAG=$(DOXYGENTAG); \
if test -f $(srcdir)/$(DOXYGENTAG); then DTAG=$(srcdir)/$(DOXYGENTAG); fi; \
if ! test -e "$$DTAG" || \
test x"`find $(top_srcdir) \( $(DOXYGEN_DEPENDON) \) -a -newer $$DTAG -print | grep -v cmake/modules`" != x; \
then \
echo Running doxygen. This may take a while... ; \
$(DOXYGEN) Doxyfile > doxygen.log <&-; \
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; \
touch $(DOXYGENTAG) ; \
fi
doc-doxygen: $(DOXYGENTAG) $(DOXYGENHEADER) $(DOXYGENFOOTER)
else
doc-doxygen:
endif # DOXYGEN
doc-local: doc-doxygen
doxygen-html-install:
set -e; \
OLDPWD=$$PWD; \
dir=$(abs_srcdir); \
if test -f $(abs_builddir)/$(DOXYGENTAG); then dir=$(abs_builddir); fi; \
cd "$$dir/html/"; \
list=`echo $(DOXYGENHTMLFILES)`; \
cd "$$OLDPWD"; \
for p in $$list; do \
if test -f "$$dir/html/$$p"; then $(instcmd) $$dir/html/$$p $(instdir); fi; \
done;
####
# how to store doxygen in the tarball
if BUILD_DOCS
if DOXYGEN
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
####
# how to install doxygen
install-doxygen: $(DOXYGENTAG)
set -e; $(mkinstalldirs) $(DESTDIR)/$(doxygendir); \
pwd; \
$(MAKE) doxygen-html-install instcmd="$(install_sh_DATA)" instdir="$(DESTDIR)/$(doxygendir)"
uninstall-doxygen:
rm -rf $(DESTDIR)/$(doxygendir)
# add doxygen to documentation-installation
install-documentation-local: install-doxygen
uninstall-documentation-local: uninstall-doxygen
endif # DOXYGEN
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; \
$(MAKE) -f $(DUNEWEBDIR)/Make.global \
EXTRAINSTALL="$(DOXYGENINSTALL)" CURDIR="$(CURDIR)/@DUNE_MOD_NAME@-html" install ; \
popd; \
fi
else
web-install-doxygen:
endif # DUNEWEB
web-install-local: web-install-doxygen
####
# how to clean the doxygen stuff
doc-clean-local: doxygen-doc-clean
dist-clean-local: doxygen-dist-clean
doxygen-dist-clean:
rm -f doxygen.log doxyerr.log $(DOXYGENTAG)
doxygen-doc-clean:
rm -rf html $(DOXYGENTAG) $(DOXYGENHEADER) $(DOXYGENFOOTER) *~
rm -f doxyerr.log doxygen.log
test ! -f Doxylocal || rm -f Doxygen.in
# nice trick from the GNU make infopage to force a rule to run
FORCE:
# -*- Makefile -*-
#
# this file should be included into any Makefile.am so that we can
# easily introduce new global rules. DO NOT OVERUSE!
#
# add "sourcescheck"-target testing if all source files are mentioned
include $(top_srcdir)/am/sourcescheck
# check consistency of the headers (see FS#394)
include $(top_srcdir)/am/headercheck
# add "check-log"-target to create automated build logs
include $(top_srcdir)/am/checklog
# add "doc"-target to create and clean documentation
include $(top_srcdir)/am/documentation
# -*- Makefile -*-
headercheck_PATTERN = *.hh
# set
# headercheck_IGNORE = foo.hh
# to ignore foo.hh
hctest.o: hctest.cc
$(CXX) -I$(top_builddir) -I$(top_srcdir) -DHEADERCHECK \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) \
$(DUNEMPICPPFLAGS) $(ALL_PKG_CPPFLAGS) -c -o $@ $<
headercheck:
@if test "x$V" = "x"; then \
SILENTSTR='V=$(AM_DEFAULT_VERBOSITY)' ; \
fi; \
if test "x$SILENT" = "x1"; then \
SILENTSTR='V=0' ; \
fi; \
if test "x$SILENT" = "x0"; then \
SILENTSTR='V=1' ; \
fi; \
if test x"$$HEADER" = "x"; then \
$(MAKE) $$SILENTSTR $(AM_MAKEFLAGS) headercheck-recursive; \
else \
$(MAKE) $$SILENTSTR $(AM_MAKEFLAGS) headercheck-am; \
fi
headercheck-am:
@if test x"$$HEADER" != "x"; then \
list="$$HEADER"; \
else \
pushd "$(srcdir)" > /dev/null; \
list=`echo $(headercheck_PATTERN)`; \
popd > /dev/null; \
fi; \
test -z "$$NO_CONFIG_H" && NO_CONFIG_H=0; \
test "$$list" != "$(headercheck_PATTERN)" || exit 0; \
for f in $$list; do \
echo "$(headercheck_IGNORE)" | tr ' ' '\n' | grep -q "$$f"; \
if echo "$(headercheck_IGNORE)" | tr ' ' '\n' | grep -q "$$f"; then continue; fi; \
HEADER="$(subdir)/$$f"; \
echo "checking $$HEADER"; \
CCFILE=hctest.cc; \
OFILE=hctest.o; \
LOGFILE=hctest.log; \
rm -f $$CCFILE; \
test $$NO_CONFIG_H -ne 0 && echo " without config.h" \
|| echo "#include <config.h>" > $$CCFILE; \
echo "#include <$${HEADER}>" >> $$CCFILE; \
echo "#include <$${HEADER}>" >> $$CCFILE; \
echo "int main () { return 0; }" >> $$CCFILE; \
$(MAKE) $$OFILE > $$LOGFILE 2>&1; \
SUCCESS=$$?; \
if ! (test $$SUCCESS -eq 0 && test -e $$OFILE); then \
echo "Error in $$HEADER"; \
test $V -ne 1 && echo "run with V=1 to show details" || cat $$LOGFILE; \
fi; \
warnings=`grep 'warning' $$LOGFILE`; \
FOUNDWARNINGS=$$?; \
if ( test $$FOUNDWARNINGS -eq 0 && test -e $$OFILE ); then \
echo "Warnings in $$HEADER"; \
test $V -ne 1 && echo "run with V=1 to show details" || cat $$LOGFILE; \
fi; \
rm -f $$OFILE; \
rm -f $$CCFILE; \
rm -f $$LOGFILE; \
test $$SUCCESS -eq 0 || exit $$SUCCESS; \
done
headercheck-recursive:
@set fnord $$MAKEFLAGS; amf=$$2; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
echo "Making $$target in $(subdir)/$$subdir"; \
if test "$$subdir" = "."; then \
dot_seen=yes; \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
.PHONY: headercheck headercheck-recursive headercheck-am
# vim:set filetype=automake:
if INKSCAPE
.svg.png:
$(INKSCAPE) -e $@ $<
endif INKSCAPE
# -*- makefile -*-
# Rules for latex stuff
# rerun TEX if log-file suggests that
.tex.dvi:
export TEXINPUTS=.:$(abs_builddir):${TEXINPUTS}:; \
set -e; builddir=$$PWD; \
pushd $(srcdir); $(TEX) -output-directory=$$builddir </dev/null $*; popd; \
while grep 'Rerun to get' $*.log > /dev/null ; do \
pushd $(srcdir); $(TEX) -output-directory=$$builddir </dev/null $*; popd; \
done; \
if grep '^\\bibdata{' *.aux > /dev/null \
&& grep '^\\citation{' *.aux > /dev/null; \
then \
BSTINPUTS=.:$(srcdir):${BSTINPUTS}: BIBINPUTS=.:$(srcdir):${BIBINPUTS}: $(BIBTEX) $* || exit $$?; \
pushd $(srcdir); $(TEX) -output-directory=$$builddir </dev/null $*; popd; \
while grep 'Rerun to get' $*.log > /dev/null ; do \
pushd $(srcdir); $(TEX) -output-directory=$$builddir </dev/null $*; popd; \
done ; \
fi
.dvi.pdf:
export TEXINPUTS=.:$(abs_builddir):${TEXINPUTS}:; \
pushd $(srcdir); \
$(DVIPDF) $(abs_builddir)/$*.dvi $(abs_builddir)/$*.pdf; \
popd
.dvi.ps:
export TEXINPUTS=.:$(abs_builddir):${TEXINPUTS}:; \
pushd $(srcdir); \
$(DVIPS) $(abs_builddir)/$*.dvi -o $(abs_builddir)/$*.ps; \
popd
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
# -*- Makefile -*-
# many tests need parts of libdune. Telling the tests to use
# previously build partial libs is possible but difficult to maintain:
# the SUBDIRS have to be very carefully defined for this to work...
# Additionally, testing with a partial lib is unrealistic.
#
# As users may try to use "make check" without a full build we
# generate a meaningful error message instead of silently failing on a
# lib-dependency
# add a new dependency to automake-internal rule
check-am: libcheck
libcheck: libcheck-FORCE
@if test ! -f $(top_builddir)/lib/libdune.la ; then \
echo ; \
echo ' libdune not built, checks will not work yet!' ; \
echo ' Run a full make to fix this' ; \
echo ; \
exit 1; \
fi
libcheck-FORCE:
.PHONY: libcheck libcheck-FORCE
# -*- Makefile -*-
sourcescheck_IGNORE = aclocal.m4 dependencies.m4
sourcescheck_LIST = $(SOURCES) $(DIST_SOURCES) $(HEADERS) $(DIST_HEADERS) \
$(sourcescheck_NOSOURCES) $(dist_noinst_DATA) $(EXTRA_DIST)
sourcescheck: sourcescheck-recursive
# @(for f in $(sourcescheck_LIST) fnord; do echo $$f; done) | \
# grep '\.[hc][hc]$$' | sort | uniq > header_CHECK.install
sourcescheck-am:
@echo $(sourcescheck_LIST) | tr ' ' '\n' | \
grep '\.[hcm][hc4]$$' | sort | uniq > header_CHECK.install
@(ls $(srcdir); echo $(sourcescheck_DUMMY)) | \
grep '\.[hcm][hc4]$$' | sort | uniq > header_CHECK.present
@RESULT=0; \
if diff header_CHECK.* | grep ^[\<\>] -q; then \
echo "==== WARNING ===="; \
echo "Directory: $(srcdir)"; \
echo "Files present but not installed:"; \
diff -u header_CHECK.install header_CHECK.present | \
grep -v ^+++ | grep ^+; \
echo "Files listed for install but not present:"; \
diff -u header_CHECK.install header_CHECK.present | \
grep -v ^--- | grep ^-; \
echo "==== END ===="; \
RESULT=1; \
fi; \
rm -f header_CHECK.install header_CHECK.present; \
exit $$RESULT
sourcescheck-recursive:
@set fnord $$MAKEFLAGS; amf=$$2; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
dot_seen=yes; \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
.PHONY: sourcescheck sourcescheck-recursive sourcescheck-am
# -*-makefile-*-
ACLOCAL_AMFLAGS=@ACLOCAL_AMFLAGS@
DUNECONTROL=@DUNE_COMMON_ROOT@/bin/dunecontrol
sourcescheck_NOSOURCES = aclocal.m4 dependencies.m4
all-am: dependencies.m4
@DUNE_MOD_NAME@.m4: dune.module
cd $(srcdir) && $(DUNECONTROL) --only=@DUNE_MOD_NAME@ m4create
moduledir = $(libdir)/dunecontrol/@DUNE_MOD_NAME@
module_DATA = dune.module
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = @DUNE_MOD_NAME@.pc
maintainer-clean-local: top-clean
# we use LT_OUTPUT, thus we might have a config.lt file -- remove it!
distclean-libtool:
-rm -f libtool config.lt
.PHONY: distclean-libtool
top-clean:
rm -f dependencies.m4
# -*- makefile -*-
## rules to create HTML-pages from wml-files with additional magic to
## possibly use the layout of the Dune-homepage
# if DUNEWEBDIR is set to the dune-web directory the layout and
# install-stuff from that place will be used
# 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:
if test "`dirname $<`" == "."; then \
input="$(abs_srcdir)/$<"; else \
input="$<"; fi; \
$(WMLCMD) -I $(abs_srcdir) $$input -o $(abs_builddir)/$@
endif
####
# howto install into the webpage
if DUNEWEB
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; \
done ; \
$(MAKE) -f $(DUNEWEBDIR)/Make.global \
EXTRAINSTALL="$(EXTRAINSTALL)" CURDIR="$(CURDIR)" install ; \
fi
else
web-install-default:
endif
####
# how to clean up
web-build: $(PAGES)
web-clean:
-test -z $(PAGES) || rm -f $(PAGES)
doc-clean-local: web-clean
web-install-local: web-install-default
doc-local: web-build
install(PROGRAMS
am2cmake.py
dunedoxynize
duneproject
dunecontrol
git-whitespace-hook
mpi-config
dune-autogen
dune-remove-autotools
DESTINATION ${CMAKE_INSTALL_BINDIR})
# put scripts into dist-tarball
EXTRA_DIST = am2cmake.py CMakeLists.txt duneproject dunecontrol \
dunedoxynize \
git-whitespace-hook \
mpi-config dune-autogen \
xfail-compile-tests
# ... and install some
bin_SCRIPTS = am2cmake.py dunedoxynize duneproject dunecontrol mpi-config dune-autogen \
git-whitespace-hook
include $(top_srcdir)/am/global-rules
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment