Skip to content
Snippets Groups Projects
Commit fb6b1aae authored by Markus Blatt's avatar Markus Blatt
Browse files

Merged duneproject bugfix from release.

[[Imported from SVN: r5001]]
parent fca68638
No related branches found
No related tags found
No related merge requests found
...@@ -37,6 +37,19 @@ canonicalpath(){ ...@@ -37,6 +37,19 @@ canonicalpath(){
(cd $(dirname $(canonicalname $1)) && pwd) (cd $(dirname $(canonicalname $1)) && pwd)
} }
pkg_config_dependencies(){
if test $# -ne 1; then
echo Usage: pkg_config_dependencies name > /dev/stderr
return 1
fi
name="$1"
depends="`pkg-config --variable=DEPENDENCIES $name| sed -e 's/,/ /g'`"
for pkg in $depends; do
depends="$depends `pkg_config_dependencies $pkg`"
done
echo $depends
}
modulesexist(){ modulesexist(){
allfound=0 allfound=0
...@@ -119,15 +132,6 @@ if [ "$MODULES" = "" ]; then ...@@ -119,15 +132,6 @@ if [ "$MODULES" = "" ]; then
find_modules_in_path find_modules_in_path
fi fi
if [ "$MODULES" = "" ]; then
echo "ERROR">/dev/stderr
echo "No dune modules were found!">/dev/stderr
echo "Did you forget to specify the places where ">/dev/stderr
echo "you installed your modules in the ">/dev/stderr
echo "DUNE_CONTROL_PATH environment variable?" >/dev/stderr
exit 1;
fi
# get the real module names # get the real module names
SRC_MODULES="" SRC_MODULES=""
for i in $MODULES; do for i in $MODULES; do
...@@ -141,6 +145,18 @@ PKG_MODULES="`pkg-config --list-all | grep dune | cut -d' ' -f1`" ...@@ -141,6 +145,18 @@ PKG_MODULES="`pkg-config --list-all | grep dune | cut -d' ' -f1`"
# merge lists # merge lists
ALL_MODULES="`echo $SRC_MODULES $PKG_MODULES | tr ' ' '\n' | sort | uniq`" ALL_MODULES="`echo $SRC_MODULES $PKG_MODULES | tr ' ' '\n' | sort | uniq`"
if [ "$ALL_MODULES" = "" ]; then
echo "ERROR">/dev/stderr
echo "No dune modules were found!">/dev/stderr
echo "Did you forget to specify the places where ">/dev/stderr
echo "you installed your modules in the ">/dev/stderr
echo "DUNE_CONTROL_PATH environment variable">/dev/stderr
echo "and adjusted the PKG_CONFIG_PATH environment">/dev/stderr
echo "accordingly?" >/dev/stderr
exit 1;
fi
################## READ OPTIONS ################## ################## READ OPTIONS ##################
while [ "$DATACORRECT" != "y" -a "$DATACORRECT" != "Y" ]; do while [ "$DATACORRECT" != "y" -a "$DATACORRECT" != "Y" ]; do
...@@ -225,6 +241,7 @@ C_DELIM ...@@ -225,6 +241,7 @@ C_DELIM
## Create the parameters passed to DUNE_CHECK_ALL ## Create the parameters passed to DUNE_CHECK_ALL
# save module list of dunemodules.inc # save module list of dunemodules.inc
set -x
save_MODULES=$MODULES save_MODULES=$MODULES
for name in $DEPENDENCIES; do for name in $DEPENDENCIES; do
mod="`fix_variable_name $name`" mod="`fix_variable_name $name`"
...@@ -237,13 +254,14 @@ for name in $DEPENDENCIES; do ...@@ -237,13 +254,14 @@ for name in $DEPENDENCIES; do
MODULES=$save_MODULES MODULES=$save_MODULES
else else
# found via pkg-config # found via pkg-config
M_DEPS="`pkg-config --variable=Requires $name`" M_DEPS="`pkg_config_dependencies $name` $name"
#M_DEPS="`pkg-config --variable=Requires $name`"
fi fi
for dep in $M_DEPS; do for dep in $M_DEPS; do
CHECK="$CHECK [$dep]" CHECK="$CHECK [$dep]"
done done
done done
set +x
make_unique "$CHECK" make_unique "$CHECK"
# insert , between modules # insert , between modules
......
...@@ -4,11 +4,12 @@ libdir=@libdir@ ...@@ -4,11 +4,12 @@ libdir=@libdir@
includedir=@includedir@ includedir=@includedir@
CXX=@CXX@ CXX=@CXX@
CC=@CC@ CC=@CC@
DEPENDENCIES=@REQUIRES@
Name: @PACKAGE_NAME@ Name: @PACKAGE_NAME@
Version: @VERSION@ Version: @VERSION@
Description: Dune (Distributed and Unified Numerics Environment) common module Description: Dune (Distributed and Unified Numerics Environment) common module
URL: http://dune-project.org/ URL: http://dune-project.org/
Requires: @REQUIRES@ Requires: ${DEPENDENCIES}
Libs: Libs: -L${libdir} -ldunecommon
Cflags: -I${includedir} Cflags: -I${includedir}
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