File: c.sh.in

package info (click to toggle)
antlr 2.7.7%2Bdfsg-7
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 9,888 kB
  • sloc: java: 54,649; cs: 12,537; makefile: 8,945; cpp: 7,359; pascal: 5,273; sh: 4,337; python: 4,301; lisp: 1,969; xml: 220; lex: 192; ansic: 127
file content (38 lines) | stat: -rwxr-xr-x 1,048 bytes parent folder | download | duplicates (11)
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