1998-08-27 08:09:42 +00:00
|
|
|
# $NetBSD: mkconf,v 1.1.1.1 1997/07/24 21:20:12 christos Exp $
|
1999-08-28 01:35:59 +00:00
|
|
|
# $FreeBSD$
|
1998-08-27 08:09:42 +00:00
|
|
|
# mkconf
|
|
|
|
# Generate local configuration parameters for amd
|
|
|
|
#
|
|
|
|
|
2001-09-06 17:52:59 +00:00
|
|
|
if [ -e $1 ]; then
|
2003-08-04 21:31:53 +00:00
|
|
|
eval `LC_ALL=C egrep '^[A-Z]+=' $1 | grep -v COPYRIGHT`
|
|
|
|
OS=`echo ${TYPE} | LC_ALL=C tr 'A-Z' 'a-z'`
|
2001-09-05 16:54:20 +00:00
|
|
|
echo '/* Define name and version of host machine (eg. solaris2.5.1) */'
|
|
|
|
echo "#define HOST_OS \"${OS}${REVISION}\""
|
|
|
|
echo '/* Define only name of host machine OS (eg. solaris2) */'
|
|
|
|
echo "#define HOST_OS_NAME \"${OS}${REVISION}\"" \
|
|
|
|
| sed -e 's/\.[-._0-9]*//'
|
|
|
|
echo '/* Define only version of host machine (eg. 2.5.1) */'
|
|
|
|
echo "#define HOST_OS_VERSION \"${REVISION}\""
|
|
|
|
else
|
|
|
|
cat << __NO_newvers_sh
|
1998-08-27 08:09:42 +00:00
|
|
|
|
|
|
|
/* Define name and version of host machine (eg. solaris2.5.1) */
|
2003-08-04 21:31:53 +00:00
|
|
|
#define HOST_OS "`uname -s | LC_ALL=C tr 'A-Z' 'a-z'``uname -r`"
|
1998-08-27 08:09:42 +00:00
|
|
|
|
|
|
|
/* Define only name of host machine OS (eg. solaris2) */
|
2003-08-04 21:31:53 +00:00
|
|
|
#define HOST_OS_NAME "`uname -s | LC_ALL=C tr 'A-Z' 'a-z'``uname -r | sed -e 's/\..*$//'`"
|
1998-08-27 08:09:42 +00:00
|
|
|
|
2001-09-06 17:52:59 +00:00
|
|
|
/* Define only version of host machine (eg. 2.5.1) */
|
2001-09-06 18:39:46 +00:00
|
|
|
#define HOST_OS_VERSION "`uname -r | sed -e 's/[-([:alpha:]].*//'`"
|
2001-09-06 17:52:59 +00:00
|
|
|
|
2001-09-05 16:54:20 +00:00
|
|
|
__NO_newvers_sh
|
|
|
|
fi
|
|
|
|
|
|
|
|
cat << __EOF
|
1998-08-27 08:09:42 +00:00
|
|
|
|
|
|
|
/* Define name of host */
|
2007-12-05 16:23:34 +00:00
|
|
|
#define BUILD_HOST "`hostname`"
|
1998-08-27 08:09:42 +00:00
|
|
|
|
|
|
|
/* Define user name */
|
2007-12-05 16:23:34 +00:00
|
|
|
#define BUILD_USER "`whoami`"
|
1998-08-27 08:09:42 +00:00
|
|
|
|
|
|
|
/* Define configuration date */
|
2007-12-05 16:23:34 +00:00
|
|
|
#define BUILD_DATE "`LC_ALL=C date`"
|
1998-08-27 08:09:42 +00:00
|
|
|
|
|
|
|
__EOF
|