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.
This commit is contained in:
David E. O'Brien 2001-09-06 17:52:59 +00:00
parent 67bc4ad9b6
commit 5cd462d266
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=83154
2 changed files with 6 additions and 3 deletions

View file

@ -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 <bsd.prog.mk>

View file

@ -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