diff options
author | Mathias Preiner <mathias.preiner@gmail.com> | 2018-10-19 14:45:42 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-19 14:45:42 -0700 |
commit | ce8c429281fd1f7e4ac4d2b7133152c1d370df0c (patch) | |
tree | 407400e728621cc9a5262e7112a93bd6acd0835a /contrib/switch-config | |
parent | 7de0540252b62080ee9f98617f5718cb1ae08579 (diff) |
Remove autotools build system. (#2639)
Diffstat (limited to 'contrib/switch-config')
-rwxr-xr-x | contrib/switch-config | 96 |
1 files changed, 0 insertions, 96 deletions
diff --git a/contrib/switch-config b/contrib/switch-config deleted file mode 100755 index 98ed10329..000000000 --- a/contrib/switch-config +++ /dev/null @@ -1,96 +0,0 @@ -#!/bin/bash -# -# usage: switch-config [configuration] -# switch-config -l -# -# Script to switch the "current" configuration of the CVC4 builds directory -# to another one. Without an argument, it switches to the next alphabetically. -# With an argument, it switches to that configuration. With -l, it lists the -# available configurations. -# -# Only configurations in the "current" architecture (that for which the build directory is currently -# configured) are considered. -# -# This script is useful because it's faster that re-configuring. -# -# Script assumes it lives under contrib/ in the root of the CVC4 source -# tree. - -function usage { - echo "usage: `basename \"$0\"` [configuration]" - echo " `basename \"$0\"` -l" -} - -if [ $# -gt 1 ]; then - usage - exit 1 -fi - -cd `dirname "$0"`/.. - -if ! [ -d builds ]; then - echo "No configurations are available (no builds/ directory)." - exit -fi - -if ! [ -e builds/current ]; then - echo "Cannot get current configuration." - exit 1 -fi - -current=(`grep '^CURRENT_BUILD' builds/current | sed 's,^CURRENT_BUILD *= *\([^/]*\)/\(.*\),\1 \2,'`) -arch=${current[0]} -build=${current[1]} - -builds=(`ls "builds/$arch/"`) - -if ! [ -d "builds/$arch" ] || ! [ -d "builds/$arch/$build" ] || [ ${#builds[@]} -eq 0 ]; then - echo "builds/ directory in malformed state." - echo "You might want to blow it away and start from scratch." - exit 1 -fi - -function switchto { - config/mkbuilddir "$arch" "$1" >/dev/null - #perl -pi -e 's,^CURRENT_BUILD *= *.*,CURRENT_BUILD = '$arch/$1',' builds/current - echo "Current build switched to \`$1'." -} - -if [ $# -eq 0 ]; then - first= - last= - setbuild= - for d in `ls "builds/$arch/"`; do - if [ -z "$first" ]; then first=$d; fi - if [ "$last" = "$build" ]; then setbuild=$d; break; fi - last=$d - done - if [ -z "$setbuild" ]; then setbuild=$first; fi - if [ "$setbuild" = "$build" ]; then - echo "There is only one build profile (\`$build'), and it is current." - else - switchto "$setbuild" - fi -else - case $1 in - -l) for config in `ls -1 "builds/$arch/"`; do - if [ "$config" = "$build" ]; then - echo "$config" '*' - else - echo "$config" - fi - done ;; - -*) usage; exit 1 ;; - *) if ! [ -d "builds/$arch/$1" ]; then - echo "Build \`$1' does not exist." - exit 1 - else - if [ "$1" = "$build" ]; then - echo "Build \`$1' is already the current build profile." - else - switchto "$1" - fi - fi ;; - esac -fi - |