From 01c80babf876a76305183fce0a4a09f9537040eb Mon Sep 17 00:00:00 2001 From: Mark Eichin Date: Sat, 1 Oct 1994 00:06:35 +0000 Subject: [PATCH] * kbuild: set SRCDIR by default from program name git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4415 dc483132-0cff-0310-8789-dd5450dbe970 --- src/util/ChangeLog | 8 ++++++-- src/util/kbuild | 12 ++++++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/src/util/ChangeLog b/src/util/ChangeLog index 9f07edf06..0cf93e7e3 100644 --- a/src/util/ChangeLog +++ b/src/util/ChangeLog @@ -1,5 +1,9 @@ +Fri Sep 30 19:28:24 1994 Mark Eichin (eichin@cygnus.com) + + * kbuild: set SRCDIR by default from program name. + Thu Sep 29 19:54:38 1994 Mark Eichin (eichin@cygnus.com) - * util/kbuild: complete rewrite. - * util/kfrags: fragments of input to kbuild. + * kbuild: complete rewrite. + * kfrags: fragments of input to kbuild. diff --git a/src/util/kbuild b/src/util/kbuild index 621c1e1b1..a2496c2f7 100644 --- a/src/util/kbuild +++ b/src/util/kbuild @@ -33,6 +33,18 @@ progname=$0 pts="`echo ${progname} | sed 's=[^/]*$=='`" +# +# sneak in default knowledge that this program is one level down from the +# top of the source tree +# + +case $pts in +/*) SRCDIR="`echo ${pts} | sed 's=[^/]*/*$=='`" + echo "default srcdir $SRCDIR";; +../*) SRCDIR="`cd ${pts}/.. ; pwd`" + echo "default srcdir $SRCDIR";; +esac + conflib=". $pts/kfrags" THISCONF=./kbuild.temp -- 2.26.2