source: trunk/yao/share/antlr-2.7.7/scripts/c.sh @ 28

Last change on this file since 28 was 28, checked in by lnalod, 15 years ago

Update of the YAO generator code and ANTLR source code for the compatibility with Mandriva 2009 and 2010. These distributions have an another version of the gcc compiler and this not allowed a correct compilation of the old sources.

  • Property svn:eol-style set to native
File size: 1.1 KB
Line 
1#!/bin/sh
2##xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx##
3## This file is part of ANTLR. See LICENSE.txt for licence  ##
4## details. Written by W. Haefelinger.                      ##
5##                                                          ##
6##       Copyright (C) Wolfgang Haefelinger, 2004           ##
7##                                                          ##
8##xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx##
9## This script shall wrap/hide how we are going to run a C/C++
10## preprocessor within the ANTLR (www.antlr.org) project.
11test -z "${verbose}" && {
12  verbose=0
13}
14
15## check whether we have something to do ..
16if test -z "$1" ; then
17  exit 0
18fi
19
20ARCHFLAGS=
21INCLUDE="-I /home/lnalod/tmp/svnYAO2009-11-12/trunk/yao/share/antlr-2.7.7/scripts/../lib/cpp"
22DEBUG=
23EXTRA_CFLAGS=
24
25C_CMD="cc -g -O2 ${ARCHFLAGS} ${INCLUDE} ${DEBUG} ${EXTRA_CFLAGS} -c"
26
27while test $# -gt 0 ; do
28  x="$1" ; shift
29  echo "compiling (C) $x .."
30  c_cmd="$C_CMD $x"
31  $c_cmd || {
32    echo ""
33    echo "error caught on .."
34    echo ">>> $c_cmd"
35    echo ""
36    exit 1
37  }
38done
Note: See TracBrowser for help on using the repository browser.