support nonstandard, unconfigured builds (e.g., "./configure debug" followed by ...
authorMorgan Deters <mdeters@gmail.com>
Thu, 17 Dec 2009 00:02:12 +0000 (00:02 +0000)
committerMorgan Deters <mdeters@gmail.com>
Thu, 17 Dec 2009 00:02:12 +0000 (00:02 +0000)
26 files changed:
Makefile.am
Makefile.in
Makefile.reconf_args [new file with mode: 0644]
config/build-type [new file with mode: 0755]
config/cvc4.m4
config/mkbuilddir [new file with mode: 0644]
configure
configure.ac
contrib/Makefile.in
doc/Makefile.in
src/Makefile.in
src/context/Makefile.in
src/expr/Makefile.in
src/main/Makefile.in
src/parser/Makefile.in
src/parser/cvc/Makefile.in
src/parser/smt/Makefile.in
src/prop/Makefile.in
src/prop/minisat/Makefile.in
src/smt/Makefile.in
src/theory/Makefile.in
src/theory/uf/Makefile.in
src/util/Makefile.in
test/Makefile.in
test/regress/Makefile.in
test/unit/Makefile.in

index 76130be4513530a6e05ed373147dab9c29e37c0b..07a91f21a496d31647c99f4ae983dfc1d902076c 100644 (file)
@@ -5,8 +5,15 @@ ACLOCAL_AMFLAGS = -I config
 
 SUBDIRS = src test doc contrib
 
+@mk_include@ @top_srcdir@/Makefile.reconf_args
+
 .PHONY: production debug default competition
-production: ; (cd @top_srcdir@ && ./configure --with-build=production && $(MAKE))
-debug:      ; (cd @top_srcdir@ && ./configure --with-build=debug && $(MAKE))
-default:    ; (cd @top_srcdir@ && ./configure --with-build=default && $(MAKE))
-competition:; (cd @top_srcdir@ && ./configure --with-build=competition && $(MAKE))
+production debug default competition:
+       cd @top_srcdir@; \
+       dir="builds/`config/config.guess`/`config/build-type $@ $(BTARGS)`"; \
+       if test -e "$$dir"; then \
+               cd "$$dir" && $(MAKE); \
+       else \
+               ./configure --with-build=$@ $(CONFARGS) && $(MAKE); \
+       fi
+
index 6beb315977366fe6dddfcbdb0748a21fe93691ee..139f43cc058143a71b76eff1b5f6b54f577fee6f 100644 (file)
@@ -226,6 +226,7 @@ localedir = @localedir@
 localstatedir = @localstatedir@
 lt_ECHO = @lt_ECHO@
 mandir = @mandir@
+mk_include = @mk_include@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
 pdfdir = @pdfdir@
@@ -744,11 +745,17 @@ uninstall-am:
        ps ps-am tags tags-recursive uninstall uninstall-am
 
 
+@mk_include@ @top_srcdir@/Makefile.reconf_args
+
 .PHONY: production debug default competition
-production: ; (cd @top_srcdir@ && ./configure --with-build=production && $(MAKE))
-debug:      ; (cd @top_srcdir@ && ./configure --with-build=debug && $(MAKE))
-default:    ; (cd @top_srcdir@ && ./configure --with-build=default && $(MAKE))
-competition:; (cd @top_srcdir@ && ./configure --with-build=competition && $(MAKE))
+production debug default competition:
+       cd @top_srcdir@; \
+       dir="builds/`config/config.guess`/`config/build-type $@ $(BTARGS)`"; \
+       if test -e "$$dir"; then \
+               cd "$$dir" && $(MAKE); \
+       else \
+               ./configure --with-build=$@ $(CONFARGS) && $(MAKE); \
+       fi
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/Makefile.reconf_args b/Makefile.reconf_args
new file mode 100644 (file)
index 0000000..10d3c84
--- /dev/null
@@ -0,0 +1,77 @@
+# This makefile snippet maps make-time arguments to configure and
+# build-type arguments
+#
+# Morgan Deters <mdeters@cs.nyu.edu> 2009 for CVC4
+BTARGS =
+CONFARGS =
+
+ifeq ($(OPTIMIZE),0)
+  BTARGS += noopt
+  CONFARGS += --disable-optimized
+else
+ifeq ($(OPTIMIZE),1)
+  BTARGS += opt
+  CONFARGS += --enable-optimized
+endif
+endif
+
+ifeq ($(DEBUG_SYMBOLS),0)
+  BTARGS += nodsy
+  CONFARGS += --disable-debug-symbols
+else
+ifeq ($(DEBUG_SYMBOLS),1)
+  BTARGS += dsy
+  CONFARGS += --enable-debug-symbols
+endif
+endif
+
+ifeq ($(ASSERTIONS),0)
+  BTARGS += noass
+  CONFARGS += --disable-assertions
+else
+ifeq ($(ASSERTIONS),1)
+  BTARGS += ass
+  CONFARGS += --enable-assertions
+endif
+endif
+
+ifeq ($(TRACING),0)
+  BTARGS += notrc
+  CONFARGS += --disable-tracing
+else
+ifeq ($(TRACING),1)
+  BTARGS += trc
+  CONFARGS += --enable-tracing
+endif
+endif
+
+ifeq ($(MUZZLE),0)
+  BTARGS += nomzl
+  CONFARGS += --disable-muzzle
+else
+ifeq ($(MUZZLE),1)
+  BTARGS += mzl
+  CONFARGS += --enable-muzzle
+endif
+endif
+
+ifeq ($(COVERAGE),0)
+  BTARGS += nocvg
+  CONFARGS += --disable-coverage
+else
+ifeq ($(COVERAGE),1)
+  BTARGS += cvg
+  CONFARGS += --enable-coverage
+endif
+endif
+
+ifeq ($(PROFILING),0)
+  BTARGS += noprf
+  CONFARGS += --disable-profiling
+else
+ifeq ($(PROFILING),1)
+  BTARGS += prf
+  CONFARGS += --enable-profiling
+endif
+endif
+
diff --git a/config/build-type b/config/build-type
new file mode 100755 (executable)
index 0000000..997e0f8
--- /dev/null
@@ -0,0 +1,59 @@
+#!/bin/sh
+#
+# build-type
+# Morgan Deters <mdeters@cs.nyu.edu> for CVC4
+#
+# usage: build-type profile [ overrides... ]
+#
+# Returns a build string for the given profile and overrides.
+# For example, "build-type debug noass" returns the canonical build
+# string for a debug build with assertions turned off.
+#
+# The default build directory for CVC4 is then (assuming a standard
+# debug build):
+#
+#   builds/`config/config.guess`/`config/build-type debug`
+#
+# This script is used both in CVC4's configure script and in the
+# top-level Makefile when you build another profile than the
+# "current" build (to see if there already was a build of that type).
+#
+# The codes for overrides are as follows:
+#
+#   opt - optimizing
+#   dsy - debug symbols
+#   ass - assertions
+#   trc - tracing
+#   mzl - muzzle
+#   cvg - coverage
+#   prf - profiling
+#
+
+if [ $# -eq 0 ]; then
+  echo "usage: build-type profile [ overrides... ]" >&2
+  exit
+fi
+
+build_type=$1
+shift
+
+while [ $# -gt 0 ]; do
+  case "$1" in
+    no*) eval `expr "$1" : 'no\(.*\)'`=0 ;;
+    *)   eval $1=1 ;;
+  esac
+  shift
+done
+
+build_type_suffix=
+for arg in opt dsy ass trc mzl cvg prf; do
+  if eval [ -n '"${'$arg'+set}"' ]; then
+    if eval [ '"${'$arg'}"' -eq 0 ]; then
+      build_type_suffix=$build_type_suffix-no$arg
+    else
+      build_type_suffix=$build_type_suffix-$arg
+    fi
+  fi
+done
+
+echo $build_type$build_type_suffix
index 1926fa54a72dc5de99b1a77cf6d18aba852c4923..661631b4db1846997e4b104119d472fe61d269a5 100644 (file)
@@ -18,7 +18,7 @@ do
   case $ac_option in
     -*|*=*) ;;
     *) ac_cvc4_build_profile_set=yes
