+ set -v export COMMAND_DIR="`canonicalpath $0`" canonicalpath $0 ++ canonicalpath ./dune-common/bin/dunecontrol ++ test 1 -ne 1 canonicalname "$1" +++ canonicalname ./dune-common/bin/dunecontrol +++ test 1 -ne 1 eval echo $1 ++++ eval echo ./dune-common/bin/dunecontrol echo ./dune-common/bin/dunecontrol +++++ echo ./dune-common/bin/dunecontrol +++ file=./dune-common/bin/dunecontrol +++ test '!' -e ./dune-common/bin/dunecontrol +++ test -L ./dune-common/bin/dunecontrol +++ test -f ./dune-common/bin/dunecontrol dirname "$file" ++++ dirname ./dune-common/bin/dunecontrol +++ fdir=./dune-common/bin basename "$file" ++++ basename ./dune-common/bin/dunecontrol +++ fname=dunecontrol canonicalname "$fdir" ++++ canonicalname ./dune-common/bin ++++ test 1 -ne 1 eval echo $1 +++++ eval echo ./dune-common/bin echo ./dune-common/bin ++++++ echo ./dune-common/bin ++++ file=./dune-common/bin ++++ test '!' -e ./dune-common/bin ++++ test -L ./dune-common/bin ++++ test -f ./dune-common/bin ++++ test -d ./dune-common/bin ++++ cd ./dune-common/bin ++++ pwd +++ fdir=/export/home/navi/workspace/dune-common/bin +++ echo /export/home/navi/workspace/dune-common/bin/dunecontrol +++ test -d ./dune-common/bin/dunecontrol ++ dirname /export/home/navi/workspace/dune-common/bin/dunecontrol + export COMMAND_DIR=/export/home/navi/workspace/dune-common/bin + COMMAND_DIR=/export/home/navi/workspace/dune-common/bin # Read the modules find part . "$COMMAND_DIR/dunemodules.inc" + . /export/home/navi/workspace/dune-common/bin/dunemodules.inc # -*-sh-*- ############################################### ### ### Configuration ### # name of the "control" files CONTROL="dune.module" ++ CONTROL=dune.module # pattern needed to parse the Suggests and Depnds entries PARSE_SUGDEP_PATTERN='^ *\([^ ^:]\{1,\}\) *\(([^)]*)\)\{0,1\},\{0,1\} *\(.*\)$' ++ PARSE_SUGDEP_PATTERN='^ *\([^ ^:]\{1,\}\) *\(([^)]*)\)\{0,1\},\{0,1\} *\(.*\)$' ############################################### ### ### check for environment variables ### if test -z $DUNE_CONTROL_PATH; then DUNE_CONTROL_PATH=. fi ++ test -z ++ DUNE_CONTROL_PATH=. if test -z $GREP; then GREP=grep fi ++ test -z ++ GREP=grep # # read paramters from a $CONTROL file # # paramters: # $1 file to read # parse_control() { # check file existence if ! test -f "$1"; then echo "ERROR: could not read file $1" >&2 exit 1 fi # read parameters from control file local name="$(echo $($GREP Module: "$1" | cut -d ':' -f2))" if test "x$name" = "x"; then echo "ERROR: $CONTROL files $1 does not contain a Module entry" >&2 exit 1 fi # create and check variable name from module name export module_inst="" export module=$(fix_variable_name $name) # read dune.module file local deps="$(echo $($GREP ^[[:space:]]*Depends: "$1" | cut -d ':' -f2))" local sugs="$(echo $($GREP ^[[:space:]]*Suggests: "$1" | cut -d ':' -f2))" local vers="$(echo $($GREP ^[[:space:]]*Version: "$1" | cut -d ':' -f2))" local main="$(echo $($GREP ^[[:space:]]*Maintainer: "$1" | cut -d ':' -f2))" # guess the path of the dune module: # - 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/../../../lib/dunecontrol/${name}/dune.module; then path=$(canonicalname "$path/../../../") export module_inst="true" export INST_${module}=yes else export INST_${module}=no fi if ! check_modname "$module"; then echo "ERROR: $CONTROL files $1 contains an invalid Module entry" >&2 exit 1 fi # avoid multiple definition of the same module if test "x$(eval echo \$HAVE_$module)" != "x"; then echo "ERROR: multiple definition of module $name" >&2 echo "previous defined in:" >&2 echo " $(eval echo \$PATH_$module)/$CONTROL" >&2 echo "redefined in:" >&2 echo " $path/$CONTROL" >&2 exit 1 fi # set status variables export HAVE_${module}=yes export PATH_${module}="$path" export VERS_${module}="$vers" export NAME_${module}="$name" export MAIN_${module}="$main" export DEPS_${module}="$deps" for name in $deps; do mod=$(fix_variable_name $name) export NAME_${mod}="$name" done export SUGS_${module}="$sugs" for name in $sugs; do mod=$(fix_variable_name $name) export NAME_${mod}="$name" done } # # search for modules in each directory in DUNE_CONTROL_PATH # find_modules_in_path() { if test -z "$FOUND_MODULES"; then # foreach dir in $@ while read dir; do if test -d "$dir"; then while read m; do find_modules $m done <&2 false fi } # # sort $MODULES according to the dependencies # sort_modules() { # reset list export SORTEDMODULES="" # handle each modules passed as parameter for m in "$@"; do # did we find a module file for this mopdule? if test "x$(eval echo \$HAVE_$m)" != "x"; then _sort_module $m else echo "ERROR: could not find module $(eval echo \$NAME_$m)" >&2 exit 1 fi done # save result export MODULES="$SORTEDMODULES" # clean up temporary variables for m in $MODULES; do export SORT_DONE_${m}="" done } # # sort $MODULES's dependencies according to the dependencies # don't include $MODULE itself # sort_dependencies() { # reset list export SORTEDMODULES="" local deps="" local name="" local dep="" local ver="" local xdeps="" # handle each modules passed as parameter for m in "$@"; do # did we find a module file for this mopdule? if test "x$(eval echo \$HAVE_$m)" != "x"; then eval deps=\$DEPS_$m while test -n "$deps"; do PATTERN=$PARSE_SUGDEP_PATTERN name=`echo $deps | sed -e "s/$PATTERN/\1/"` xdeps=`echo $deps | sed -e "s/$PATTERN/\3/"` if test "$deps" = "$xdeps"; then eval echo ERROR: parsing dependency string \$DEPS_$m >&2 exit 1 fi deps=$xdeps dep=`fix_variable_name $name` _sort_module $dep done else eval echo ERROR: could not find module \$NAME_$m >&2 exit 1 fi done # save result export MODULES="$SORTEDMODULES" # clean up temporary variables for m in $MODULES; do export SORT_DONE_${m}="" done } # # sort $MODULES's dependencies according to the dependencies # don't include $MODULE itself # sort_suggestions() { # get dependencies sort_dependencies $@ export DEPENDENCIES="$SORTEDMODULES" # reset list export SORTEDMODULES="" # handle each modules passed as parameter for m in "$@"; do # did we find a module file for this mopdule? if test "x$(eval echo \$HAVE_$m)" != "x"; then if test "x$(eval echo \$SUGS_$m)" != "x" ; then for name in $(eval echo \$SUGS_$m); do dep=$(fix_variable_name $name) if test "x$(eval echo \$HAVE_$dep)" != "x"; then _sort_module $dep fi done fi else echo "ERROR: could not find module $(eval echo \$NAME_$m)" >&2 exit 1 fi done # save result local FOUND=no export MODULES="" for m in $SORTEDMODULES; do FOUND=no for d in $DEPENDENCIES; do if test "x$m" = "x$d"; then FOUND=yes fi done if test "x$FOUND" = "xno"; then export MODULES="$MODULES $m" fi done # clean up temporary variables for m in $MODULES; do export SORT_DONE_${m}="" done } # # recursive part of sort_modules # evaluate dependencies of one module # # paramters: # $1 name of the modules # _sort_module() { local module="$1" local modname="" eval modname=\$NAME_$module local deps="" local name="" local dep="" local ver="" local depver="" local xdeps="" shift 1 if ! check_modname $module; then echo "ERROR: invalid module name $module" >&2 exit 1 fi if test "x$(eval echo \$SORT_DONE_${module})" != "xyes"; then # resolve dependencies eval deps=\$DEPS_$module while test -n "$deps"; do PATTERN=$PARSE_SUGDEP_PATTERN name=`echo $deps | sed -e "s/$PATTERN/\1/"` depver=`echo $deps | sed -e "s/$PATTERN/\2/" -e 's/[()]//g'` xdeps=`echo $deps | sed -e "s/$PATTERN/\3/"` if test "$deps" = "$xdeps"; then echo "ERROR: parsing dependencies for $modname" >&2 exit 1 fi deps="$xdeps" dep=$(fix_variable_name $name) if ! check_modname $dep; then echo "ERROR: invalid module name $name" >&2 exit 1 fi if test "x$(eval echo \$HAVE_$dep)" != "x"; then eval ver=\$VERS_$dep if ! check_version "$ver" "$depver"; then echo "ERROR: version mismatch." >&2 echo " $modname requires $name $depver," >&2 echo " but only $name = $ver available." >&2 exit 1 fi _sort_module $dep else # perhaps this module is installed, # then it should be handled via pkg-config if ! pkg-config $name; then echo "ERROR: could not find module $name," >&2 echo " module is also unknown to pkg-config." >&2 echo " Maybe you need to adjust PKG_CONFIG_PATH!" >&2 echo " $name is required by $modname" >&2 exit 1 fi fi done # resolve suggestions for name in $(eval "echo \$SUGS_$module"); do dep=$(fix_variable_name $name) if ! check_modname $dep; then echo "ERROR: invalid module name $name" >&2 exit 1 fi if test "x$(eval echo \$HAVE_$dep)" != "x"; then _sort_module $dep fi done # insert this module into the list export SORT_DONE_${module}=yes export SORTEDMODULES="$SORTEDMODULES $module" fi } # # load the $CONTROL file, skip all control variables # and run a command # # parameters: # $1 command to execute # $2 full path of the $CONTROL file # eval_control() { local command="$1" local file="$2" shift 2 if test -f "$file"; then # open subshell ( set -e # load functions defined in $file # if $command is not defined in $file, # then the default implementation will be executed eval "$($GREP -v '^[[:alnum:]]\+:' $file)" # execute $command $command ) || false else echo "ERROR: could not find $file" >&2 exit 1 fi } # # fix a value such that it is suitable for a variable name and assign it # # parameters: # $1 name of variable # $2 value # fix_variable_name() { # The replacement sequence has to be extended explicitly to the length of # the matching set for SunOS compatibility echo -n "$@" | tr '[:punct:]' '[_*]' } fix_and_assign() { local name="$1" if ! check_modname $name; then echo "ERROR: error in assignment. $name is not a valid variabel name." >&2 fi shift 1 export $name=$(fix_variable_name $@) } # # make sure the module name fits the naming convention # # parameters: # $1 module name # check_modname() { if sh -c "$ID=huhu" > /dev/null 2>&1; then return 1 fi # if ! echo "$1" | $GREP -q '^[a-zA-Z0-9_]\+$'; then # return 1 # fi return 0 } # # compare a sub part of the version string # # parameters: # $1 version # $2 part # # parts: # 1: major # 2: minor # 3: revision # get_sub_version() { echo $1 | awk -F. -v FIELD=$2 '{ print int($FIELD) }' } # # compare to versions # # parameters: # $1 version1 # $2 version1 # # return: # 0: equal # 1: v1 > v2 # 2: v1 < v2 # compare_versions() { local v1="$1" local v2="$2" local result for i in 1 2 3; do result=0 compare_sub_version $v1 $v2 $i || return 0 done echo "eq" } compare_sub_version() { # compare sub version number local sub1=`get_sub_version $1 $3` local sub2=`get_sub_version $2 $3` if test $sub1 -gt $sub2; then echo "gt" return 1 fi if test $sub1 -lt $sub2; then echo "lt" return 1 fi return 0 } check_version() { if test -z "$2"; then # if no constraint is given, check_version is true return 0 fi local v=$1 local PATTERN="^ *\([<>=]*\) *\([0-9.]*\)\(.*\)$" if test x != `echo "$2" | sed -e "s/$PATTERN/x/"`; then echo "ERROR: invalid version constraint $2" >&2 exit 1 fi local op=`echo "$2" | sed -e "s/$PATTERN/\1/"` local v2=`echo "$2" | sed -e "s/$PATTERN/\2/"` local rest=`echo "$2" | sed -e "s/$PATTERN/\3/" -e 's/ //g'` local result=1 local rel=`compare_versions $v $v2` case $rel$op in "eq<="|"eq="|"eq>="|\ "gt>="|"gt>"|\ "lt<="|"lt<") result=0 ;; esac if test -z "$rest"; then return $result fi PATTERN="\([|&]\{2\}\)\(.*\)$" if test xx != x`echo "$rest" | sed -e "s/$PATTERN/x/"`; then echo "ERROR: invalid version constraint '$rest'" >&2 exit 1 fi op=`echo "$rest" | sed -e "s/$PATTERN/\1/"` v2=`echo "$rest" | sed -e "s/$PATTERN/\2/"` if eval "test $result -eq 0" $op "check_version \"$v\" \"$v2\""; then return 0 fi return 1 } # create PKG_CONFIG_PATH for installed dune modules export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:`canonicalpath $0`/../lib/pkgconfig" canonicalpath $0 ++ canonicalpath ./dune-common/bin/dunecontrol ++ test 1 -ne 1 canonicalname "$1" +++ canonicalname ./dune-common/bin/dunecontrol +++ test 1 -ne 1 eval echo $1 ++++ eval echo ./dune-common/bin/dunecontrol echo ./dune-common/bin/dunecontrol +++++ echo ./dune-common/bin/dunecontrol +++ file=./dune-common/bin/dunecontrol +++ test '!' -e ./dune-common/bin/dunecontrol +++ test -L ./dune-common/bin/dunecontrol +++ test -f ./dune-common/bin/dunecontrol dirname "$file" ++++ dirname ./dune-common/bin/dunecontrol +++ fdir=./dune-common/bin basename "$file" ++++ basename ./dune-common/bin/dunecontrol +++ fname=dunecontrol canonicalname "$fdir" ++++ canonicalname ./dune-common/bin ++++ test 1 -ne 1 eval echo $1 +++++ eval echo ./dune-common/bin echo ./dune-common/bin ++++++ echo ./dune-common/bin ++++ file=./dune-common/bin ++++ test '!' -e ./dune-common/bin ++++ test -L ./dune-common/bin ++++ test -f ./dune-common/bin ++++ test -d ./dune-common/bin ++++ cd ./dune-common/bin ++++ pwd +++ fdir=/export/home/navi/workspace/dune-common/bin +++ echo /export/home/navi/workspace/dune-common/bin/dunecontrol +++ test -d ./dune-common/bin/dunecontrol ++ dirname /export/home/navi/workspace/dune-common/bin/dunecontrol + export PKG_CONFIG_PATH=:/export/home/navi/workspace/dune-common/bin/../lib/pkgconfig + PKG_CONFIG_PATH=:/export/home/navi/workspace/dune-common/bin/../lib/pkgconfig ############################################### # # for each module load the $CONTROL script part and run $command # # parameters: # $1 command to execute # build_modules() { local command="$1" shift local runcommand=run_$command modules="$@" for module in $modules; do local path=$(eval "echo \$PATH_${module}") eval echo "--- calling $command for \$NAME_${module} ---" if ! ( set -e cd "$path" export module eval_control $runcommand $path/$CONTROL ); then eval echo "--- Failed to build \$NAME_${module} ---"; exit 1; fi eval echo "--- \$NAME_${module} done ---" done } # # load command options from an opts file # the name of the opts file is stored in the global variable $DUNE_OPTS_FILE # # parameters: # $1 command # load_opts() { local command=$1 local COMMAND=$(echo $command | tr '[:lower:]' '[:upper:]') CMD_FLAGS="$(eval echo \$${COMMAND}_FLAGS)" local CMD_FLAGS_FROM_FILE="" if test "x$DUNE_OPTS_FILE" != "x"; then CMD_FLAGS_FROM_FILE="$(eval ${COMMAND}_FLAGS=""; . $DUNE_OPTS_FILE; eval echo \$${COMMAND}_FLAGS)" fi if test -n "$CMD_FLAGS_FROM_FILE"; then echo "----- using default flags \$${COMMAND}_FLAGS from $DUNE_OPTS_FILE -----" CMD_FLAGS=$CMD_FLAGS_FROM_FILE elif test -n "$CMD_FLAGS"; then echo "----- using default flags \$${COMMAND}_FLAGS from environment -----" fi } ############################################### ### ### Commands ### # check wheteher the parameter is valid command or not is_command() { eval ' case "$1" in '`echo $COMMANDS | sed -e 's/ / | /g'`') return 0 ;; *) return 1 ;; esac' } # list of all dunecontrol commands COMMANDS="update autogen configure make all exec status svn" + COMMANDS='update autogen configure make all exec status svn' # help string for the commands update_HELP="updated all modules from the repository" + update_HELP='updated all modules from the repository' autogen_HELP="run the autogen.sh script for each module" + autogen_HELP='run the autogen.sh script for each module' configure_HELP="run configure 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" + make_HELP='run make for each module' all_HELP="\trun 'autogen', 'configure' and 'make' command 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" + exec_HELP='execute an arbitrary command in each module directory' status_HELP="show vc status for all modules" + status_HELP='show vc status for all modules' svn_HELP="\trun svn command for each svn managed module" + svn_HELP='\trun svn command for each svn managed module' # # setup command proxies # call will be forwarded to run_default_$command # for command in $COMMANDS; do eval "run_$command () { run_default_$command; }" done + for command in '$COMMANDS' + eval 'run_update () { run_default_update; }' run_update () { run_default_update; } + for command in '$COMMANDS' + eval 'run_autogen () { run_default_autogen; }' run_autogen () { run_default_autogen; } + for command in '$COMMANDS' + eval 'run_configure () { run_default_configure; }' run_configure () { run_default_configure; } + for command in '$COMMANDS' + eval 'run_make () { run_default_make; }' run_make () { run_default_make; } + for command in '$COMMANDS' + eval 'run_all () { run_default_all; }' run_all () { run_default_all; } + for command in '$COMMANDS' + eval 'run_exec () { run_default_exec; }' run_exec () { run_default_exec; } + for command in '$COMMANDS' + eval 'run_status () { run_default_status; }' run_status () { run_default_status; } + for command in '$COMMANDS' + eval 'run_svn () { run_default_svn; }' run_svn () { run_default_svn; } # # default implementations for commands... # these can be overwritten in the $CONTROL files # run_default_exec () { bash -c "eval $CMD_FLAGS"; } run_default_status () { local verbose=0 local update="" for i in $CMD_FLAGS; do if eval test "x$i" = "x-v"; then verbose=1; fi if eval test "x$i" = "x-vv"; then verbose=2; fi if eval test "x$i" = "x-u"; then update="-u"; fi done # is out output connected to a tty? if test -t 1; then blue="\e[1m\e[34m" green="\e[1m\e[32m" red="\e[1m\e[31m" reset="\e[0m\e[0m" fi if test $verbose -eq 1; then svn status $update | grep -E "^M|^A|^D|^C|^U" elif test $verbose -eq 2; then svn status $update fi name="$(eval echo \$NAME_$module)" changed=$(svn status | grep -E "^M|^A|^D" | wc -l) collisions=$(svn status | grep -E "^C"| wc -l) pending=$(svn status $update | grep -E "^...... \* " | wc -l) color=$green text="no changes" if [ $changed -eq 0 ]; then true elif [ $changed -eq 1 ]; then color=$blue; text="1 change" else color=$blue; text="$changed changes" fi if [ $pending -eq 0 ]; then true elif [ $pending -eq 1 ]; then color=$blue; text="$text, 1 update pending" else color=$blue; text="$text, $pending updates pending" fi if [ $collisions -eq 0 ]; then true elif [ $collisions -eq 1 ]; then color=$red text="$text, 1 collision" else color=$red text="$text, $count collisions" fi echo -e "$color[$text]$reset $name" } run_default_update () { if test -d .git/svn && type git > /dev/null && test x`git config --get dune.autoupdate` = xtrue; then git checkout master git svn rebase echo '*.o *.lo *.la #*# .*.rej *.rej .*~ *~ .#* .DS_Store' | tr ' ' '\n' \ > .git/info/exclude git svn show-ignore >> .git/info/exclude return fi if test -d .svn; then svn update return fi if test -d CVS; then cvs update -dP return fi echo "WARNING: $module is not under a known version control system." echo " We support svn and cvs." } run_default_autogen () { 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 for m in $FOUND_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 "$COMMAND_DIR/dune-autogen" "$MODULE_PATHS" "$PARAMS" || exit 1 else echo Skipping dune-autogen fi } run_default_configure () { PARAMS="$CMD_FLAGS" if test -x configure; then ACLOCAL_FLAGS="-I ." for m in $FOUND_MODULES; do path=$(eval "echo \$PATH_$m") name=$(eval "echo \$NAME_$m") if test -d "$path/m4"; then ACLOCAL_FLAGS="$ACLOCAL_FLAGS -I $path/m4" fi if test -d "$path/share/aclocal"; then ACLOCAL_FLAGS="$ACLOCAL_FLAGS -I $path/share/aclocal" fi PARAMS="$PARAMS \"--with-$name=$path\"" done PARAMS="$PARAMS ACLOCAL_AMFLAGS=\"$ACLOCAL_FLAGS\"" echo ./configure "$PARAMS" eval ./configure "$PARAMS" || exit 1 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 () { PARAMS="$CMD_FLAGS" echo make "$PARAMS" eval $MAKE "$PARAMS" } run_default_all () { for cmd in 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 } ############################################### ### ### 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 " --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 in whichs source tree we are standing" echo " --opts=FILE load default options from FILE" echo " (see dune-common/doc/example.opts)" echo " --[COMMAND]-opts=opts set options for COMMAND" echo " (this is mainly useful for the all COMMAND)" echo "COMMANDS:" echo " Colon seperated list of commands. Availabel commands are:" printf " \`help'\tguess what :-)\n" printf " \`print'\tprint the list of modules sorted after their dependencies\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() { find_modules_in_path if test "x$SEARCH_MODULES" != "x"; then sort_modules $SEARCH_MODULES else sort_modules $MODULES fi if test "x$ONLY" != x; then export MODULES="$ONLY" 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)" } if test "x$1" = "x"; then usage exit 1 fi + test x--opts=build.opts = x trap onfailure EXIT + trap onfailure EXIT # clear command opts #for i in $COMMANDS; do # COMMAND=$(echo $i | tr '[:lower:]' '[:upper:]') # export ${COMMAND}_FLAGS="" #done # clear variables export SEARCH_MODULES="" + export SEARCH_MODULES= + SEARCH_MODULES= export MODULES="" + export MODULES= + MODULES= export ONLY="" + export ONLY= + ONLY= # parse commandline parameters while test $# -gt 0; do # get option 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 ;; --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" export HAVE_${module}= ;; --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 3 -gt 0 + option=--opts=build.opts + set +e expr "x$option" : 'x[^=]*=\(.*\)' ++ expr x--opts=build.opts : 'x[^=]*=\(.*\)' + arg=build.opts + set -e + case "$option" in + test xbuild.opts = x canonicalname $arg ++ canonicalname build.opts ++ test 1 -ne 1 eval echo $1 +++ eval echo build.opts echo build.opts ++++ echo build.opts ++ file=build.opts ++ test '!' -e build.opts ++ test -L build.opts ++ test -f build.opts dirname "$file" +++ dirname build.opts ++ fdir=. basename "$file" +++ basename build.opts ++ fname=build.opts canonicalname "$fdir" +++ canonicalname . +++ test 1 -ne 1 eval echo $1 ++++ eval echo . echo . +++++ echo . +++ file=. +++ test '!' -e . +++ test -L . +++ test -f . +++ test -d . +++ cd . +++ pwd ++ fdir=/export/home/navi/workspace ++ echo /export/home/navi/workspace/build.opts ++ test -d build.opts + DUNE_OPTS_FILE=/export/home/navi/workspace/build.opts + test -r /export/home/navi/workspace/build.opts + shift + test 2 -gt 0 + option=--debug + set +e expr "x$option" : 'x[^=]*=\(.*\)' ++ expr x--debug : 'x[^=]*=\(.*\)' + arg= + set -e + case "$option" in + true + shift + test 1 -gt 0 + option=all + set +e expr "x$option" : 'x[^=]*=\(.*\)' ++ expr xall : 'x[^=]*=\(.*\)' + arg= + set -e + case "$option" in + break while test $# -gt 0; do # get command command=$1 shift # get command options CMD_FLAGS= while test $# -gt 0 && test "$1" != ":"; do COMMAND=$(echo $command | tr '[:lower:]' '[:upper:]') # setup paramter list CMD_FLAGS="$CMD_FLAGS \"$1\"" shift done if test -z "$CMD_FLAGS"; then load_opts $command else # disable usage of opts file if test "x$DUNE_OPTS_FILE" != "x"; then echo "WARNING: commandline parameters will overwrite setting in opts file \"$DUNE_OPTS_FILE\"" fi fi # skip command delimiter if test "$1" = ":"; then shift; fi case "$command" in print) create_module_list eval "print_module_list ' ' $MODULES" echo >&2 ;; export) create_module_list DUNE_CONTROL_PATH="" for mod in $MODULES; do if test x != x$DUNE_CONTROL_PATH; then export DUNE_CONTROL_PATH="$DUNE_CONTROL_PATH:$(eval echo \$PATH_$mod/dune.module)" else export DUNE_CONTROL_PATH="$(eval echo \$PATH_$mod/dune.module)" fi done echo export DUNE_CONTROL_PATH=$DUNE_CONTROL_PATH ;; m4create) find_modules_in_path mainmod=`echo $SEARCH_MODULES` fname="dependencies.m4" name=`eval echo \\${NAME_$mainmod}` version=`eval echo \\${VERS_$mainmod}` maintainer=`eval echo \\${MAIN_$mainmod}` # get dependencies eval deps=\$DEPS_$module while test -n "$deps"; do PATTERN=$PARSE_SUGDEP_PATTERN depname=`echo $deps | sed -e "s/$PATTERN/\1/"` depver=`echo $deps | sed -e "s/$PATTERN/\2/" -e 's/[()]//g'` xdeps=`echo $deps | sed -e "s/$PATTERN/\3/"` if test "$deps" = "$xdeps"; then echo "ERROR: parsing dependencies for $modname" >&2 exit 1 fi requires="$requires $depname $depver " deps="$xdeps" 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" cat > $fname <> $fname <> $fname <> $fname <> $fname <&2 exit 1 fi ;; esac done + test 1 -gt 0 + command=all + shift + CMD_FLAGS= + test 0 -gt 0 + test -z '' + load_opts all + local command=all echo $command | tr '[:lower:]' '[:upper:]' ++ echo all ++ tr '[:lower:]' '[:upper:]' + local COMMAND=ALL eval echo \$${COMMAND}_FLAGS ++ eval echo '$ALL_FLAGS' echo $ALL_FLAGS +++ echo + CMD_FLAGS= + local CMD_FLAGS_FROM_FILE= + test x/export/home/navi/workspace/build.opts '!=' x eval ${COMMAND}_FLAGS=""; . $DUNE_OPTS_FILE; eval echo \$${COMMAND}_FLAGS ++ eval ALL_FLAGS= ALL_FLAGS= +++ ALL_FLAGS= ++ . /export/home/navi/workspace/build.opts CONFIGURE_FLAGS="--enable-systest --enable-unittest --enable-parallel --disable-documentation --disable-mpiruntest --with-boost-serialization=boost_serialization-gcc34-mt --with-boost-mpi=boost_mpi-gcc34-mt CXX=mpicxx" +++ CONFIGURE_FLAGS='--enable-systest --enable-unittest --enable-parallel --disable-documentation --disable-mpiruntest --with-boost-serialization=boost_serialization-gcc34-mt --with-boost-mpi=boost_mpi-gcc34-mt CXX=mpicxx' ++ eval echo '$ALL_FLAGS' echo $ALL_FLAGS +++ echo + CMD_FLAGS_FROM_FILE= + test -n '' + test -n '' + test '' = : + case "$command" in + is_command all echo $COMMANDS | sed -e 's/ / | /g' ++ sed -e 's/ / | /g' ++ echo update autogen configure make all exec status svn + eval ' case "$1" in update' '|' autogen '|' configure '|' make '|' all '|' exec '|' status '|' 'svn) return 0 ;; *) return 1 ;; esac' case "$1" in update | autogen | configure | make | all | exec | status | svn) return 0 ;; *) return 1 ;; esac ++ case "$1" in ++ return 0 + create_module_list + find_modules_in_path + test -z '' echo $DUNE_CONTROL_PATH | tr ':' '\n' ++ tr : '\n' ++ echo . + read dir + test -d . find "$dir" -name $CONTROL | $GREP -v 'dune-[-_a-zA-Z]/dune\-[-a-zA-Z_]*\-[0-9]\+.[0-9]\+/' ++ grep -v 'dune-[-_a-zA-Z]/dune\-[-a-zA-Z_]*\-[0-9]\+.[0-9]\+/' ++ find . -name dune.module + read m + find_modules ./dune-grid/dune.module + test -f ./dune-grid/dune.module basename $1 ++ basename ./dune-grid/dune.module + test dune.module = dune.module + export module= + module= + export module_inst= + module_inst= + parse_control ./dune-grid/dune.module + test -f ./dune-grid/dune.module echo $($GREP Module: "$1" | cut -d ':' -f2) $GREP Module: "$1" | cut -d ':' -f2 +++ cut -d : -f2 +++ grep Module: ./dune-grid/dune.module ++ echo dune-grid + local name=dune-grid + test xdune-grid = x + export module_inst= + module_inst= fix_variable_name $name ++ fix_variable_name dune-grid ++ tr '[:punct:]' '[_*]' ++ echo -n dune-grid + export module=dune_grid + module=dune_grid echo $($GREP ^[[:space:]]*Depends: "$1" | cut -d ':' -f2) $GREP ^[[:space:]]*Depends: "$1" | cut -d ':' -f2 +++ cut -d : -f2 +++ grep '^[[:space:]]*Depends:' ./dune-grid/dune.module ++ echo + local deps= echo $($GREP ^[[:space:]]*Suggests: "$1" | cut -d ':' -f2) $GREP ^[[:space:]]*Suggests: "$1" | cut -d ':' -f2 +++ cut -d : -f2 +++ grep '^[[:space:]]*Suggests:' ./dune-grid/dune.module ++ echo + local sugs= echo $($GREP ^[[:space:]]*Version: "$1" | cut -d ':' -f2) $GREP ^[[:space:]]*Version: "$1" | cut -d ':' -f2 +++ cut -d : -f2 +++ grep '^[[:space:]]*Version:' ./dune-grid/dune.module ++ echo + local vers= echo $($GREP ^[[:space:]]*Maintainer: "$1" | cut -d ':' -f2) $GREP ^[[:space:]]*Maintainer: "$1" | cut -d ':' -f2 +++ cut -d : -f2 +++ grep '^[[:space:]]*Maintainer:' ./dune-grid/dune.module ++ echo + local main= canonicalpath "$1" ++ canonicalpath ./dune-grid/dune.module ++ test 1 -ne 1 canonicalname "$1" +++ canonicalname ./dune-grid/dune.module +++ test 1 -ne 1 eval echo $1 ++++ eval echo ./dune-grid/dune.module echo ./dune-grid/dune.module +++++ echo ./dune-grid/dune.module +++ file=./dune-grid/dune.module +++ test '!' -e ./dune-grid/dune.module +++ test -L ./dune-grid/dune.module +++ test -f ./dune-grid/dune.module dirname "$file" ++++ dirname ./dune-grid/dune.module +++ fdir=./dune-grid basename "$file" ++++ basename ./dune-grid/dune.module +++ fname=dune.module canonicalname "$fdir" ++++ canonicalname ./dune-grid ++++ test 1 -ne 1 eval echo $1 +++++ eval echo ./dune-grid echo ./dune-grid ++++++ echo ./dune-grid ++++ file=./dune-grid ++++ test '!' -e ./dune-grid ++++ test -L ./dune-grid ++++ test -f ./dune-grid ++++ test -d ./dune-grid ++++ cd ./dune-grid ++++ pwd +++ fdir=/export/home/navi/workspace/dune-grid +++ echo /export/home/navi/workspace/dune-grid/dune.module +++ test -d ./dune-grid/dune.module ++ dirname /export/home/navi/workspace/dune-grid/dune.module + local path=/export/home/navi/workspace/dune-grid + test -f /export/home/navi/workspace/dune-grid/../../../lib/dunecontrol/dune-grid/dune.module + export INST_dune_grid=no + INST_dune_grid=no + check_modname dune_grid + sh -c =huhu + return 0 eval echo \$HAVE_$module ++ eval echo '$HAVE_dune_grid' echo $HAVE_dune_grid +++ echo + test x '!=' x + export HAVE_dune_grid=yes + HAVE_dune_grid=yes + export PATH_dune_grid=/export/home/navi/workspace/dune-grid + PATH_dune_grid=/export/home/navi/workspace/dune-grid + export VERS_dune_grid= + VERS_dune_grid= + export NAME_dune_grid=dune-grid + NAME_dune_grid=dune-grid + export MAIN_dune_grid= + MAIN_dune_grid= + export DEPS_dune_grid= + DEPS_dune_grid= + export SUGS_dune_grid= + SUGS_dune_grid= + test -n '' + export 'MODULES=dune_grid ' + MODULES='dune_grid ' + read m + find_modules ./dune-common/dune.module + test -f ./dune-common/dune.module basename $1 ++ basename ./dune-common/dune.module + test dune.module = dune.module + export module= + module= + export module_inst= + module_inst= + parse_control ./dune-common/dune.module + test -f ./dune-common/dune.module echo $($GREP Module: "$1" | cut -d ':' -f2) $GREP Module: "$1" | cut -d ':' -f2 +++ grep Module: ./dune-common/dune.module +++ cut -d : -f2 ++ echo dune-common + local name=dune-common + test xdune-common = x + export module_inst= + module_inst= fix_variable_name $name ++ fix_variable_name dune-common ++ echo -n dune-common ++ tr '[:punct:]' '[_*]' + export module=dune_common + module=dune_common echo $($GREP ^[[:space:]]*Depends: "$1" | cut -d ':' -f2) $GREP ^[[:space:]]*Depends: "$1" | cut -d ':' -f2 +++ grep '^[[:space:]]*Depends:' ./dune-common/dune.module +++ cut -d : -f2 ++ echo + local deps= echo $($GREP ^[[:space:]]*Suggests: "$1" | cut -d ':' -f2) $GREP ^[[:space:]]*Suggests: "$1" | cut -d ':' -f2 +++ cut -d : -f2 +++ grep '^[[:space:]]*Suggests:' ./dune-common/dune.module ++ echo + local sugs= echo $($GREP ^[[:space:]]*Version: "$1" | cut -d ':' -f2) $GREP ^[[:space:]]*Version: "$1" | cut -d ':' -f2 +++ cut -d : -f2 +++ grep '^[[:space:]]*Version:' ./dune-common/dune.module ++ echo + local vers= echo $($GREP ^[[:space:]]*Maintainer: "$1" | cut -d ':' -f2) $GREP ^[[:space:]]*Maintainer: "$1" | cut -d ':' -f2 +++ cut -d : -f2 +++ grep '^[[:space:]]*Maintainer:' ./dune-common/dune.module ++ echo + local main= canonicalpath "$1" ++ canonicalpath ./dune-common/dune.module ++ test 1 -ne 1 canonicalname "$1" +++ canonicalname ./dune-common/dune.module +++ test 1 -ne 1 eval echo $1 ++++ eval echo ./dune-common/dune.module echo ./dune-common/dune.module +++++ echo ./dune-common/dune.module +++ file=./dune-common/dune.module +++ test '!' -e ./dune-common/dune.module +++ test -L ./dune-common/dune.module +++ test -f ./dune-common/dune.module dirname "$file" ++++ dirname ./dune-common/dune.module +++ fdir=./dune-common basename "$file" ++++ basename ./dune-common/dune.module +++ fname=dune.module canonicalname "$fdir" ++++ canonicalname ./dune-common ++++ test 1 -ne 1 eval echo $1 +++++ eval echo ./dune-common echo ./dune-common ++++++ echo ./dune-common ++++ file=./dune-common ++++ test '!' -e ./dune-common ++++ test -L ./dune-common ++++ test -f ./dune-common ++++ test -d ./dune-common ++++ cd ./dune-common ++++ pwd +++ fdir=/export/home/navi/workspace/dune-common +++ echo /export/home/navi/workspace/dune-common/dune.module +++ test -d ./dune-common/dune.module ++ dirname /export/home/navi/workspace/dune-common/dune.module + local path=/export/home/navi/workspace/dune-common + test -f /export/home/navi/workspace/dune-common/../../../lib/dunecontrol/dune-common/dune.module + export INST_dune_common=no + INST_dune_common=no + check_modname dune_common + sh -c =huhu + return 0 eval echo \$HAVE_$module ++ eval echo '$HAVE_dune_common' echo $HAVE_dune_common +++ echo + test x '!=' x + export HAVE_dune_common=yes + HAVE_dune_common=yes + export PATH_dune_common=/export/home/navi/workspace/dune-common + PATH_dune_common=/export/home/navi/workspace/dune-common + export VERS_dune_common= + VERS_dune_common= + export NAME_dune_common=dune-common + NAME_dune_common=dune-common + export MAIN_dune_common= + MAIN_dune_common= + export DEPS_dune_common= + DEPS_dune_common= + export SUGS_dune_common= + SUGS_dune_common= + test -n '' + export 'MODULES=dune_grid dune_common ' + MODULES='dune_grid dune_common ' + read m + find_modules ./dune-pargm/dune.module + test -f ./dune-pargm/dune.module basename $1 ++ basename ./dune-pargm/dune.module + test dune.module = dune.module + export module= + module= + export module_inst= + module_inst= + parse_control ./dune-pargm/dune.module + test -f ./dune-pargm/dune.module echo $($GREP Module: "$1" | cut -d ':' -f2) $GREP Module: "$1" | cut -d ':' -f2 +++ cut -d : -f2 +++ grep Module: ./dune-pargm/dune.module ++ echo dune-pargm + local name=dune-pargm + test xdune-pargm = x + export module_inst= + module_inst= fix_variable_name $name ++ fix_variable_name dune-pargm ++ tr '[:punct:]' '[_*]' ++ echo -n dune-pargm + export module=dune_pargm + module=dune_pargm echo $($GREP ^[[:space:]]*Depends: "$1" | cut -d ':' -f2) $GREP ^[[:space:]]*Depends: "$1" | cut -d ':' -f2 +++ cut -d : -f2 +++ grep '^[[:space:]]*Depends:' ./dune-pargm/dune.module ++ echo + local deps= echo $($GREP ^[[:space:]]*Suggests: "$1" | cut -d ':' -f2) $GREP ^[[:space:]]*Suggests: "$1" | cut -d ':' -f2 +++ cut -d : -f2 +++ grep '^[[:space:]]*Suggests:' ./dune-pargm/dune.module ++ echo + local sugs= echo $($GREP ^[[:space:]]*Version: "$1" | cut -d ':' -f2) $GREP ^[[:space:]]*Version: "$1" | cut -d ':' -f2 +++ cut -d : -f2 +++ grep '^[[:space:]]*Version:' ./dune-pargm/dune.module ++ echo + local vers= echo $($GREP ^[[:space:]]*Maintainer: "$1" | cut -d ':' -f2) $GREP ^[[:space:]]*Maintainer: "$1" | cut -d ':' -f2 +++ cut -d : -f2 +++ grep '^[[:space:]]*Maintainer:' ./dune-pargm/dune.module ++ echo + local main= canonicalpath "$1" ++ canonicalpath ./dune-pargm/dune.module ++ test 1 -ne 1 canonicalname "$1" +++ canonicalname ./dune-pargm/dune.module +++ test 1 -ne 1 eval echo $1 ++++ eval echo ./dune-pargm/dune.module echo ./dune-pargm/dune.module +++++ echo ./dune-pargm/dune.module +++ file=./dune-pargm/dune.module +++ test '!' -e ./dune-pargm/dune.module +++ test -L ./dune-pargm/dune.module +++ test -f ./dune-pargm/dune.module dirname "$file" ++++ dirname ./dune-pargm/dune.module +++ fdir=./dune-pargm basename "$file" ++++ basename ./dune-pargm/dune.module +++ fname=dune.module canonicalname "$fdir" ++++ canonicalname ./dune-pargm ++++ test 1 -ne 1 eval echo $1 +++++ eval echo ./dune-pargm echo ./dune-pargm ++++++ echo ./dune-pargm ++++ file=./dune-pargm ++++ test '!' -e ./dune-pargm ++++ test -L ./dune-pargm ++++ test -f ./dune-pargm ++++ test -d ./dune-pargm ++++ cd ./dune-pargm ++++ pwd +++ fdir=/export/home/navi/workspace/dune-pargm +++ echo /export/home/navi/workspace/dune-pargm/dune.module +++ test -d ./dune-pargm/dune.module ++ dirname /export/home/navi/workspace/dune-pargm/dune.module + local path=/export/home/navi/workspace/dune-pargm + test -f /export/home/navi/workspace/dune-pargm/../../../lib/dunecontrol/dune-pargm/dune.module + export INST_dune_pargm=no + INST_dune_pargm=no + check_modname dune_pargm + sh -c =huhu + return 0 eval echo \$HAVE_$module ++ eval echo '$HAVE_dune_pargm' echo $HAVE_dune_pargm +++ echo + test x '!=' x + export HAVE_dune_pargm=yes + HAVE_dune_pargm=yes + export PATH_dune_pargm=/export/home/navi/workspace/dune-pargm + PATH_dune_pargm=/export/home/navi/workspace/dune-pargm + export VERS_dune_pargm= + VERS_dune_pargm= + export NAME_dune_pargm=dune-pargm + NAME_dune_pargm=dune-pargm + export MAIN_dune_pargm= + MAIN_dune_pargm= + export DEPS_dune_pargm= + DEPS_dune_pargm= + export SUGS_dune_pargm= + SUGS_dune_pargm= + test -n '' + export 'MODULES=dune_grid dune_common dune_pargm ' + MODULES='dune_grid dune_common dune_pargm ' + read m + read dir + export 'FOUND_MODULES=dune_grid dune_common dune_pargm ' + FOUND_MODULES='dune_grid dune_common dune_pargm ' + test x '!=' x + sort_modules dune_grid dune_common dune_pargm + export SORTEDMODULES= + SORTEDMODULES= + for m in '"$@"' eval echo \$HAVE_$m ++ eval echo '$HAVE_dune_grid' echo $HAVE_dune_grid +++ echo yes + test xyes '!=' x + _sort_module dune_grid + local module=dune_grid + local modname= + eval 'modname=$NAME_dune_grid' modname=$NAME_dune_grid ++ modname=dune-grid + local deps= + local name= + local dep= + local ver= + local depver= + local xdeps= + shift 1 + check_modname dune_grid + sh -c =huhu + return 0 eval echo \$SORT_DONE_${module} ++ eval echo '$SORT_DONE_dune_grid' echo $SORT_DONE_dune_grid +++ echo + test x '!=' xyes + eval 'deps=$DEPS_dune_grid' deps=$DEPS_dune_grid ++ deps= + test -n '' eval "echo \$SUGS_$module" ++ eval 'echo $SUGS_dune_grid' echo $SUGS_dune_grid +++ echo + export SORT_DONE_dune_grid=yes + SORT_DONE_dune_grid=yes + export 'SORTEDMODULES= dune_grid' + SORTEDMODULES=' dune_grid' + for m in '"$@"' eval echo \$HAVE_$m ++ eval echo '$HAVE_dune_common' echo $HAVE_dune_common +++ echo yes + test xyes '!=' x + _sort_module dune_common + local module=dune_common + local modname= + eval 'modname=$NAME_dune_common' modname=$NAME_dune_common ++ modname=dune-common + local deps= + local name= + local dep= + local ver= + local depver= + local xdeps= + shift 1 + check_modname dune_common + sh -c =huhu + return 0 eval echo \$SORT_DONE_${module} ++ eval echo '$SORT_DONE_dune_common' echo $SORT_DONE_dune_common +++ echo + test x '!=' xyes + eval 'deps=$DEPS_dune_common' deps=$DEPS_dune_common ++ deps= + test -n '' eval "echo \$SUGS_$module" ++ eval 'echo $SUGS_dune_common' echo $SUGS_dune_common +++ echo + export SORT_DONE_dune_common=yes + SORT_DONE_dune_common=yes + export 'SORTEDMODULES= dune_grid dune_common' + SORTEDMODULES=' dune_grid dune_common' + for m in '"$@"' eval echo \$HAVE_$m ++ eval echo '$HAVE_dune_pargm' echo $HAVE_dune_pargm +++ echo yes + test xyes '!=' x + _sort_module dune_pargm + local module=dune_pargm + local modname= + eval 'modname=$NAME_dune_pargm' modname=$NAME_dune_pargm ++ modname=dune-pargm + local deps= + local name= + local dep= + local ver= + local depver= + local xdeps= + shift 1 + check_modname dune_pargm + sh -c =huhu + return 0 eval echo \$SORT_DONE_${module} ++ eval echo '$SORT_DONE_dune_pargm' echo $SORT_DONE_dune_pargm +++ echo + test x '!=' xyes + eval 'deps=$DEPS_dune_pargm' deps=$DEPS_dune_pargm ++ deps= + test -n '' eval "echo \$SUGS_$module" ++ eval 'echo $SUGS_dune_pargm' echo $SUGS_dune_pargm +++ echo + export SORT_DONE_dune_pargm=yes + SORT_DONE_dune_pargm=yes + export 'SORTEDMODULES= dune_grid dune_common dune_pargm' + SORTEDMODULES=' dune_grid dune_common dune_pargm' + export 'MODULES= dune_grid dune_common dune_pargm' + MODULES=' dune_grid dune_common dune_pargm' + for m in '$MODULES' + export SORT_DONE_dune_grid= + SORT_DONE_dune_grid= + for m in '$MODULES' + export SORT_DONE_dune_common= + SORT_DONE_dune_common= + for m in '$MODULES' + export SORT_DONE_dune_pargm= + SORT_DONE_dune_pargm= + test x '!=' x + NAMES= + BUILDMODULES= + for mod in '$MODULES' eval echo \$INST_$mod ++ eval echo '$INST_dune_grid' echo $INST_dune_grid +++ echo no + test no '!=' yes eval echo \$NAME_$mod ++ eval echo '$NAME_dune_grid' echo $NAME_dune_grid +++ echo dune-grid + NAMES='dune-grid ' + BUILDMODULES='dune_grid ' + for mod in '$MODULES' eval echo \$INST_$mod ++ eval echo '$INST_dune_common' echo $INST_dune_common +++ echo no + test no '!=' yes eval echo \$NAME_$mod ++ eval echo '$NAME_dune_common' echo $NAME_dune_common +++ echo dune-common + NAMES='dune-grid dune-common ' + BUILDMODULES='dune_grid dune_common ' + for mod in '$MODULES' eval echo \$INST_$mod ++ eval echo '$INST_dune_pargm' echo $INST_dune_pargm +++ echo no + test no '!=' yes eval echo \$NAME_$mod ++ eval echo '$NAME_dune_pargm' echo $NAME_dune_pargm +++ echo dune-pargm + NAMES='dune-grid dune-common dune-pargm ' + BUILDMODULES='dune_grid dune_common dune_pargm ' + echo '--- going to build dune-grid dune-common dune-pargm ---' --- going to build dune-grid dune-common dune-pargm --- + build_modules all dune_grid dune_common dune_pargm + local command=all + shift + local runcommand=run_all + modules='dune_grid dune_common dune_pargm' + for module in '$modules' eval "echo \$PATH_${module}" ++ eval 'echo $PATH_dune_grid' echo $PATH_dune_grid +++ echo /export/home/navi/workspace/dune-grid + local path=/export/home/navi/workspace/dune-grid + eval echo '--- calling all for $NAME_dune_grid ---' echo --- calling all for $NAME_dune_grid --- ++ echo --- calling all for dune-grid --- --- calling all for dune-grid --- + set -e + cd /export/home/navi/workspace/dune-grid + export module + eval_control run_all /export/home/navi/workspace/dune-grid/dune.module + local command=run_all + local file=/export/home/navi/workspace/dune-grid/dune.module + shift 2 + test -f /export/home/navi/workspace/dune-grid/dune.module + set -e $GREP -v '^[[:alnum:]]\+:' $file ++ grep -v '^[[:alnum:]]\+:' /export/home/navi/workspace/dune-grid/dune.module + eval 'Module: dune-grid Version: 1.2svn Maintainer: dune@dune-project.org Depends: dune-common (>= 1.2) Suggests: UG Alberta Alu3d' Module: dune-grid ++ Module: dune-grid /export/home/navi/workspace/dune-common/bin/dunemodules.inc: line 352: Module:: command not found Version: 1.2svn ++ Version: 1.2svn /export/home/navi/workspace/dune-common/bin/dunemodules.inc: line 353: Version:: command not found Maintainer: dune@dune-project.org ++ Maintainer: dune@dune-project.org /export/home/navi/workspace/dune-common/bin/dunemodules.inc: line 354: Maintainer:: command not found Depends: dune-common (>= 1.2) /export/home/navi/workspace/dune-common/bin/dunemodules.inc: eval: line 355: syntax error near unexpected token `(' /export/home/navi/workspace/dune-common/bin/dunemodules.inc: eval: line 355: `Depends: dune-common (>= 1.2)' + run_all + run_default_all + for cmd in autogen configure make + eval echo '--- calling autogen for $NAME_dune_grid ---' echo --- calling autogen for $NAME_dune_grid --- ++ echo --- calling autogen for dune-grid --- --- calling autogen for dune-grid --- + load_opts autogen + local command=autogen echo $command | tr '[:lower:]' '[:upper:]' ++ tr '[:lower:]' '[:upper:]' ++ echo autogen + local COMMAND=AUTOGEN eval echo \$${COMMAND}_FLAGS ++ eval echo '$AUTOGEN_FLAGS' echo $AUTOGEN_FLAGS +++ echo + CMD_FLAGS= + local CMD_FLAGS_FROM_FILE= + test x/export/home/navi/workspace/build.opts '!=' x eval ${COMMAND}_FLAGS=""; . $DUNE_OPTS_FILE; eval echo \$${COMMAND}_FLAGS ++ eval AUTOGEN_FLAGS= AUTOGEN_FLAGS= +++ AUTOGEN_FLAGS= ++ . /export/home/navi/workspace/build.opts CONFIGURE_FLAGS="--enable-systest --enable-unittest --enable-parallel --disable-documentation --disable-mpiruntest --with-boost-serialization=boost_serialization-gcc34-mt --with-boost-mpi=boost_mpi-gcc34-mt CXX=mpicxx" +++ CONFIGURE_FLAGS='--enable-systest --enable-unittest --enable-parallel --disable-documentation --disable-mpiruntest --with-boost-serialization=boost_serialization-gcc34-mt --with-boost-mpi=boost_mpi-gcc34-mt CXX=mpicxx' ++ eval echo '$AUTOGEN_FLAGS' echo $AUTOGEN_FLAGS +++ echo + CMD_FLAGS_FROM_FILE= + test -n '' + test -n '' + run_autogen + run_default_autogen + PARAMS= + local M4_PATH= + test -f configure.ac + test -d .svn + for m in '$FOUND_MODULES' eval "echo \$PATH_$m" ++ eval 'echo $PATH_dune_grid' echo $PATH_dune_grid +++ echo /export/home/navi/workspace/dune-grid + path=/export/home/navi/workspace/dune-grid + MODULE_PATHS='/export/home/navi/workspace/dune-grid ' + for m in '$FOUND_MODULES' eval "echo \$PATH_$m" ++ eval 'echo $PATH_dune_common' echo $PATH_dune_common +++ echo /export/home/navi/workspace/dune-common + path=/export/home/navi/workspace/dune-common + MODULE_PATHS='/export/home/navi/workspace/dune-grid /export/home/navi/workspace/dune-common ' + for m in '$FOUND_MODULES' eval "echo \$PATH_$m" ++ eval 'echo $PATH_dune_pargm' echo $PATH_dune_pargm +++ echo /export/home/navi/workspace/dune-pargm + path=/export/home/navi/workspace/dune-pargm + MODULE_PATHS='/export/home/navi/workspace/dune-grid /export/home/navi/workspace/dune-common /export/home/navi/workspace/dune-pargm ' + test -f autogen.sh + eval /export/home/navi/workspace/dune-common/bin/dune-autogen '/export/home/navi/workspace/dune-grid /export/home/navi/workspace/dune-common /export/home/navi/workspace/dune-pargm ' '' /export/home/navi/workspace/dune-common/bin/dune-autogen /export/home/navi/workspace/dune-grid /export/home/navi/workspace/dune-common /export/home/navi/workspace/dune-pargm ++ /export/home/navi/workspace/dune-common/bin/dune-autogen /export/home/navi/workspace/dune-grid /export/home/navi/workspace/dune-common /export/home/navi/workspace/dune-pargm grep: illegal option -- q Usage: grep -hblcnsviw pattern file . . . Parser Error: Module entry missing in dune.module awk: syntax error near line 1 awk: illegal statement near line 1 + exit 1 + false + eval echo '--- Failed to build $NAME_dune_grid ---' echo --- Failed to build $NAME_dune_grid --- ++ echo --- Failed to build dune-grid --- --- Failed to build dune-grid --- + exit 1 onfailure + onfailure basename $0 ++ basename ./dune-common/bin/dunecontrol + echo 'Execution of dunecontrol terminated due to errors!' Execution of dunecontrol terminated due to errors! + exit 1