Skip to content
Snippets Groups Projects
Commit cf61b63e authored by Martin Nolte's avatar Martin Nolte
Browse files

merge recent changes to build system

[[Imported from SVN: r6794]]
parent a57b8776
No related branches found
No related tags found
No related merge requests found
......@@ -19,7 +19,7 @@ Copyright holders:
2010--2011 Andreas Lauser
2007--2011 Sven Marnach
2010 Rene Milk
2011 Steffen Müthing
2011--2012 Steffen Müthing
2003--2006 Thimo Neubauer
2011 Rebecca Neumann
2008--2012 Martin Nolte
......
......@@ -28,13 +28,15 @@ endif # DUNEWEB
####
# how to build doxygen documentation
if DOXYGEN
# 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
# EXTRAINSTALL in the html subdirectory
DOXYGENHTMLFILES = *.html *.css *.png *.gif
DOXYGENINSTALL = $(DOXYGENHTMLFILES) ../doxygen.log ../doxyerr.log
endif # BUILD_DOCS
DUNEDOXYNIZE=@DUNE_COMMON_ROOT@/bin/dunedoxynize
......@@ -96,7 +98,6 @@ endif # BUILD_DOCS
####
# how to install doxygen
if BUILD_DOCS
install-doxygen: $(DOXYGENTAG)
set -e; $(mkinstalldirs) $(DESTDIR)/$(doxygendir); \
......@@ -110,8 +111,6 @@ uninstall-doxygen:
install-documentation-local: install-doxygen
uninstall-documentation-local: uninstall-doxygen
endif # BUILD_DOCS
####
# howto install doxygen in the web page
include $(top_srcdir)/am/webstuff
......
......@@ -886,7 +886,7 @@ EOF
done > "$RESUME_FILE"
fi
for mod in $MODULES; do
for mod in $BUILDMODULES; do
build_module "$mod" "$@"
if test -n "$RESUME_FILE"; then
......
......@@ -78,6 +78,11 @@ modulesexist(){
break
fi
done
if [ "$found" = "0" ]; then
# Module not found in list, try pkg-config
pkg-config $module &> /dev/null
found=$?
fi
if [ "$found" = "0" ]; then
echo "ERROR:">&2
echo "Module with name $dep was not found" >&2
......
......@@ -1541,6 +1541,22 @@ you options file the \configure cache is created. Be aware that the file persis
between \dunecontrol runs. If you encounter any problems, you want to change the
configuration or to rerun all checks, the cache file should be removed manually.
\minisec{Faster module search}
If the environment variable \texttt{DUNE\_CONTROL\_PATH} is not set, \dunecontrol
recursively searches for \dune modules below the working directory. Depending on
your installation, this search may take quite a bit of time. It can be
avoided by including the paths to the \texttt{dune.module} files of all modules in
\texttt{DUNE\_CONTROL\_PATH}.
This list of paths can actually be created on the fly by a command.
Let us assume all \dune modules are in one directory, which is the working directory
for \dunecontrol, too. By adding the line
\begin{lstlisting}[language=make,showstringspaces=false]
DUNE_CONTROL_PATH="`ls */dune.module | tr '\n' ':'`"
\end{lstlisting}
to your opts file, no search will be performed. Instead, only the faster, non-recursive
\texttt{ls} command is called.
\section{Further documentation}
\minisec{automake \& Makefile.am}
......
......@@ -142,7 +142,8 @@ EXPAND_ONLY_PREDEF = YES
PREDEFINED = DOXYGEN \
HAVE_MPI:=1 \
_DEBUG_ALLOCATOR_H:=1 \
"DUNE_DEPRECATED:=/** \deprecated */"
"DUNE_DEPRECATED:=/** \deprecated */" \
"DUNE_DEPRECATED_MSG(A):=/** \deprecated A */"
@DOT_TRUE@HAVE_DOT = YES
......
......@@ -58,25 +58,33 @@ parse_control() {
# create and check variable name from module name
export module_inst="no"
export module=$(fix_variable_name $name)
if ! check_modname "$module"; then
echo "ERROR: $CONTROL files $1 contains an invalid Module entry" >&2
exit 1
fi
# read dune.module file
local deps="$(echo $($GREP "^[$BLANK]*Depends:" "$1" | cut -d ':' -f2))"
local sugs="$(echo $($GREP "^[$BLANK]*Suggests:" "$1" | cut -d ':' -f2))"
local vers="$(echo $($GREP "^[$BLANK]*Version:" "$1" | cut -d ':' -f2))"
local main="$(echo $($GREP "^[$BLANK]*Maintainer:" "$1" | cut -d ':' -f2))"
# guess the path of the dune module:
# check whether the module is installed.
# - installed modules can be found via pkg-config
# - pkg-config --var=prefix should be the same as $path
#
# the path contains a different sub structure
# for installed and source modules
# - installed module: ${path}/lib/dunecontrol/${name}/dune.module
# and there is a file ${path}/lib/pkgconfig/${name}.pc
# - source module: ${path}/dune.module
# and there is a file ${path}/${name}.pc.in
local path="$(canonicalpath "$1")"
if test ! -f $path/dune.module -a \
-f $path/../../../lib/dunecontrol/${name}/dune.module; then
path=$(canonicalname "$path/../../../")
if pkg-config $name; then
local prefix="$(pkg-config --variable=prefix $name)"
local pkgpath=$(canonicalname "$prefix/lib/dunecontrol/${name}")
if test x"$pkgpath" = x"$path"; then
path="$prefix"
export module_inst="yes"
fi
if ! check_modname "$module"; then
echo "ERROR: $CONTROL files $1 contains an invalid Module entry" >&2
exit 1
fi
fi
# avoid multiple definition of the same module
if test "x$(eval echo \$HAVE_$module)" != "x"; then
......@@ -147,8 +155,8 @@ setup_control_path() {
if pkg-config dune-common; then
# try usual locations of installed modules
for i in /usr/local/lib/dunecontrol/ /usr/lib/dunecontrol/; do
if test -d $i; then
DUNE_CONTROL_PATH=$DUNE_CONTROL_PATH:$i
if test -d $i; then
DUNE_CONTROL_PATH=$DUNE_CONTROL_PATH:"$i"
fi
done
for i in `echo $PKG_CONFIG_PATH | tr ':' ' '`; do
......@@ -162,6 +170,17 @@ setup_control_path() {
if test -n "$DUNE_OPTS_FILE"; then
DUNE_CONTROL_PATH="$(. $DUNE_OPTS_FILE; eval echo $DUNE_CONTROL_PATH)"
fi
# canonicalize path
local TMP=""
# foreach dir in $@
while read dir; do
TMP=$TMP:"$(canonicalname $dir)"
done <<EOF
$(echo $DUNE_CONTROL_PATH | sed -e 's/:\+/:/g' | tr ':' '\n')
EOF
# sort+uniq path
DUNE_CONTROL_PATH="$(echo $TMP | tr ':' '\n' | sort -u | tr '\n' ':' | sed -e 's/^://' -e 's/:$//')"
# safe result
export DUNE_CONTROL_PATH
}
......
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