-       AC_MSG_WARN([building profile $ac_option])
+       AC_MSG_NOTICE([CVC4: building profile $ac_option])
        ac_option="--with-build=$ac_option" ;;
   esac
   eval 'ac_cvc4_rewritten_args="${ac_cvc4_rewritten_args+$ac_cvc4_rewritten_args }\"$ac_option\""'
diff --git a/config/mkbuilddir b/config/mkbuilddir
new file mode 100644 (file)
index 0000000..1bc8955
--- /dev/null
@@ -0,0 +1,39 @@
+#!/bin/sh
+#
+# mkbuilddir
+# Morgan Deters <mdeters@cs.nyu.edu> for CVC4
+#
+# usage: mkbuilddir target build-type
+#
+# Sets up the builds/ directory for building build-type for target:
+# - removes configure detritus from top-level source directory
+# - makes builds/$target/$build_type directory if it's not already there
+# - links builds/Makefile to (possibly nonexistent) build Makefile
+# - creates the builds/current Makefile include snippet
+# - links builds/src and builds/test into build directory
+#
+
+if [ $# -ne 2 ]; then
+  echo 'usage: mkbuilddir target build_type' >&2
+  exit 1
+fi
+
+target=$1
+build_type=$2
+
+echo Setting up "builds/$target/$build_type"...
+rm -fv config.log config.status confdefs.h
+mkdir -pv "builds/$target/$build_type"
+ln -sfv "$target/$build_type/Makefile.builds" builds/Makefile
+
+echo Creating builds/current...
+(echo "# This is the most-recently-configured CVC4 build"; \
+ echo "# 'make' in the top-level source directory applies to this build"; \
+ echo "CURRENT_BUILD = $target/$build_type") > builds/current
+
+for dir in src test; do
+  echo Linking builds/$dir...
+  rm -f "builds/$dir"
+  ln -sfv "$target/$build_type/$dir" "builds/$dir"
+done
+
index 5c6eead3277a941b047a2e8b8b6e2c15cea44b57..15131cbb78bf0c6e9ec56c9c3c5329800d342cdc 100755 (executable)
--- a/configure
+++ b/configure
@@ -709,6 +709,7 @@ ac_subst_vars='am__EXEEXT_FALSE
 am__EXEEXT_TRUE
 LTLIBOBJS
 LIBOBJS
+mk_include
 CVC4_PARSER_LIBRARY_VERSION
 CVC4_LIBRARY_VERSION
 CVC4_LIBRARY_RELEASE_CODE
@@ -889,14 +890,13 @@ do
   case $ac_option in
     -*|*=*) ;;
     *) ac_cvc4_build_profile_set=yes
