fpc/compiler/mppcsparc
2003-02-25 21:41:44 +00:00

24 lines
671 B
Bash

#!/bin/bash
cd "`dirname "$0"`/.."
FPC_SRC_DIR="$PWD"
COMP_DIR="$FPC_SRC_DIR/compiler"
RTL_DIR="$FPC_SRC_DIR/rtl"
INCLUDE_PATH=`echo -Fi"$RTL_DIR"/{unix,linux,sparc,inc,linux/sparc}`
if [[ "$1" == "-B" ]] || [[ "$#" == 0 ]]
then
cd "$COMP_DIR"
fpc fpc -gl -dExtDebug -Fu"sparc;systems" -dSPARC -dNoOpt -dGDB "$1"
fi
if [[ "$#" -gt "0" ]] && ( [[ "$1" != "-B" ]] || [[ "$#" -gt "1" ]] )
then
cd "$FPC_SRC_DIR/tests/sparc"
if [[ "$1" == "-gdb" ]]
then
shift 1
SRC_DIR=`echo "$COMP_DIR/"{,sparc,systems}":"`
gdb -d "$SRC_DIR" --args "$COMP_DIR"/fpc -s -al $INCLUDE_PATH -dSPARC "$@"
else
"$COMP_DIR"/fpc -s -al $INCLUDE_PATH -dSPARC "$@"
fi
fi