preparing for release of 19
[Samba.git] / source / script / build_env.sh
blob0000759f1609710fde322e06ad83ca51eee25b84
1 #!/bin/sh
3 uname=`uname -a`
4 date=`date`
5 srcdir=$1
6 builddir=$2
7 compiler=$3
9 if [ ! "x$USER" = "x" ]; then
10 whoami=$USER
11 else
12 if [ ! "x$LOGNAME" = "x" ]; then
13 whoami=$LOGNAME
14 else
15 whoami=`whoami || id -un`
19 host=`hostname`
21 cat <<EOF
22 /* This file is automatically generated with "make build_env". DO NOT EDIT */
24 #ifndef _BUILD_ENV_H
25 #define _BUILD_ENV_H
27 #define BUILD_ENV_UNAME "${uname}"
28 #define BUILD_ENV_DATE "${date}"
29 #define BUILD_ENV_SRCDIR "${srcdir}"
30 #define BUILD_ENV_BUILDDIR "${builddir}"
31 #define BUILD_ENV_USER "${whoami}"
32 #define BUILD_ENV_HOST "${host}"
33 #define BUILD_ENV_COMPILER "${compiler}"
34 #endif /* _BUILD_ENV_H */
35 EOF