From 5cd462d2661674ecec3c930958b70f1dcc44064d Mon Sep 17 00:00:00 2001 From: "David E. O'Brien" Date: Thu, 6 Sep 2001 17:52:59 +0000 Subject: [PATCH] I was missing the HOST_OS_VERSION setting in the fall-back case. Also, the script was too position dependant. We now have make(1) pass in the file to grub around in to get our settings from. --- usr.sbin/amd/include/Makefile | 2 +- usr.sbin/amd/include/newvers.sh | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/usr.sbin/amd/include/Makefile b/usr.sbin/amd/include/Makefile index 2fc511823f62..e7f911c68793 100644 --- a/usr.sbin/amd/include/Makefile +++ b/usr.sbin/amd/include/Makefile @@ -14,6 +14,6 @@ all: ${SRCS} config_local.h: newvers.sh @rm -f ${.TARGET} - sh ${.ALLSRC} > ${.TARGET} + sh ${.ALLSRC} ${.CURDIR}/../../../sys/conf/newvers.sh > ${.TARGET} .include diff --git a/usr.sbin/amd/include/newvers.sh b/usr.sbin/amd/include/newvers.sh index bc7c49b730f1..21f748be2098 100644 --- a/usr.sbin/amd/include/newvers.sh +++ b/usr.sbin/amd/include/newvers.sh @@ -4,8 +4,8 @@ # Generate local configuration parameters for amd # -if [ -e ../../../sys/conf/newvers.sh ]; then - eval `egrep '^[A-Z]+=' ../../../sys/conf/newvers.sh | grep -v COPYRIGHT` +if [ -e $1 ]; then + eval `egrep '^[A-Z]+=' $1 | grep -v COPYRIGHT` OS=`echo ${TYPE} | tr '[A-Z]' '[a-z]'` echo '/* Define name and version of host machine (eg. solaris2.5.1) */' echo "#define HOST_OS \"${OS}${REVISION}\"" @@ -23,6 +23,9 @@ cat << __NO_newvers_sh /* Define only name of host machine OS (eg. solaris2) */ #define HOST_OS_NAME "`uname -s | tr '[A-Z]' '[a-z]'``uname -r | sed -e 's/\..*$//'`" +/* Define only version of host machine (eg. 2.5.1) */ +#define HOST_OS_VERSION "`uname -r`" + __NO_newvers_sh fi