From e249665f4f85c16731d25ab24b02a0b5f9061097 Mon Sep 17 00:00:00 2001
From: Markus Blatt <mblatt@dune-project.org>
Date: Wed, 13 Feb 2013 10:26:39 +0000
Subject: [PATCH] Make autotools the default build system.

One can select CMake using the --use-cmake switch. This prepares
the merge to the trunk.


[[Imported from SVN: r7117]]
---
 bin/dunecontrol | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/bin/dunecontrol b/bin/dunecontrol
index 85a0bd7cd..673dded90 100755
--- a/bin/dunecontrol
+++ b/bin/dunecontrol
@@ -166,9 +166,9 @@ load_opts() {
   BUILDDIR=$DUNE_BUILDDIR
   if test "x$DUNE_OPTS_FILE" != "x"; then
     # use build dir from opts file if set
-    OPS_FILE_BUILDDIR="$(eval BUILDDIR=""; . $DUNE_OPTS_FILE; eval echo \$BUILDDIR)"
-    if test -n "$OPS_FILE_BUILDDIR"; then
-      BUILDDIR="$OPS_FILE_BUILDDIR"
+    OPTS_FILE_BUILDDIR="$(eval BUILDDIR=""; . $DUNE_OPTS_FILE; eval echo \$BUILDDIR)"
+    if test -n "$OPTS_FILE_BUILDDIR"; then
+      BUILDDIR="$OPTS_FILE_BUILDDIR"
     fi
     CMAKE_FLAGS="$(. $DUNE_OPTS_FILE; eval echo \$CMAKE_FLAGS)"
     CMD_FLAGS_FROM_FILE="$(eval ${COMMAND}_FLAGS=""; . $DUNE_OPTS_FILE; eval echo \$${COMMAND}_FLAGS)"
@@ -350,7 +350,6 @@ run_default_update () {
 }
 
 run_default_autogen () {
-  echo "autogen USE_CMAKE=$USE_CMAKE"
   if test "x$USE_CMAKE" != "xyes" || test  ! -e $(eval "echo \$PATH_$module")/CMakeLists.txt ; then
     PARAMS="$CMD_FLAGS"
     local M4_PATH=""
@@ -500,7 +499,7 @@ usage () {
     echo "OPTIONS:"
     echo "  -h, --help          show this help"
     echo "      --debug         enable debug output of this script"
-    echo "      --use-autotools use autotools instead of cmake for building"
+    echo "      --use-cmake     use cmake instead autotools of cmake 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"
@@ -592,7 +591,7 @@ export ONLY=""
 export RESUME_FLAG=no
 export REVERSE_FLAG=no
 export SKIPFIRST=no
-export USE_CMAKE=yes
+export USE_CMAKE=no
 
 # parse commandline parameters
 while test $# -gt 0; do
@@ -701,8 +700,8 @@ while test $# -gt 0; do
     --skipfirst)
       export SKIPFIRST=yes
     ;;
-    --use-autotools)
-      export USE_CMAKE=no
+    --use-cmake)
+      export USE_CMAKE=yes
     ;;
     --debug) true ;; # ignore this option, it is handled right at the beginning
     --*)
-- 
GitLab