-       $as_echo "$as_me: WARNING: building profile $ac_option" >&2
+       $as_echo "$as_me: CVC4: building profile $ac_option" >&6
        ac_option="--with-build=$ac_option" ;;
   esac
   eval 'ac_cvc4_rewritten_args="${ac_cvc4_rewritten_args+$ac_cvc4_rewritten_args }\"$ac_option\""'
 done
 eval set x $ac_cvc4_rewritten_args
 shift
-echo "args are now:" "${@}"
 
 # Initialize some variables set by options.
 ac_init_help=
@@ -2793,54 +2793,54 @@ if test -z "${enable_optimized+set}" -a -z "${enable_debug_symbols+set}" -a -z "
 else
   non_standard_build_profile=yes
 fi
-build_type_suffix=
+btargs=
 if test -n "${enable_optimized+set}"; then
-  if test "$enable_optimized" = no; then
-    build_type_suffix=$build_type_suffix-noopt
+  if test "$enable_optimized" = yes; then
+    btargs="$btargs opt"
   else
-    build_type_suffix=$build_type_suffix-opt
+    btargs="$btargs noopt"
   fi
 fi
 if test -n "${enable_debug_symbols+set}"; then
-  if test "$enable_debug_symbols" = no; then
-    build_type_suffix=$build_type_suffix-nodsy
+  if test "$enable_debug_symbols" = yes; then
+    btargs="$btargs dsy"
   else
