Menu

[r976]: / Gcc  Maximize  Restore  History

Download this file

47 lines (40 with data), 1.8 kB

#!/bin/bash
# A loader to enable easy running of the Vector Pascal Compiler

# If you want to set the path to mmpcdir in this file, uncomment the line below
# mmpcdir=/path/to/mmpcdir

if [ $# == 0 ]; then
	echo -e "Usage: Gcc [SOURCE] [OPTIONS...] "
	exit 1
fi

# Try to cope with $mmpcdir not being set
if [ -z $mmpcdir ]; then
	if [ -f $MMPCDIR/mmpc.jar ]; then
			mmpcdir=$MMPCDIR
	elif [ -f `dirname $0`/mmpc.jar ]; then
		if ! [ $OSTYPE == "cygwin" ]; then
		# Cygwin will use a little weird paths (/cygdrive/c/path/to/mmpc) which java
		# can't understand
			mmpcdir=`dirname $0`
		fi
	elif [ -f `pwd`/mmpc.jar ]; then
		mmpcdir=`pwd`
	else
		echo -e "ERROR: Environment variable \"\$mmpcdir\" is not defined and couldn't be found.\nTo define it use \"export mmpcdir=/path/to/mmpc\""
		exit 2;
	fi
elif ! [ -f $mmpcdir/mmpc.jar ]; then
	echo -e "ERROR: \"\$mmpcdir\" does not contain the file mmpc.jar, required for execution\n\$mmpcdir is currently \"$mmpcdir\"\n Possibly try reinstalling to fix the problem"
	exit 2
fi

if [ $OSTYPE ==  "linux-gnu"  ]
then
#	echo  java -Xss60m -Xmx250m -Dmmpcdir=$mmpcdir -cp $mmpcdir/mmpc.jar ilcg.C.CCompiler $1 -felf -o$1   -opt0  $2 $3 $4 $5
	      java -Xss60m -Xmx450m -Dmmpcdir=$mmpcdir -cp $mmpcdir/mmpc.jar:$CLASSPATH ilcg.C.CCompiler $1    $2 $3 $4 $5 $6

elif [ $OSTYPE ==  "linux"  ]
then
#	echo  java -Xmx250m -Xss50m -Dmmpcdir=$mmpcdir -cp $mmpcdir/mmpc.jar ilcg.C.CCompiler $1 -felf -o$1   -opt0  $2 $3 $4 $5
	      java -Xmx450m -Xss50m -Dmmpcdir=$mmpcdir -cp $mmpcdir/mmpc.jar:CLASSPATH ilcg.C.CCompiler $1   $2 $3 $4 $5 $6
else

#	echo java -Xmx250m ilcg.C.CCompiler $1 -felf -U -o$1 -opt1 -cpugnuP4  $2 $3 $4 $5
	     java -Xmx450m -Dmmpcdir=$mmpcdir ilcg.C.CCompiler $1   $2 $3 $4 $5 $6
fi
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.