#!/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## test -z "$1" && exit 0 ## This script shall wrap/hide how we are going to link C++ ## object files within the ANTLR (www.antlr.org) project. CXX="g++" CXXFLAGS="" LIBNAME="/usr/neuro/local/yao/yao9/share/antlr-2.7.7/lib/cpp/src/libantlr.a" TARGET="$1" ; shift ##xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx## ## Prepate input arguments ## ##xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx## case "linux-gnu" in cygwin) ARGV="`cygpath -m ${*}`" test -n "${TARGET}" && { TARGET=`cygpath -m ${TARGET}` } test -n "${LIBNAME}" && { LIBNAME="`cygpath -m ${LIBNAME}`" } ;; *) ARGV="${*}" ;; esac # RK: Disabled it strips -l arguments #L="${ARGV}" ; ARGV="" #for x in $L ; do # if test -f "${x}" ; then # ARGV="$ARGV ${x}" # fi #done #unset L if test -z "${ARGV}" ; then cat < append content of LDFLAGS to precomputed flags ## '-' -> prepend content -*- ## '=' -> do not use precomputed flags ## If none of these characters are given, the behaviour will ## be the same as if "=" would have been given. set x ${LDFLAGS} ; shift case $1 in +) shift LDFLAGS="${ldflags} $*" ;; -) shift LDFLAGS="$* ${ldflags}" ;; =) shift LDFLAGS="$*" ;; *) if test -z "$1" ; then LDFLAGS="${ldflags}" else LDFLAGS="$*" fi ;; esac ## Any special treatment goes here .. case "${ld}" in ld) ;; *) ;; esac ##%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%## ## No c u s t o m i z a t i o n below this line ## ##%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%## test -z "${verbose}" && { verbose=0 } ##xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx## ## This shall be the command to be excuted below ## ##xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx## cmd="${LD} ${LDFLAGS} ${ARGV}" ##xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx## ## standard template to execute a command ## ##xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx## case "${verbose}" in 0|no|nein|non) echo "*** creating ${TARGET} .." ;; *) echo $cmd ;; esac $cmd || { rc=$? cat <> E R R O R << ============================================================ $cmd ============================================================ Got an error while trying to execute command above. Error messages (if any) must have shown before. The exit code was: exit($rc) xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx EOF exit $rc } exit 0