-    build_type_suffix=$build_type_suffix-dsy
+    btargs="$btargs nodsy"
   fi
 fi
 if test -n "${enable_assertions+set}"; then
-  if test "$enable_assertions" = no; then
-    build_type_suffix=$build_type_suffix-noass
+  if test "$enable_assertions" = yes; then
+    btargs="$btargs ass"
   else
-    build_type_suffix=$build_type_suffix-ass
+    btargs="$btargs noass"
   fi
 fi
 if test -n "${enable_tracing+set}"; then
-  if test "$enable_tracing" = no; then
-    build_type_suffix=$build_type_suffix-notrc
+  if test "$enable_tracing" = yes; then
+    btargs="$btargs trc"
   else
-    build_type_suffix=$build_type_suffix-trc
+    btargs="$btargs notrc"
   fi
 fi
 if test -n "${enable_muzzle+set}"; then
-  if test "$enable_muzzle" = no; then
-    build_type_suffix=$build_type_suffix-nomzl
+  if test "$enable_muzzle" = yes; then
+    btargs="$btargs mzl"
   else
-    build_type_suffix=$build_type_suffix-mzl
+    btargs="$btargs nomzl"
   fi
 fi
 if test -n "${enable_coverage+set}"; then
-  if test "$enable_coverage" = no; then
-    build_type_suffix=$build_type_suffix-nocvg
+  if test "$enable_coverage" = yes; then
+    btargs="$btargs cvg"
   else
-    build_type_suffix=$build_type_suffix-cvg
+    btargs="$btargs nocvg"
   fi
 fi
 if test -n "${enable_profiling+set}"; then
-  if test "$enable_profiling" = no; then
-    build_type_suffix=$build_type_suffix-noprf
+  if test "$enable_profiling" = yes; then
+    btargs="$btargs prf"
   else
-    build_type_suffix=$build_type_suffix-prf
+    btargs="$btargs noprf"
   fi
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_build" >&5
@@ -2848,10 +2848,10 @@ $as_echo "$with_build" >&6; }
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate build string" >&5
 $as_echo_n "checking for appropriate build string... " >&6; }
-build_type=$with_build$build_type_suffix
+build_type=`$ac_confdir/config/build-type $with_build $btargs`
 if test "$non_standard_build_profile" = yes; then
   if test "$with_build" = default; then
-    build_type=custom$build_type_suffix
+    build_type=`$ac_confdir/config/build-type custom $btargs`
   fi
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $build_type" >&5
@@ -2867,20 +2867,13 @@ elif test -e src/include/cvc4_config.h; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: builds/$target/$build_type" >&5
 $as_echo "builds/$target/$build_type" >&6; }
   echo
-  echo Setting up "builds/$target/$build_type"...
-  rm -fv config.log config.status confdefs.h
-  mkdir -pv "builds/$target/$build_type"
-  ln -sfv "$target/$build_type/Makefile.builds" builds/Makefile
-  echo Creating builds/current...
-  (echo "# This is the most-recently-configured CVC4 build"; \
-   echo "# 'make' in the top-level source directory applies to this build"; \
-   echo "CURRENT_BUILD = $target/$build_type") > builds/current
-  echo Linking builds/src...
-  rm -f builds/src
-  ln -sfv "$target/$build_type/src" builds/src
-  echo Linking builds/test...
-  rm -f builds/test
-  ln -sfv "$target/$build_type/test" builds/test
+  if test -z "$ac_srcdir"; then
+    mkbuilddir=./config/mkbuilddir
+  else
+    mkbuilddir=$ac_srcdir/config/mkbuilddir
+  fi
+  echo $mkbuilddir "$target" "$build_type"
+  $mkbuilddir "$target" "$build_type"
   echo cd "builds/$target/$build_type"
   cd "builds/$target/$build_type"
   CVC4_CONFIGURE_IN_BUILDS=yes; export CVC4_CONFIGURE_IN_BUILDS
