1
0
mirror of https://github.com/PDP-10/klh10.git synced 2026-03-10 12:29:35 +00:00

Make build script more useful

by making it guess the build type from the directory you're in.
Alternatively you can override it on the command line.
This commit is contained in:
Olaf Seibert
2015-07-18 02:16:26 +02:00
parent 52e89809fc
commit b9fcfeab37

View File

@@ -1,13 +1,34 @@
#!/bin/sh
#
# Simple build script to build all 3 cpu models in one go.
#
# Usage: MAKE-ALL buildtarget
#
# where buildtarget is for example nbaxp (NetBSD for Alpha AXP, or
# any other little-endian 64-bit CPU).
DEFBUILD=nbaxp
# TOP=/some/where/klh10
# Removed "/bld" from current directory, if it's there
TOP="${PWD%/bld}"
BUILD=nbaxp
case "${PWD}" in
*/bld)
TOP="${PWD%/bld}"
;;
*/bld/*)
DEFBUILD="${PWD##*/}"
TOP="${PWD%/bld/*}"
;;
*)
TOP="$PWD"
;;
esac
BUILD=${1-$DEFBUILD}
cd $TOP || exit 1
echo "This script builds all PDP-10 variants."
echo "This script builds all PDP-10 variants for host $BUILD."
buildone() {
(