summaryrefslogtreecommitdiff
path: root/source4/heimdal_build/et_compile_wrapper.sh
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2010-10-04 15:23:24 +0200
committerJelmer Vernooij <jelmer@samba.org>2010-10-04 15:23:24 +0200
commitc676c950dbb022004e7224b39355decfa74e6032 (patch)
tree58e7b5360c0cb4ef57360c52de962e6d495659b1 /source4/heimdal_build/et_compile_wrapper.sh
parent0bda3f8cfb34cc23fac8745decfbfb2f97a8fb65 (diff)
downloadsamba-c676c950dbb022004e7224b39355decfa74e6032.tar.gz
samba-c676c950dbb022004e7224b39355decfa74e6032.tar.bz2
samba-c676c950dbb022004e7224b39355decfa74e6032.zip
compile_et: Support using system compile_et.
Diffstat (limited to 'source4/heimdal_build/et_compile_wrapper.sh')
-rwxr-xr-xsource4/heimdal_build/et_compile_wrapper.sh35
1 files changed, 12 insertions, 23 deletions
diff --git a/source4/heimdal_build/et_compile_wrapper.sh b/source4/heimdal_build/et_compile_wrapper.sh
index ec3b39ff56..b267bb5ddc 100755
--- a/source4/heimdal_build/et_compile_wrapper.sh
+++ b/source4/heimdal_build/et_compile_wrapper.sh
@@ -4,18 +4,11 @@
SELF=$0
SELFDIR=`dirname ${SELF}`
-BUILDDIR=$1
-DESTDIR=$2
-
-CMD=$3
-FILE=$4
-SOURCE=$5
-shift 5
-
-test -z "${BUILDDIR}" && {
- echo "${SELF}:BUILDDIR: '${BUILDDIR}'" >&2;
- exit 1;
-}
+DESTDIR=$1
+CMD=$2
+FILE=$3
+SOURCE=$4
+shift 4
test -z "${DESTDIR}" && {
echo "${SELF}:DESTDIR: '${DESTDIR}'" >&2;
@@ -39,16 +32,12 @@ test -z "${SOURCE}" && {
CURDIR=`pwd`
-cd ${BUILDDIR} && {
- ABS_BUILDDIR=`pwd`
- cd ${CURDIR}
-} || {
- echo "${SELF}:cannot cd into '${BUILDDIR}'" >&2;
- exit 1;
-}
-
cd ${DESTDIR} && {
- ${ABS_BUILDDIR}/${CMD} ${FILE} >&2 || exit 1;
+ # Remove older copies beforehand - MIT's compile_et uses odd permissions for these
+ # files, which makes Heimdal's compile_et fail mysteriously when writing to them.
+ rm -f `basename ${FILE} .et`.c
+ rm -f `basename ${FILE} .et`.h
+ ${CMD} ${FILE} >&2 || exit 1;
cd ${CURDIR}
TMP="${SOURCE}.$$"
mv ${SOURCE} ${TMP} && {
@@ -56,9 +45,9 @@ cd ${DESTDIR} && {
cat ${TMP} >> ${SOURCE}
}
}
- rm ${TMP}
+ rm -f ${TMP}
} || {
- echo "${SELF}:cannot cd into '${BUILDDIR}'" >&2;
+ echo "${SELF}:cannot cd into '${DESTDIR}'" >&2;
exit 1;
}