summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorMorgan Deters <mdeters@gmail.com>2009-12-17 00:02:12 +0000
committerMorgan Deters <mdeters@gmail.com>2009-12-17 00:02:12 +0000
commit73fd355fd1a9f6cacfc3170d29e29fccc94ab539 (patch)
treee88c1a48887ec1053d7fff40a9cb6ba5b8501e87 /config
parent426b8722e6e32f7fab46769e4d71184bf510fd0e (diff)
support nonstandard, unconfigured builds (e.g., "./configure debug" followed by "make production ASSERTIONS=1")
Diffstat (limited to 'config')
-rwxr-xr-xconfig/build-type59
-rw-r--r--config/cvc4.m42
-rw-r--r--config/mkbuilddir39
3 files changed, 99 insertions, 1 deletions
diff --git a/config/build-type b/config/build-type
new file mode 100755
index 000000000..997e0f8e3
--- /dev/null
+++ b/config/build-type
@@ -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
diff --git a/config/cvc4.m4 b/config/cvc4.m4
index 1926fa54a..661631b4d 100644
--- a/config/cvc4.m4
+++ b/config/cvc4.m4
@@ -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
index 000000000..1bc895548
--- /dev/null
+++ b/config/mkbuilddir
@@ -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
+
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback