diff options
| author | Theodore Tso <tytso@mit.edu> | 1994-09-21 02:45:20 +0000 |
|---|---|---|
| committer | Theodore Tso <tytso@mit.edu> | 1994-09-21 02:45:20 +0000 |
| commit | 661fe5cbe1f4560e9d5971f933c9e0c19ea35460 (patch) | |
| tree | d85b256777e1188e3d4450fd9de25399390407cf /src | |
| parent | 65fafda60c3f01a31d2dc14b7df2eb9fd7e84067 (diff) | |
| download | krb5-661fe5cbe1f4560e9d5971f933c9e0c19ea35460.tar.gz krb5-661fe5cbe1f4560e9d5971f933c9e0c19ea35460.tar.xz krb5-661fe5cbe1f4560e9d5971f933c9e0c19ea35460.zip | |
Kbuild is a program which builds a Kerberos V5 distribution with a
specific set of compilation programs and configuration options, in a
repeatable manner.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4304 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src')
| -rw-r--r-- | src/util/kbuild | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/src/util/kbuild b/src/util/kbuild new file mode 100644 index 000000000..72b45a0a1 --- /dev/null +++ b/src/util/kbuild @@ -0,0 +1,63 @@ +#!/bin/sh +# +# Kerberos V5 build tool. Builds Kerberos V5 using a specified +# configuration file to control which support programs are used to +# compile it, which options are given to configure, etc. +# + +CONFIG=$1 +BUILD_PATH=./build-path + +if test ${CONFIG}x = x ]; then + echo "You must specify an build configuration file!" + exit 1 +fi + + +SRCDIR=`sed -e '/^SRCDIR:/!d' -e 's/SRCDIR: *//' $CONFIG` +CONFIG_OPTS=`sed -e '/^CONFIG_OPTS:/!d' -e 's/CONFIG_OPTS: *//' $CONFIG` +CC=`sed -e '/^CC:/!d' -e 's/CC: *//' $CONFIG` +CC_OPTS=`sed -e '/^CC_OPTS:/!d' -e 's/CC_OPTS: *//' $CONFIG` +KRB4=`sed -e '/^KRB4:/!d' -e 's/KRB4: *//' $CONFIG` + +CMD_PROGS=`cat $CONFIG | sed -e '1,/BEGIN CMD_LIST/d' \ + -e '/END CMD_LIST/,$d' \ + -e '/^$/d' -e '/^\#/d'` + +if test ${CC}x != "x" +then + CONFIG_OPTS="$CONFIG_OPTS --with-cc=${CC}" +fi + +if test ${CC_OPTS}x != "x" +then + CONFIG_OPTS="$CONFIG_OPTS --with-ccopts=${CC_OPTS}" +fi + +if test ${KRB4}x != "x" +then + CONFIG_OPTS="$CONFIG_OPTS --with-krb4=${KRB4}" +fi + +/bin/rm -rf $BUILD_PATH +mkdir $BUILD_PATH +cd $BUILD_PATH + +for i in $CMD_PROGS +do + ln -s $i +done + +cd .. + +PATH=`pwd`/$BUILD_PATH +export PATH +echo "Build path is $PATH" + +$SRCDIR/configure $CONFIG_OPTS + +echo "Configuration done. Building using the command:" +echo " (setenv PATH $PATH; make)" +echo " " + +make |