@@ -5411,13 +5404,13 @@ if test "${lt_cv_nm_interface+set}" = set; then :
 else
   lt_cv_nm_interface="BSD nm"
   echo "int some_variable = 0;" > conftest.$ac_ext
-  (eval echo "\"\$as_me:5414: $ac_compile\"" >&5)
+  (eval echo "\"\$as_me:5407: $ac_compile\"" >&5)
   (eval "$ac_compile" 2>conftest.err)
   cat conftest.err >&5
-  (eval echo "\"\$as_me:5417: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+  (eval echo "\"\$as_me:5410: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
   (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
   cat conftest.err >&5
-  (eval echo "\"\$as_me:5420: output\"" >&5)
+  (eval echo "\"\$as_me:5413: output\"" >&5)
   cat conftest.out >&5
   if $GREP 'External.*some_variable' conftest.out > /dev/null; then
     lt_cv_nm_interface="MS dumpbin"
@@ -6620,7 +6613,7 @@ ia64-*-hpux*)
   ;;
 *-*-irix6*)
   # Find out which ABI we are using.
-  echo '#line 6623 "configure"' > conftest.$ac_ext
+  echo '#line 6616 "configure"' > conftest.$ac_ext
   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -8088,11 +8081,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:8091: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:8084: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:8095: \$? = $ac_status" >&5
+   echo "$as_me:8088: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -8427,11 +8420,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:8430: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:8423: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:8434: \$? = $ac_status" >&5
+   echo "$as_me:8427: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -8532,11 +8525,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:8535: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:8528: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:8539: \$? = $ac_status" >&5
+   echo "$as_me:8532: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -8587,11 +8580,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:8590: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:8583: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:8594: \$? = $ac_status" >&5
+   echo "$as_me:8587: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -10970,7 +10963,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 10973 "configure"
+#line 10966 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11066,7 +11059,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11069 "configure"
+#line 11062 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -14622,11 +14615,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:14625: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:14618: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:14629: \$? = $ac_status" >&5
+   echo "$as_me:14622: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -14721,11 +14714,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:14724: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:14717: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:14728: \$? = $ac_status" >&5
+   echo "$as_me:14721: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -14773,11 +14766,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:14776: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:14769: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:14780: \$? = $ac_status" >&5
+   echo "$as_me:14773: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -16359,6 +16352,9 @@ if test "$user_ldflags" = no; then
   LDFLAGS="$CVC4LDFLAGS"
 fi
 
+mk_include=include
+
+
 ac_config_files="$ac_config_files Makefile.builds Makefile contrib/Makefile doc/Makefile src/Makefile src/expr/Makefile src/smt/Makefile src/main/Makefile src/prop/minisat/Makefile src/prop/Makefile src/util/Makefile src/context/Makefile src/parser/Makefile src/parser/cvc/Makefile src/parser/smt/Makefile src/theory/Makefile src/theory/uf/Makefile test/Makefile test/regress/Makefile test/unit/Makefile"
 
 
index 524f015d84663f53f3ccebf16b073f3fd6c66eb9..0b8f8a5f38a9be102958fc0dfc83b3475fabccb8 100644 (file)
@@ -36,63 +36,63 @@ if test -z "${enable_optimized+set}" -a -z "${enable_debug_symbols+set}" -a -z "
 else
   non_standard_build_profile=yes
 fi
-build_type_suffix=
+btargs=
 if test -n "${enable_optimized+set}"; then
-  if test "$enable_optimized" = no; then
-    build_type_suffix=$build_type_suffix-noopt
+  if test "$enable_optimized" = yes; then
+    btargs="$btargs opt"
   else
