Hi Hao, you can prepend the command by setting the DUNE_CONTROL_PATH variable. In my case this would look like DUNE_CONTROL_PATH=/home-local/bernd/DUMUX ./dune-common/bin/dunecontrol ...
You have to replace "/home-local/bernd/DUMUX" by the directory where dune-common and the other Dune modules are stored. Most likely the directory from which you execute the command. Kind regards Bernd On Mon, 23 Jun 2014 20:42:03 +0200 ?? <[email protected]> wrote: >Dear developer, >after I decompress all the dune tarbal, I don't get >usr/local/lib/dunecontrol, such that I can't make models, please give me >some help, I paste the output from > >./dune-common/bin/dunecontrol --debug autogen : configure > > >" > echo "WARNING: You will have to make sure that your commits don't >introduce any trailing whitespace or indentation with tabs!" > echo "WARNING: Otherwise, your commits might be rejected when >trying to push them to an official repository!" > > if [ -e "$GITHOOKPATH" ]; then > # there is a pre-commit hook, check whether it is our whitespace >hook > local HOOKTAG="$(eval head -n 2 \"$GITHOOKPATH\" | tail -n 1)" > if [ "x$HOOKTAG" = "x# dune-git-whitespace-hook" ]; then > echo "--> Removing DUNE whitespace hook as requested by the >user" > rm "$GITHOOKPATH" > fi > fi > else > # standard handling of Git whitespace hook > if [ ! -e "$GITHOOKPATH" ]; then > # there is no hook yet, we can safely install ours > echo "--> Installing Git pre-commit hook to enforce whitespace >policy" > cp -p "$PREFIX_DIR/bin/git-whitespace-hook" "$GITHOOKPATH" > else > # there is already a hook, check whether it is our whitespace hook > local HOOKTAG="$(eval head -n 2 \"$GITHOOKPATH\" | tail -n 1)" > if [ "x$HOOKTAG" = "x# dune-git-whitespace-hook" ]; then > if [ "$PREFIX_DIR/bin/git-whitespace-hook" -nt "$GITHOOKPATH" >]; then > echo "--> Updating Git pre-commit hook with newer version" > cp -p "$PREFIX_DIR/bin/git-whitespace-hook" "$GITHOOKPATH" > fi > else > echo "WARNING: Existing pre-commit hook found!" > echo "WARNING: Skipping installation of DUNE whitespace hook!" > echo "WARNING: If you want to contribute patches to DUNE, you >should make sure to call the whitespace hook" > echo "WARNING: (dune-common/bin/git-whitespace-hook) from you >custom pre-commit hook, otherwise your commits" > echo "WARNING: might contain trailing whitespace and will not >apply cleanly to the official repositories!" > fi > fi > fi > fi > > # Apply git configuration settings > if [ -f .vcsetup/config ]; then > echo -n "--> Setting Git configuration entries... " > cat .vcsetup/config | while read; do > # Filter out comments > local COMMENT="$(echo $REPLY | $GREP '^#')" > if [ ! "x$COMMENT" = "x$REPLY" ]; then > # parse line into an array first to catch obvious syntax errors > # like 'option value; rm -rf /' > eval local GIT_ARGS=($REPLY) > git config "${GIT_ARGS[@]}" > fi > done > echo "done" > fi > > # Apply user supplied configuration settings > if [ -n "$GIT_CONFIG_FILE" ]; then > if [ -f "$GIT_CONFIG_FILE" ]; then > echo -n "--> Setting custom Git configuration entries from >'$GIT_CONFIG_FILE'... " > cat "$GIT_CONFIG_FILE" | while read; do > # Filter out comments > local COMMENT="$(echo $REPLY | $GREP '^#')" > if [ ! "x$COMMENT" = "x$REPLY" ]; then > # parse line into an array first to catch obvious syntax errors > # like 'option value; rm -rf /' > eval local GIT_ARGS=($REPLY) > git config "${GIT_ARGS[@]}" > fi > done > echo "done" > else > echo "WARNING: custom Git config file '$GIT_CONFIG_FILE' not found!" > fi > fi > > fi > > # Run custom setup scripts > if [ -d .git -o -f .git -o -d .svn -o -d CVS -o -f stamp-vc ]; then > if [ -d .vcsetup/run.d ]; then > for SCRIPT in .vcsetup/run.d/* ; do > if [ -x "$SCRIPT" ]; then > echo "--> Running $SCRIPT" > "$SCRIPT" > fi > done > fi > fi >} > >run_default_update () { > DUNELINK=0 > if test -L dune; then > rm dune > DUNELINK=1 > fi > if test -d .svn; then > svn update > elif test -d CVS; then > cvs update -dP > elif test -d .git; then > if test -d ".git/svn" && test -n "`git svn find-rev HEAD`"; then > # If the current HEAD points to a SVN commit, update via git-svn > git svn rebase > else > # Update all remotes (if any) > git remote update > > # merge all changes fast-forward style if possible > if ! git merge --ff-only FETCH_HEAD 2> /dev/null; then > echo "$module seems to be using git, and could not be" > echo "updated automatically. Please update it manually." > echo "(Usually, this is done via 'git svn rebase' for modules >using" > echo "subversion or 'git merge' for modules which use git >natively." > echo "Conflicts can be resolved using 'git mergetool'.)" > fi > fi > else > echo "WARNING: $module is not under a known version control system." > echo " We support svn, git and cvs." > fi > if test "$DUNELINK" != 0 && ! test -d dune; then > echo "WARNING: $module is using the deprecated dune symlink" > ln -s . dune > fi >} > >run_default_autogen () { > if test "x$USE_CMAKE" != "xyes" || test ! -e "$(eval "echo >\$PATH_$module")/CMakeLists.txt" ; then > PARAMS="$CMD_FLAGS" > local M4_PATH="" > if test -f configure.ac && \ > ( test -d .svn || test -d .git || test -d CVS || test -f stamp-vc ); >then > sort_modules $MODULES > for m in $MODULES; do > path="$(eval "echo \$PATH_$m")" > MODULE_PATHS="$MODULE_PATHS\"$path\" " > done > if test -f autogen.sh; then > eval echo "WARNING: \$NAME_$module contains obsolete autogen.sh," \ > >&2 > echo " dune-autogen is used instead." >&2 > fi > eval "\"$PREFIX_DIR/bin/dune-autogen\"" "$MODULE_PATHS" "$PARAMS" || >exit 1 > else > echo Skipping dune-autogen > fi > else > echo Skipping dune-autogen because of CMake > fi >} > >run_default_configure () { > extract_multiarch > PARAMS="$CMD_FLAGS" > if test "x$USE_CMAKE" = "xyes" && test -e "$(eval "echo >\$PATH_$module")/CMakeLists.txt"; then > LOCAL_USE_CMAKE=yes > else > LOCAL_USE_CMAKE=no > fi > > if test -x configure || test "x$LOCAL_USE_CMAKE" = "xyes" ; then > ACLOCAL_FLAGS="-I ." > if test -d "m4"; then > ACLOCAL_FLAGS="$ACLOCAL_FLAGS -I m4" > fi > MY_MODULES= > # get dependencies & suggestions > sort_modules $module > for m in $MODULES; do > path="$(eval "echo \$PATH_$m")" > if test "x$LOCAL_USE_CMAKE" = "xyes"; then > # > # Translate the configure PARMS to cmake > export PARAMS > export CMAKE_PARAMS > module_translate_options_am2cmake $m $path/lib > fi > if test x$module = x$m; then continue; fi # skip myself > name=$(eval "echo \$NAME_$m") > for dir in $path/m4 $path/share/dune/aclocal $path/share/aclocal; do > if test -d "$dir"; then > ACLOCAL_FLAGS="$ACLOCAL_FLAGS -I $dir" > fi > done > if test -d "$path/$BUILDDIR"; then > PARAMS="$PARAMS \"--with-$name=$path/$BUILDDIR\"" > else > if test x$(eval echo \$INST_$m) != xyes; then > PARAMS="$PARAMS \"--with-$name=$path\"" > fi > fi > if test "x$LOCAL_USE_CMAKE" = "xyes"; then > if test -d "$path/$BUILDDIR"; then > CMAKE_PARAMS="$CMAKE_PARAMS >\"-D""$name""_DIR=$path/$BUILDDIR\"" > else > TMP_PARAMS="\"-D""$name""_DIR=$path\"" > for i in $MULTIARCH_LIBDIR lib lib64 lib32; do > if test -d "$path/$i/cmake/$name"; then > TMP_PARAMS="\"-D""$name""_DIR=$path/$i/cmake/$name\"" > break; > fi > done > CMAKE_PARAMS="$CMAKE_PARAMS $TMP_PARAMS" > fi > fi > done > > if test "x$HAVE_duneweb" == "xyes"; then > PARAMS="$PARAMS \"--with-duneweb=$PATH_duneweb\"" > fi > > if test "x$LOCAL_USE_CMAKE" = "xyes"; then > # we have to export the compiler and compiler flags > # such that they are honored by cmake. > flags="CXX CC CXXFLAGS CFLAGS CPPFLAGS LDFLAGS F77 FFLAGS FLIBS FC >FCFLAGS FCLIBS LIBS" > for i in $flags; do > cflags=`echo "$PARAMS" | $GREP $i= | $SED -e >"s/.*\($i=\"[^\"]*\"\).*/\1/" -e "s/.*\($i='[^']*'\).*/\1/"` > if test -n "$cflags" && test "$PARAMS" != "$cflags" ; then > PREPARAMS="$PREPARAMS $cflags" > else > cflags=`echo "$PARAMS" | $GREP $i= | $SED -e >"s/.*\($i=[^$BLANK]*\).*/\1/"` > if test -n "$cflags" && test "$PARAMS" != "$cflags" ; then > PREPARAMS="$PREPARAMS $cflags" > fi > fi > done > # create build directory if requested > test -d "$BUILDDIR" || mkdir "$BUILDDIR" > SRCDIR="$PWD" > cd "$BUILDDIR" > echo "$PREPARAMS $CMAKE -DCMAKE_MODULE_PATH=\"$CMAKE_MODULE_PATH\" >$CMAKE_PARAMS $CMAKE_FLAGS \"$SRCDIR\"" > eval $PREPARAMS $CMAKE "-DCMAKE_MODULE_PATH=\"$CMAKE_MODULE_PATH\" >$CMAKE_PARAMS $CMAKE_FLAGS \"$SRCDIR\"" || exit 1 > else > PARAMS="$PARAMS ACLOCAL_AMFLAGS=\"$ACLOCAL_FLAGS\"" > echo ./configure "$PARAMS" > # create build directory if 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 > fi > else > if test -f configure.in || test -f configure.ac; then > echo "ERROR: configure.[in|ac] found, but configure missing." >&2 > echo "Did you forget to run autoconf?" >&2 > echo "Perhaps you didn't update your project to" >&2 > echo "the latest buildsystem changes (FS#382)." >&2 > echo "If your project is under version control, please make sure" >&2 > echo "you have a file stamp-vc in you top_srcdir." >&2 > exit 1 > fi > fi >} > >run_default_make () { > test ! -d "$BUILDDIR" || cd "$BUILDDIR" > PARAMS="$CMD_FLAGS" > echo make "$PARAMS" > eval $MAKE "$PARAMS" >} > >run_default_all () { > for cmd in vcsetup autogen configure make; do > eval echo "--- calling $cmd for \$NAME_${module} ---" > load_opts $cmd > run_$cmd > done >} > >run_default_svn () { > if test -d .svn; then > PARAMS="$CMD_FLAGS" > eval svn "$PARAMS" > fi >} > >run_default_git () { > if test -d .git; then > PARAMS="$CMD_FLAGS" > eval git "$PARAMS" > fi >} > >############################################### >### >### main >### > >onfailure() { > echo "Execution of $(basename "$0") terminated due to errors!" >&2 > exit 1 >} > >usage () { > ( > echo "Usage: $(basename "$0") [OPTIONS] COMMANDS [COMMAND-OPTIONS]" > echo "" > echo " Execute COMMANDS for all Dune modules found. All entries in the" > echo " DUNE_CONTROL_PATH variable are scanned recursively for Dune >modules." > echo " If DUNE_CONTROL_PATH is empty, the current directory is >scanned." > echo " Dependencies are controlled by the $CONTROL files." > echo "" > echo "OPTIONS:" > echo " -h, --help show this help" > echo " --debug enable debug output of this script" > echo " --use-cmake use cmake instead autotools for building" > echo " --module=mod only apply the actions on module mod" > echo " and all modules it depends on" > echo " --only=mod only apply the actions on module mod" > echo " and not the modules it depends on" > echo " --current only apply the actions on the current >module," > echo " the one whose source tree we are standing >in" > echo " --resume resume a previous run (only consider the >modules" > echo " not built successfully on the previous run)" > echo " --skipfirst skip the first module (use with --resume)" > 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 created inside each >module." > echo " --[COMMAND]-opts=opts set options for COMMAND" > echo " (this is mainly useful for the 'all' >COMMAND)" > echo "COMMANDS:" > echo " Colon-separated list of commands. Available commands are:" > printf " \`help'\tguess what :-)\n" > printf " \`print'\tprint the list of modules sorted after their >dependencies\n" > printf " \`info'\tsame as \`print\', but including whether it is a >dependency or suggestion\n" > for i in $COMMANDS; do > printf " \`$i'\t$(eval echo \$${i}_HELP)\n" > done > printf " \`export'\trun eval \`dunecontrol export\` to save the list >of\n" > printf " \t\tdune.module files to the DUNE_CONTROL_PATH variable\n" > echo > ) >&2 >} > ># create the module list >create_module_list() { > # try to get the resume file name from the options > if test -z "$RESUME_FILE" && test -n "$DUNE_OPTS_FILE"; then > export RESUME_FILE="$(eval . $DUNE_OPTS_FILE; eval echo \$RESUME_FILE)" > fi > > if test "$RESUME_FLAG" = "yes" ; then > if ! test -s "$RESUME_FILE" ; then > echo "Error: No previous run to resume. Please make sure that the >RESUME_FILE" > echo " is the name of a writeable file (currently it is >'$RESUME_FILE')" > exit 1 > fi > > export MODULES= > RESUME="`cat "$RESUME_FILE"`" > for a in $RESUME ; do > export NAME_`fix_variable_name $a`="$a" > fix_and_assign MODULE "$a" > export SEARCH_MODULES="$SEARCH_MODULES $MODULE" > export ONLY="$ONLY $MODULE" > done > fi > > find_modules_in_path > if test "x$ONLY" != x; then > export MODULES="$ONLY" > elif test "x$SEARCH_MODULES" != "x"; then > sort_modules $SEARCH_MODULES > else > sort_modules $MODULES > fi > > if test "x$REVERSE_FLAG" = "xyes"; then > export MODULES="$REVERSEMODULES" > fi > > if test "x$SKIPFIRST" = "xyes" ; then > export MODULES=`echo $MODULES " " | cut '--delimiter= ' --fields=2-` > fi > # warn about superseeded modules: > if test -n "$superseded_modules"; then > # sort moules list and make it unique. > superseded_modules=$(echo $superseded_modules | tr ' ' '\n'| sort -u) > echo >&2 > echo "The following local modules do supersede the corresponding >installed ones:" >&2 > echo "$superseded_modules" >&2 > echo >&2 > fi >} > ># print the module list >print_module_list() { > DELIM=$1 > shift > while test -n "$2"; do > echo -n "$(eval echo \$NAME_$1)$DELIM" > shift > done > echo -n "$(eval echo \$NAME_$1)" >} > >trap onfailure EXIT >+ trap onfailure EXIT > ># clear variables >export SEARCH_MODULES="" >+ export SEARCH_MODULES= >+ SEARCH_MODULES= >export MODULES="" >+ export MODULES= >+ MODULES= >export ONLY="" >+ export ONLY= >+ ONLY= >export RESUME_FLAG=no >+ export RESUME_FLAG=no >+ RESUME_FLAG=no >export REVERSE_FLAG=no >+ export REVERSE_FLAG=no >+ REVERSE_FLAG=no >export SKIPFIRST=no >+ export SKIPFIRST=no >+ SKIPFIRST=no > ># read environment variable USE_CMAKE >export DUNE_USE_CMAKE="$(echo $USE_CMAKE)" >echo $USE_CMAKE)" >echo $USE_CMAKE) >echo $USE_CMAKE >++ echo >+ export DUNE_USE_CMAKE= >+ DUNE_USE_CMAKE= > ># parse commandline parameters >while test $# -gt 0; do > # get option > command=$1 > option=$1 > > # get args > set +e > # stolen from configure... > # when no option is set, this returns an error code > arg=`expr "x$option" : 'x[^=]*=\(.*\)'` > set -e > > # switch > case "$option" in > --opts=*) > if test "x$arg" = "x"; then > usage > echo "ERROR: Parameter for --opts is missing" >&2 > echo >&2 > exit 1; > fi > DUNE_OPTS_FILE=`canonicalname $arg` > if ! test -r "$DUNE_OPTS_FILE"; then > usage > echo "ERROR: could not read opts file \"$DUNE_OPTS_FILE\"" >&2 > echo >&2 > exit 1; > fi > ;; > --*-opts=*) > optcmd=`expr "x$option=" : 'x--\([^-]*\)-opts=.*'` > if is_command $optcmd; then > COMMAND=`echo $optcmd | tr '[:lower:]' '[:upper:]'` > export ${COMMAND}_FLAGS="$arg" > else > usage > echo "ERROR: unknown option \"$option\"" >&2 > exit 1 > fi > ;; > -h|--help) > command=help > break > ;; > -p|--print) > command=print > break > ;; > --module=*) > if test "x$arg" = "x"; then > usage > echo "ERROR: Parameter for --module is missing" >&2 > echo >&2 > exit 1; > fi > for a in `echo $arg | tr ',' ' '`; do > export NAME_`fix_variable_name $a`="$a" > fix_and_assign MODULE "$a" > export SEARCH_MODULES="$SEARCH_MODULES $MODULE" > done > ;; > --only=*) > if test "x$arg" = "x"; then > usage > echo "ERROR: Parameter for --only is missing" >&2 > echo >&2 > exit 1; > fi > for a in `echo $arg | tr ',' ' '`; do > export NAME_`fix_variable_name $a`="$a" > fix_and_assign MODULE "$a" > export SEARCH_MODULES="$SEARCH_MODULES $MODULE" > export ONLY="$ONLY $MODULE" > done > ;; > --builddir=*) > export DUNE_BUILDDIR=$arg > ;; > --no-builddir) > export DUNE_BUILDDIR="" > ;; > --skipversioncheck) > export SKIPVERSIONCHECK=yes > ;; > --current) > while ! test -f $CONTROL; do > cd .. > if test "$OLDPWD" = "$PWD"; then > echo "You are not inside the source tree of a DUNE module." >&2 > exit -1 > fi > done; > parse_control $PWD/$CONTROL > fix_and_assign MODULE "$module" > export SEARCH_MODULES="$SEARCH_MODULES $MODULE" > export ONLY="$ONLY $MODULE" > ;; > --resume) > export RESUME_FLAG="yes" > ;; > --reverse) > export REVERSE_FLAG="yes" > ;; > --skipfirst) > export SKIPFIRST=yes > ;; > --use-cmake|--cmake) > export DUNE_USE_CMAKE=yes > ;; > --no-cmake) > export DUNE_USE_CMAKE=no > ;; > --debug) true ;; # ignore this option, it is handled right at the >beginning > --*) > usage > echo "ERROR: Unknown option \`$option'" >&2 > echo >&2 > exit 1 > ;; > *) > break > ;; > esac > > shift >done >+ test 4 -gt 0 >+ command=--debug >+ option=--debug >+ set +e >expr "x$option" : 'x[^=]*=\(.*\)' >++ expr x--debug : 'x[^=]*=\(.*\)' >+ arg= >+ set -e >+ case "$option" in >+ true >+ shift >+ test 3 -gt 0 >+ command=autogen >+ option=autogen >+ set +e >expr "x$option" : 'x[^=]*=\(.*\)' >++ expr xautogen : 'x[^=]*=\(.*\)' >+ arg= >+ set -e >+ case "$option" in >+ break > >extract_multiarch >+ extract_multiarch >+ set +e >+ local my_cxx_compiler >+ test x '!=' x >+ test x = xyes >+ test x == x >+ load_opts configure >+ local command=configure >echo $command | tr '[:lower:]' '[:upper:]') >echo $command | tr '[:lower:]' '[:upper:]' >++ echo configure >++ tr '[:lower:]' '[:upper:]' >+ local COMMAND=CONFIGURE >eval echo \$${COMMAND}_FLAGS) >eval echo \$${COMMAND}_FLAGS >++ eval echo '$CONFIGURE_FLAGS' >echo $CONFIGURE_FLAGS >+++ echo >+ CMD_FLAGS= >+ local CMD_FLAGS_FROM_FILE= >+ test configure = NONE >+ test -n '' >+ test x '!=' x >+ test -n '' >+ test -n '' >+ test x = xyes >echo $CMD_FLAGS | $GREP CXX | $SED >"s/.*CXX=[\"']\{0,1\}\([^$BLANK'\"]*\)[\"']\{0,1\}.*/\1/" >++ echo >++ grep CXX >++ sed 's/.*CXX=["'\'']\{0,1\}\([^ '\''"]*\)["'\'']\{0,1\}.*/\1/' >+ my_cxx_compiler= >+ test x == x >which cc &>/dev/null) >which cc &>/dev/null >++ which cc >+ test 0 -eq 0 >+ my_cxx_compiler=cc >$my_cxx_compiler --print-multiarch 2>/dev/null) >$my_cxx_compiler --print-multiarch 2>/dev/null >++ cc --print-multiarch >+ multiarch= >+ test 0 -gt 0 >+ set -e >+ export MULTIARCH_LIBDIR=lib/ >+ MULTIARCH_LIBDIR=lib/ > ># create PKG_CONFIG_PATH for installed dune modules >for i in $MULTIARCH_LIBDIR lib64 lib32 lib; do > if test -d "$PREFIX_DIR/$i/pkgconfig"; then > export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$PREFIX_DIR/$i/pkgconfig" > fi >done >+ for i in '$MULTIARCH_LIBDIR' lib64 lib32 lib >+ test -d /usr/local/dune/dune-common-2.3.1/bin/../lib//pkgconfig >+ for i in '$MULTIARCH_LIBDIR' lib64 lib32 lib >+ test -d /usr/local/dune/dune-common-2.3.1/bin/../lib64/pkgconfig >+ for i in '$MULTIARCH_LIBDIR' lib64 lib32 lib >+ test -d /usr/local/dune/dune-common-2.3.1/bin/../lib32/pkgconfig >+ for i in '$MULTIARCH_LIBDIR' lib64 lib32 lib >+ test -d /usr/local/dune/dune-common-2.3.1/bin/../lib/pkgconfig > ># we assume there should be a command... >if test "x$command" = "x"; then > usage > exit 1 >fi >+ test xautogen = x > >case "$command" in > print) > create_module_list > eval "print_module_list ' ' $MODULES" > echo >&2 > ;; > info) > create_module_list > echo $SORTEDMODULES_INFO > ;; > export) > create_module_list > DUNE_CONTROL_PATH="" > for mod in $MODULES; do > path="$(eval echo \$PATH_$mod)" > name=$(eval echo \$NAME_$mod) > if test -f "$path/dune.module"; then > export DUNE_CONTROL_PATH="$DUNE_CONTROL_PATH:$path/dune.module" > else > if test -f "$path/lib/dunecontrol/$name/dune.module"; then > export >DUNE_CONTROL_PATH="$DUNE_CONTROL_PATH:$path/lib/dunecontrol/$name/dune.module" > else > echo "ERROR: while creating list of dune.module files" >&2 > echo " couldn't find dune.module file for $name in $path" >>&2 > echo >&2 > exit 1 > fi > fi > done > echo export DUNE_CONTROL_PATH=$(echo $DUNE_CONTROL_PATH | $SED -e >'s/^://') > ;; > printdeps) > find_modules_in_path > if test "x$SEARCH_MODULES" == "x"; then > echo "ERROR: printdeps requires an explicit --module=... parameter" >>&2 > exit 1 > fi > mainmod=`echo $SEARCH_MODULES` > name=`eval echo \\${NAME_$mainmod}` > echo "dependencies for $name" > ### DEPENDENCIES > sort_modules $mainmod > for mod in $SORTEDMODULES_DEPS; do > echo " $mod (required)" > done > for mod in $SORTEDMODULES_SUGS; do > echo " $mod (suggested)" > done > ;; > m4create) > find_modules_in_path > if test "x$SEARCH_MODULES" == "x"; then > echo "ERROR: m4create requires an explicit --module=... parameter" >>&2 > exit 1 > fi > mainmod=`echo $SEARCH_MODULES` > eval mainmodpath="\$PATH_$mainmod" > fname="$mainmodpath/dependencies.m4" > name=`eval echo \\${NAME_$mainmod}` > version=`eval echo \\${VERS_$mainmod}` > maintainer=`eval echo \\${MAIN_$mainmod}` > # get dependencies > eval deps=\$DEPS_$mainmod > #initially remove leading space > deps=`echo "$deps" | $SED 's/^ *//'` > while test -n "$deps"; do > #the end of the name is marked either by space, opening paren > #or comma > depname="${deps%%[ (,]*}" > #remove the name and adjacent whitespace > deps=`echo "$deps" | $SED 's/^[^ (,]* *//'` > #check whether there is a dependency version > case "$deps" in > '('*) deps="${deps#(}" > depver="${deps%%)*}" > deps="${deps#*)}" > ;; > *) depver= > ;; > esac > #remove any leading whitespace or commas for te next iteration > deps=`echo "$deps" | $SED 's/^[, ]*//'` > > requires="$requires $depname $depver " > done > # get suggestions > eval sugs=\$SUGS_$mainmod > #initially remove leading space > sugs=`echo "$sugs" | $SED 's/^ *//'` > while test -n "$sugs"; do > #the end of the name is marked either by space, opening paren > #or comma > sugsname="${sugs%%[ (,]*}" > #remove the name and adjacent whitespace > sugs=`echo "$sugs" | $SED 's/^[^ (,]* *//'` > #check whether there is a dependency version > case "$sugs" in > '('*) sugs="${sugs#(}" > sugsver="${sugs%%)*}" > sugs="${sugs#*)}" > ;; > *) sugver= > ;; > esac > #remove any leading whitespace or commas for te next iteration > sugs=`echo "$sugs" | $SED 's/^[, ]*//'` > > suggests="$suggests $sugsname" > suggestsall="$suggestsall $sugsname $sugsver " > done > # ensure a version number > if test "x$version" = "x"; then version="0.0"; fi > echo "writing $fname" > echo " for $name $version $maintainer" > echo " requires $requires" > echo " suggests $suggestsall" > AC_MACRO_DIR="." > test ! -d m4 || AC_MACRO_DIR=m4 > cat > "$fname" <<EOF ># dependencies.m4 generated by dunecontrol > >m4_define([DUNE_AC_INIT],[ > AC_INIT([$name], [$version], [$maintainer]) > AM_INIT_AUTOMAKE([foreign 1.9 tar-pax]) > m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([no])]) > AC_SUBST([DUNE_MOD_VERSION], [$version]) > AC_SUBST([DUNE_MOD_NAME], [$name]) > AC_SUBST([DUNE_MAINTAINER_NAME], ["$maintainer"]) > DUNE_PARSE_MODULE_VERSION([$name], [$version]) > REQUIRES="$requires" > AC_SUBST(REQUIRES, [$REQUIRES]) > AC_CONFIG_MACRO_DIR([$AC_MACRO_DIR]) >]) > >AC_DEFUN([DUNE_CHECK_MOD_DEPENDENCIES], [ >EOF > ### initialize AM_CONDITIONAL for suggestions that were not found > for name in $suggests; do > mod=$(fix_variable_name $name) > MOD=`echo $mod | tr [:lower:] [:upper:]` > if test "x$(eval echo \$HAVE_$mod)" = "x"; then > cat >> "$fname" <<EOF > ### add a conditional check for $name, > # just in case the module is not available at autogen time > AM_CONDITIONAL([HAVE_${MOD}], false) >EOF > fi > done > ### ANALYSE MODULE > sort_modules $mainmod > ### DEPENDENCIES > for mod in $SORTEDMODULES_DEPS; do > name=`eval echo \\$NAME_$mod` > MOD=`echo $mod | tr [:lower:] [:upper:]` > cat >> "$fname" <<EOF > ### check dependency $name > # invoke checks required by this module > AC_REQUIRE([${MOD}_CHECKS]) > # invoke check for this module > AC_REQUIRE([${MOD}_CHECK_MODULE]) > if test x\$with_$mod = xno; then > AC_MSG_ERROR([could not find required module _dune_name]) > fi >EOF > done > ### > for mod in $SORTEDMODULES_SUGS; do > name=`eval echo \\$NAME_$mod` > MOD=`echo $mod | tr [:lower:] [:upper:]` > cat >> "$fname" <<EOF > ### check suggestion $name > # invoke checks required by this module > AC_REQUIRE([${MOD}_CHECKS]) > # invoke check for this module > AC_REQUIRE([${MOD}_CHECK_MODULE]) > if test x\$with_$mod = xno; then > AC_MSG_WARN([could not find suggested module _dune_name]) > fi >EOF > done > ### > # only test for the module if we really define our own checks > if test -d m4; then > mod=$mainmod > name=`eval echo \\$NAME_$mod` > MOD=`echo $mod | tr [:lower:] [:upper:]` > cat >> "$fname" <<EOF > ### invoke checks for $name > AC_REQUIRE([${MOD}_CHECKS]) >EOF > fi > cat >> "$fname" <<EOF >]) >EOF > ;; > unexport) > echo export DUNE_CONTROL_PATH="" > ;; > help) > usage > ;; > *) > set +e > if test "x$USE_CMAKE" = "xno"; then > echo "$PREFIX_DIR" |$GREP "[ ]" >/dev/null > if test "$?" -eq "0"; then > echo "ERROR: The prefix directory path ($PREFIX_DIR) contains >spaces. This is not" > echo " supported when using autotools." > echo " Either rename the path or activate CMake with >--use-cmake switch." > exit 1 > fi > fi > set -e > if test "$1" = "update"; then export SKIPVERSIONCHECK=yes; fi > check_commands "$@" > create_module_list > NAMES="" > BUILDMODULES="" > for mod in $MODULES; do > if test "$(eval echo \$INST_$mod)" != "yes"; then > NAMES="$NAMES$(eval echo \$NAME_$mod) " > BUILDMODULES="$BUILDMODULES$mod " > fi > done > echo "--- going to build $NAMES ---" > if test -n "$RESUME_FILE"; then > # write all modules to the resume file > for mod in $MODULES ; do > echo "$mod" > done > "$RESUME_FILE" > fi > > for mod in $BUILDMODULES; do > build_module "$mod" "$@" > > if test -n "$RESUME_FILE"; then > # remove the current module from the resume file > modules_togo=`cat "$RESUME_FILE"` > for mod_togo in $modules_togo ; do > if test "$mod_togo" != "$mod" ; then > echo "$mod_togo" > fi > done > "$RESUME_FILE" > fi > done > echo "--- done ---" > ;; >esac >+ case "$command" in >+ set +e >+ test x = xno >+ set -e >+ test autogen = update >+ check_commands autogen : configure >+ test 3 -gt 0 >+ command=autogen >+ shift >+ test 2 -gt 0 >+ test : '!=' : >+ test : = : >+ shift >+ is_command autogen >echo $COMMANDS | $SED -e 's/ / | /g' >++ echo printdeps vcsetup update autogen configure make all exec bexec >status svn git >++ sed -e 's/ / | /g' >+ eval ' >case "$1" in > printdeps' '|' vcsetup '|' update '|' autogen '|' configure '|' make '|' >all '|' exec '|' bexec '|' status '|' svn '|' 'git) > return 0 > ;; > *) > return 1 > ;; >esac' > >case "$1" in > printdeps | vcsetup | update | autogen | configure | make | all | exec | >bexec | status | svn | git) > return 0 > ;; > *) > return 1 > ;; >esac >++ case "$1" in >++ return 0 >+ test 1 -gt 0 >+ command=configure >+ shift >+ test 0 -gt 0 >+ test '' = : >+ is_command configure >echo $COMMANDS | $SED -e 's/ / | /g' >++ echo printdeps vcsetup update autogen configure make all exec bexec >status svn git >++ sed -e 's/ / | /g' >+ eval ' >case "$1" in > printdeps' '|' vcsetup '|' update '|' autogen '|' configure '|' make '|' >all '|' exec '|' bexec '|' status '|' svn '|' 'git) > return 0 > ;; > *) > return 1 > ;; >esac' > >case "$1" in > printdeps | vcsetup | update | autogen | configure | make | all | exec | >bexec | status | svn | git) > return 0 > ;; > *) > return 1 > ;; >esac >++ case "$1" in >++ return 0 >+ test 0 -gt 0 >+ create_module_list >+ test -z '' >+ test -n '' >+ test no = yes >+ find_modules_in_path >+ setup_control_path >+ test -z '' >+ DUNE_CONTROL_PATH=. >+ pkg-config dune-common >pkg-config dune-common --variable=prefix)/lib/dunecontrol >pkg-config dune-common --variable=prefix >++ pkg-config dune-common --variable=prefix >+ DUNE_CONTROL_PATH=.:/usr/local/lib/dunecontrol >+ test -n '' >+ local TMP= >echo $DUNE_CONTROL_PATH | sed -e 's/:\+/:/g' | tr ':' '\n') >echo $DUNE_CONTROL_PATH | sed -e 's/:\+/:/g' | tr ':' '\n' >++ echo .:/usr/local/lib/dunecontrol >++ sed -e 's/:\+/:/g' >++ tr : '\n' >+ read dir >canonicalname "$dir")" >canonicalname "$dir") >canonicalname "$dir" >++ canonicalname . >++ test 1 -ne 1 >eval echo $1 >+++ eval echo . >echo . >++++ echo . >++ file=. >++ test '!' -e . >++ test -L . >++ test -f . >++ test -d . >++ cd . >++ pwd >+ TMP=:/usr/local/dune >+ read dir >canonicalname "$dir")" >canonicalname "$dir") >canonicalname "$dir" >++ canonicalname /usr/local/lib/dunecontrol >++ test 1 -ne 1 >eval echo $1 >+++ eval echo /usr/local/lib/dunecontrol >echo /usr/local/lib/dunecontrol >++++ echo /usr/local/lib/dunecontrol >++ file=/usr/local/lib/dunecontrol >++ test '!' -e /usr/local/lib/dunecontrol >++ echo /usr/local/lib/dunecontrol: file not found >/usr/local/lib/dunecontrol: file not found >++ return 1 >+ TMP=:/usr/local/dune: >onfailure >+ onfailure >basename "$0") terminated due to errors!" >basename "$0") terminated due to errors! >basename "$0" >++ basename ./dune-common-2.3.1/bin/dunecontrol >+ echo 'Execution of dunecontrol terminated due to errors!' >Execution of dunecontrol terminated due to errors! >+ exit 1 > >Thanks >Best _______________________________________________________________ Bernd Flemisch phone: +49 711 685 69162 IWS, Universitaet Stuttgart fax: +49 711 685 67020 Pfaffenwaldring 61 email: [email protected] D-70569 Stuttgart url: www.hydrosys.uni-stuttgart.de _______________________________________________________________ _______________________________________________ Dumux mailing list [email protected] https://listserv.uni-stuttgart.de/mailman/listinfo/dumux
