r22746: fix the build of the sqlite module
[Samba.git] / source / heimdal_build / et_compile_wrapper.sh
bloba1cb5b311ce4b9f287e100c8e44844abc61c27c6
1 #!/bin/sh
4 SELF=$0
5 SELFDIR=`dirname ${SELF}`
7 SRCDIR=$1
8 BUILDDIR=$2
9 DESTDIR=$3
11 CMD=$4
12 FILE=$5
13 shift 5
15 test -z "${SRCDIR}" && {
16 echo "${SELF}:SRCDIR: '${SRCDIR}'" >&2;
17 exit 1;
20 test -z "${BUILDDIR}" && {
21 echo "${SELF}:BUILDDIR: '${BUILDDIR}'" >&2;
22 exit 1;
25 test -z "${DESTDIR}" && {
26 echo "${SELF}:DESTDIR: '${DESTDIR}'" >&2;
27 exit 1;
30 test -z "${CMD}" && {
31 echo "${SELF}:CMD: '${CMD}'" >&2;
32 exit 1;
35 test -z "${FILE}" && {
36 echo "${SELF}:FILE: '${FILE}'" >&2;
37 exit 1;
40 CURDIR=`pwd`
42 cd ${SRCDIR} && {
43 ABS_SRCDIR=`pwd`
44 cd ${CURDIR}
45 } || {
46 echo "${SELF}:cannot cd into '${SRCDIR}'" >&2;
47 exit 1;
50 cd ${BUILDDIR} && {
51 ABS_BUILDDIR=`pwd`
52 cd ${CURDIR}
53 } || {
54 echo "${SELF}:cannot cd into '${BUILDDIR}'" >&2;
55 exit 1;
58 cd ${DESTDIR} && {
59 ${ABS_BUILDDIR}/${CMD} ${ABS_SRCDIR}/${FILE} >&2 || exit 1;
60 cd ${CURDIR}
61 } || {
62 echo "${SELF}:cannot cd into '${BUILDDIR}'" >&2;
63 exit 1;
66 exit 0;