-    build_type_suffix=$build_type_suffix-opt
+    btargs="$btargs noopt"
   fi
 fi
 if test -n "${enable_debug_symbols+set}"; then
-  if test "$enable_debug_symbols" = no; then
-    build_type_suffix=$build_type_suffix-nodsy
+  if test "$enable_debug_symbols" = yes; then
+    btargs="$btargs dsy"
   else
-    build_type_suffix=$build_type_suffix-dsy
+    btargs="$btargs nodsy"
   fi
 fi
 if test -n "${enable_assertions+set}"; then
-  if test "$enable_assertions" = no; then
-    build_type_suffix=$build_type_suffix-noass
+  if test "$enable_assertions" = yes; then
+    btargs="$btargs ass"
   else
-    build_type_suffix=$build_type_suffix-ass
+    btargs="$btargs noass"
   fi
 fi
 if test -n "${enable_tracing+set}"; then
-  if test "$enable_tracing" = no; then
-    build_type_suffix=$build_type_suffix-notrc
+  if test "$enable_tracing" = yes; then
+    btargs="$btargs trc"
   else
-    build_type_suffix=$build_type_suffix-trc
+    btargs="$btargs notrc"
   fi
 fi
 if test -n "${enable_muzzle+set}"; then
-  if test "$enable_muzzle" = no; then
-    build_type_suffix=$build_type_suffix-nomzl
+  if test "$enable_muzzle" = yes; then
+    btargs="$btargs mzl"
   else
-    build_type_suffix=$build_type_suffix-mzl
+    btargs="$btargs nomzl"
   fi
 fi
 if test -n "${enable_coverage+set}"; then
-  if test "$enable_coverage" = no; then
-    build_type_suffix=$build_type_suffix-nocvg
+  if test "$enable_coverage" = yes; then
+    btargs="$btargs cvg"
   else
-    build_type_suffix=$build_type_suffix-cvg
+    btargs="$btargs nocvg"
   fi
 fi
 if test -n "${enable_profiling+set}"; then
-  if test "$enable_profiling" = no; then
-    build_type_suffix=$build_type_suffix-noprf
+  if test "$enable_profiling" = yes; then
+    btargs="$btargs prf"
   else
-    build_type_suffix=$build_type_suffix-prf
+    btargs="$btargs noprf"
   fi
 fi
 AC_MSG_RESULT([$with_build])
 
 AC_MSG_CHECKING([for appropriate build string])
-build_type=$with_build$build_type_suffix
+build_type=`$ac_confdir/config/build-type $with_build $btargs`
 if test "$non_standard_build_profile" = yes; then
   if test "$with_build" = default; then
-    build_type=custom$build_type_suffix
+    build_type=`$ac_confdir/config/build-type custom $btargs`
   fi
 fi
 AC_MSG_RESULT($build_type)
@@ -104,20 +104,13 @@ if test "$CVC4_CONFIGURE_IN_BUILDS" = yes; then
 elif test -e src/include/cvc4_config.h; then
   AC_MSG_RESULT([builds/$target/$build_type])
   echo
-  echo Setting up "builds/$target/$build_type"...
-  rm -fv config.log config.status confdefs.h
-  mkdir -pv "builds/$target/$build_type"
-  ln -sfv "$target/$build_type/Makefile.builds" builds/Makefile
-  echo Creating builds/current...
-  (echo "# This is the most-recently-configured CVC4 build"; \
-   echo "# 'make' in the top-level source directory applies to this build"; \
-   echo "CURRENT_BUILD = $target/$build_type") > builds/current
-  echo Linking builds/src...
-  rm -f builds/src
-  ln -sfv "$target/$build_type/src" builds/src
-  echo Linking builds/test...
-  rm -f builds/test
-  ln -sfv "$target/$build_type/test" builds/test
+  if test -z "$ac_srcdir"; then
+    mkbuilddir=./config/mkbuilddir
+  else
+    mkbuilddir=$ac_srcdir/config/mkbuilddir
+  fi
+  echo $mkbuilddir "$target" "$build_type"
+  $mkbuilddir "$target" "$build_type"
   echo cd "builds/$target/$build_type"
   cd "builds/$target/$build_type"
   CVC4_CONFIGURE_IN_BUILDS=yes; export CVC4_CONFIGURE_IN_BUILDS
