diff --git a/bin/build-all.sh b/bin/build-all.sh index 937396c45f561b4565758b1f73bd8a052551a4bd..8aa4c84310b5f29c3e523c9d1396ebea7effe2a1 100755 --- a/bin/build-all.sh +++ b/bin/build-all.sh @@ -18,6 +18,8 @@ usage () echo "" echo " -b d Basename of the different build directories." echo " ${d}-2, ${d}-3, ${d}-4 for unicode" + echo " If -b is not given, a suitable name is chosen" + echo " based on the OS." echo " ${d}-8bit-2, ${d}-8bit-3, ${d}-8bit-4 for non-unicode" echo " -B file Use file as a boot file. Maybe be specified more than once" echo " The file is relative to the bootfiles/<version> directory" @@ -34,7 +36,6 @@ usage () echo " translations" } -BASE=build CREATE_OPT="" UPDATE_POT="-P" @@ -53,9 +54,20 @@ do esac done -if [ "$BASE" = "" ]; then - echo "-b option required" - exit 1 +# If -b not given, try to derive one instead of just using "build". +if [ -z "$BASE" ]; then + case `uname -s` in + Darwin) # We only support darwin-x86 now. No ppc available anymore. + BASE=darwin ;; + SunOS) + case `uname -m` in + sun4u) BASE=sparc ;; + i86pc) BASE=sol-x86 ;; + esac ;; + Linux) BASE=linux ;; + # Add support for FreeBSD and NetBSD? Otherwise default to just build. + *) BASE=build ;; + esac fi if [ "$OLDLISP" = "" -a "$OLD8" = "" ]; then diff --git a/bin/build.sh b/bin/build.sh index 00c7fc66afb648ebe5ba6c1063fe0154a40391f6..537354b7df63441cc515327c4cc537256d63a4ec 100755 --- a/bin/build.sh +++ b/bin/build.sh @@ -47,7 +47,6 @@ VERSION="`date '+%Y-%m-%d %H:%M:%S'`" GIT_HASH="`(cd src; git describe --dirty 2>/dev/null)`" # Add the tree hash to the version VERSION="$VERSION $GIT_HASH" -BASE=build OLDLISPFLAGS="-noinit -nositeinit" OLDLISP="cmulisp" @@ -78,7 +77,7 @@ usage () echo " -o x Use specified Lisp to build. Default is cmulisp" echo " (only applicable for build 1)" echo ' -b d The different build directories are named ${d}-2, ${d}-3 ${d}-4' - echo ' with a default of "build"' + echo ' If -b is not given, a suitable name based on the OS is used.' echo ' -v v Use the given string as the version. Default is' echo " today's date" echo " -u Don't build CLX, CLM, or Hemlock" @@ -174,6 +173,24 @@ do esac done +# If -b not given, try to derive one instead of just using "build". +if [ -z "$BASE" ]; then + case `uname -s` in + Darwin) # We only support darwin-x86 now. No ppc available anymore. + BASE=darwin ;; + SunOS) + case `uname -m` in + sun4u) BASE=sparc ;; + i86pc) BASE=sol-x86 ;; + esac ;; + Linux) BASE=linux ;; + # Add support for FreeBSD and NetBSD? Otherwise default to just build. + *) BASE=build ;; + esac +fi + +echo base = $BASE + bootfiles_dir=$SRCDIR/bootfiles/$version if [ -n "$bootfiles" ]; then for file in $bootfiles; do