This commit was manufactured by cvs2svn to create branch 'SAMBA_3_0'.(This used to...
[samba.git] / source3 / script / build_env.sh
1 #!/bin/sh
2
3 uname=`uname -a`
4 date=`date`
5 srcdir=$1
6 builddir=$2
7 compiler=$3
8
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`
16             fi
17         fi
18
19 host=`hostname`
20
21 cat <<EOF
22 /* This file is automatically generated with "make build_env". DO NOT EDIT */
23
24 #ifndef _BUILD_ENV_H
25 #define _BUILD_ENV_H
26
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