#!/bin/sh
HOSTNAME=`uname -n`
KERNEL=`uname -r`
MACHINE=`uname -m`
OS=`uname -s`
if [ `uname -s` = "SunOS" ]; then
  USER=`/usr/xpg4/bin/id -un`
else
  USER=`id -un`
fi
DATE=`date -u "+%Y-%m-%d %H:%M:%S"`
cat << END
/*
 * build.h 
 * Automatically generated
 */
#define BUILD_HOSTNAME "${HOSTNAME}"
#define BUILD_KERNEL "${KERNEL}"
#define BUILD_MACHINE "${MACHINE}"
#define BUILD_OS "${OS}"
#define BUILD_DATE "${DATE} UTC"
#define BUILD_USER "${USER}"

END
