From b694c274836ac8b04d644711ac324eac2e9ab83e Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Fri, 16 Dec 2005 01:05:40 +0000 Subject: checking in pdp 0.12.4 from http://zwizwa.fartit.com/pd/pdp/pdp-0.12.4.tar.gz svn path=/trunk/externals/pdp/; revision=4232 --- scaf/compiler/scafc | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100755 scaf/compiler/scafc (limited to 'scaf/compiler/scafc') diff --git a/scaf/compiler/scafc b/scaf/compiler/scafc new file mode 100755 index 0000000..ae800e5 --- /dev/null +++ b/scaf/compiler/scafc @@ -0,0 +1,44 @@ +#!/bin/sh +#scaf->scafo compiler + +if test "xx$1" == "xx" +then + echo + echo "scaf rules compiler" + echo "usage:" + echo " scafc source [dest]" + echo + exit 0 +fi + +if test "xx$2" == "xx" +then + DEST=$1o +else + DEST=$2 +fi + +if ! test -f $1 +then + echo "source module $1 not found." + exit 1 +fi + +SCAFDIR=`dirname $0` +if ! test -f $SCAFDIR/scafc.pl; +then + SCAFDIR=`dirname $SCAFDIR` + SCAFDIR="$SCAFDIR/lib/scaf" + if ! test -f $SCAFDIR/scafc.pl + then + echo "scaf library not found in $SCAFDIR" + exit 1 + fi +fi + +TMP_S=`tempfile -s .s` +$SCAFDIR/scafc.pl -I$SCAFDIR $1 > $TMP_S \ +&& gcc -export_dynamic -shared -o $DEST $TMP_S \ +&& strip --strip-unneeded $DEST \ +&& rm $TMP_S \ +|| exit 1 -- cgit v1.2.1