librpc: Shorten dcerpc_binding_handle_call a bit
[Samba/gebeck_regimport.git] / source3 / script / build_env.sh
blobeb54f37aeda71a2a1757b325bffd488c12f110a2
1 #!/bin/sh
3 if [ $# -lt 3 ]
4 then
5 echo "Usage: $0 srcdir builddir compiler"
6 exit 1
7 fi
9 uname=`uname -a`
10 date=`date`
11 srcdir=$1
12 builddir=$2
13 compiler=$3
15 if [ ! "x$USER" = "x" ]; then
16 whoami=$USER
17 else
18 if [ ! "x$LOGNAME" = "x" ]; then
19 whoami=$LOGNAME
20 else
21 whoami=`whoami || id -un`
25 host=`hostname`
27 cat <<EOF
28 /* This file is automatically generated with "make include/build_env.h". DO NOT EDIT */
30 #ifndef _BUILD_ENV_H
31 #define _BUILD_ENV_H
33 #define BUILD_ENV_UNAME "${uname}"
34 #define BUILD_ENV_DATE "${date}"
35 #define BUILD_ENV_SRCDIR "${srcdir}"
36 #define BUILD_ENV_BUILDDIR "${builddir}"
37 #define BUILD_ENV_USER "${whoami}"
38 #define BUILD_ENV_HOST "${host}"
39 #define BUILD_ENV_COMPILER "${compiler}"
40 #endif /* _BUILD_ENV_H */
41 EOF