@@ -341,6 +334,9 @@ if test "$user_ldflags" = no; then
   LDFLAGS="$CVC4LDFLAGS"
 fi
 
+mk_include=include
+AC_SUBST(mk_include)
+
 AC_CONFIG_FILES([
   Makefile.builds
   Makefile
index e4bf7b362c69a43ed7209e9406e5f16b0d120666..a86658b70cc25acceb9acd8c3714033aab429b2c 100644 (file)
@@ -169,6 +169,7 @@ localedir = @localedir@
 localstatedir = @localstatedir@
 lt_ECHO = @lt_ECHO@
 mandir = @mandir@
+mk_include = @mk_include@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
 pdfdir = @pdfdir@
index d5264caff85ed472fdd5ce7c8ca1a98c2559ec52..99ff59b1c536a4126b887fd8b473ee4066349557 100644 (file)
@@ -169,6 +169,7 @@ localedir = @localedir@
 localstatedir = @localstatedir@
 lt_ECHO = @lt_ECHO@
 mandir = @mandir@
+mk_include = @mk_include@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
 pdfdir = @pdfdir@
index 38d59d02a63c3d4905dfa60fefc2bfacf228d7ab..de268af1633e698c3de73c178342da414a6ff579 100644 (file)
@@ -253,6 +253,7 @@ localedir = @localedir@
 localstatedir = @localstatedir@
 lt_ECHO = @lt_ECHO@
 mandir = @mandir@
+mk_include = @mk_include@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
 pdfdir = @pdfdir@
index 51069583de155a648e2ff0c02b686e291a411fc3..c4f82d42acdcd627c20cdbc8c4fca8a49a1454cb 100644 (file)
@@ -198,6 +198,7 @@ localedir = @localedir@
 localstatedir = @localstatedir@
 lt_ECHO = @lt_ECHO@
 mandir = @mandir@
+mk_include = @mk_include@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
 pdfdir = @pdfdir@
index c7d99dc84b5d9c17231389f3f962bfe71856ded8..4892220d801b82149420d9838c70ad0c38ff98e3 100644 (file)
@@ -199,6 +199,7 @@ localedir = @localedir@
 localstatedir = @localstatedir@
 lt_ECHO = @lt_ECHO@
 mandir = @mandir@
+mk_include = @mk_include@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
 pdfdir = @pdfdir@
index 26ea8185939a0e8f590f23242f3d153be67442eb..58eeeacdd5b1d33a0d5e5a2181c4de56fe8690b1 100644 (file)
@@ -200,6 +200,7 @@ localedir = @localedir@
 localstatedir = @localstatedir@
 lt_ECHO = @lt_ECHO@
 mandir = @mandir@
+mk_include = @mk_include@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
 pdfdir = @pdfdir@
index 859329834ba3c2c4a646f6b865009b274eb21461..f1b430add26b036baa5574b278397f372207b261 100644 (file)
@@ -262,6 +262,7 @@ localedir = @localedir@
 localstatedir = @localstatedir@
 lt_ECHO = @lt_ECHO@
 mandir = @mandir@
+mk_include = @mk_include@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
 pdfdir = @pdfdir@
index 57db98f0b62be3a83c33aa48b0eee9bddc38e086..3fd1701c848875c815a9ac8ec8d16e99b245681c 100644 (file)
@@ -202,6 +202,7 @@ localedir = @localedir@
 localstatedir = @localstatedir@
 lt_ECHO = @lt_ECHO@
 mandir = @mandir@
+mk_include = @mk_include@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
 pdfdir = @pdfdir@
index 2e9350486a6d6abe396472c7b9a545f1775e02dd..721ff0e2b9326f5b5f8c0546c7b83500cb982fff 100644 (file)
@@ -202,6 +202,7 @@ localedir = @localedir@
 localstatedir = @localstatedir@
 lt_ECHO = @lt_ECHO@
 mandir = @mandir@
+mk_include = @mk_include@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
 pdfdir = @pdfdir@
index 311d3f8c7c4602718b093085be81d425f6c4110d..c6538df385d1ec43deea9ba199cb57f99501d2ac 100644 (file)
@@ -236,6 +236,7 @@ localedir = @localedir@
 localstatedir = @localstatedir@
 lt_ECHO = @lt_ECHO@
 mandir = @mandir@
+mk_include = @mk_include@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
 pdfdir = @pdfdir@
index a54518c7456f678e70c316e8f245edc7fa1dbd8f..1dbc8da9fdbf0936e68c27714d48a32cbe3d6a94 100644 (file)
@@ -198,6 +198,7 @@ localedir = @localedir@
 localstatedir = @localstatedir@
 lt_ECHO = @lt_ECHO@
 mandir = @mandir@
+mk_include = @mk_include@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
 pdfdir = @pdfdir@
index 9647e51b921dcf1e7b9576cb2682248cde3a1f1e..35126e38217fe5c4ea816e0f72d7c86472930a23 100644 (file)
@@ -198,6 +198,7 @@ localedir = @localedir@
 localstatedir = @localstatedir@
 lt_ECHO = @lt_ECHO@
 mandir = @mandir@
+mk_include = @mk_include@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
 pdfdir = @pdfdir@
index d373877413d36ab90dbefff5804213893f42a61c..dafd68b6c713ab39b49763ecc1f40b504ed4af36 100644 (file)
@@ -236,6 +236,7 @@ localedir = @localedir@
 localstatedir = @localstatedir@
 lt_ECHO = @lt_ECHO@
 mandir = @mandir@
+mk_include = @mk_include@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
 pdfdir = @pdfdir@
index dfb8ea93275e503d2609fa58a305ff95fe6f4789..3b3cd6bbb6dea7c5aba4724ab71663e96c0f0a88 100644 (file)
@@ -184,6 +184,7 @@ localedir = @localedir@
 localstatedir = @localstatedir@
 lt_ECHO = @lt_ECHO@
 mandir = @mandir@
+mk_include = @mk_include@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
 pdfdir = @pdfdir@
index 5627e01a948cf2fb7977fd2da11bdd17838e552c..3ac892aba37f30d7e7f2d82b49ff2b264adfe35f 100644 (file)
@@ -199,6 +199,7 @@ localedir = @localedir@
 localstatedir = @localstatedir@
 lt_ECHO = @lt_ECHO@
 mandir = @mandir@
+mk_include = @mk_include@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
 pdfdir = @pdfdir@
index 69e05dd65e004624cad61efab32a3d3566a75309..211ec123c2e4d879749e1f3c630ac6d2e02898b1 100644 (file)
@@ -209,6 +209,7 @@ localedir = @localedir@
 localstatedir = @localstatedir@
 lt_ECHO = @lt_ECHO@
 mandir = @mandir@
+mk_include = @mk_include@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
 pdfdir = @pdfdir@
index 14c032220b50f7a1b00e959bf40346557f800608..34323b09cd7d355b9541fa98cb5a1432bb6e8969 100644 (file)
@@ -171,6 +171,7 @@ localedir = @localedir@
 localstatedir = @localstatedir@
 lt_ECHO = @lt_ECHO@
 mandir = @mandir@
+mk_include = @mk_include@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
 pdfdir = @pdfdir@
index b630f77655abb01c094e20299eb981911a0a9eb8..0b4b68c40dd99bfe7ba121db5e5525cfb83bf914 100644 (file)
@@ -216,6 +216,7 @@ localedir = @localedir@
 localstatedir = @localstatedir@
 lt_ECHO = @lt_ECHO@
 mandir = @mandir@
+mk_include = @mk_include@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
 pdfdir = @pdfdir@