1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
|
#!/bin/sh
##xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx##
## This file is part of ANTLR. See LICENSE.txt for licence ##
## details. Written by W. Haefelinger. ##
## ##
## Copyright (C) Wolfgang Haefelinger, 2004 ##
## ##
##xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx##
## This script shall wrap/hide how we are going to run a C/C++
## preprocessor within the ANTLR (www.antlr.org) project.
test -z "${verbose}" && {
verbose=@VERBOSE@
}
## check whether we have something to do ..
if test -z "$1" ; then
exit 0
fi
ARCHFLAGS=
INCLUDE="-I @abs_top_srcdir@/lib/cpp"
DEBUG=
EXTRA_CFLAGS=
C_CMD="@CC@ @CFLAGS@ ${ARCHFLAGS} ${INCLUDE} ${DEBUG} ${EXTRA_CFLAGS} -c"
while test $# -gt 0 ; do
x="$1" ; shift
echo "compiling (C) $x .."
c_cmd="$C_CMD $x"
$c_cmd || {
echo ""
echo "error caught on .."
echo ">>> $c_cmd"
echo ""
exit 1
}
done
|