summaryrefslogtreecommitdiff
path: root/source3/script
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2001-09-19 10:45:33 +0000
committerAndrew Bartlett <abartlet@samba.org>2001-09-19 10:45:33 +0000
commit31c44c4744be67159c7b98dc698233572febf083 (patch)
tree7fbdaa096bbbe0281747344c69ad2f1274cd82ae /source3/script
parent6794b58a8c5941ede29e07247bda911328cd7b20 (diff)
downloadsamba-31c44c4744be67159c7b98dc698233572febf083.tar.gz
samba-31c44c4744be67159c7b98dc698233572febf083.tar.bz2
samba-31c44c4744be67159c7b98dc698233572febf083.zip
Adding the appropirate files might help...
(These are part of the build_options patch). Andrew Bartlett (This used to be commit 4e5c7724b4e4c132b7b43104d3063d2f7357bae2)
Diffstat (limited to 'source3/script')
-rwxr-xr-xsource3/script/build_env.sh35
1 files changed, 35 insertions, 0 deletions
diff --git a/source3/script/build_env.sh b/source3/script/build_env.sh
new file mode 100755
index 0000000000..8ae79da7b9
--- /dev/null
+++ b/source3/script/build_env.sh
@@ -0,0 +1,35 @@
+#!/bin/sh
+
+uname=`uname -a`
+date=`date`
+srcdir=$1
+builddir=$2
+compiler=$3
+
+ if [ ! $USER = "" ]; then
+ whoami=$USER
+ else
+ if [ ! $LOGNAME = "" ]; then
+ whoami=$LOGNAME
+ else
+ whoami=`whoai || id -un`
+ fi
+ fi
+
+host=`hostname`
+
+cat <<EOF
+/* This file is automatically generated with "make build_env". DO NOT EDIT */
+
+#ifndef _BUILD_ENV_H
+#define _BUILD_ENV_H
+
+#define BUILD_ENV_UNAME "${uname}"
+#define BUILD_ENV_DATE "${date}"
+#define BUILD_ENV_SRCDIR "${srcdir}"
+#define BUILD_ENV_BUILDDIR "${builddir}"
+#define BUILD_ENV_USER "${whoami}"
+#define BUILD_ENV_HOST "${host}"
+#define BUILD_ENV_COMPILER "${compiler}"
+#endif /* _BUILD_ENV_H */
+EOF