1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-01 22:05:08 +00:00
freebsd-ports/lang/o2c/files/o2
Thomas Gellekum 96446f840c New port o2c, an Oberon-2 compiler.
PR:		5273
Submitted by:	Oliver Breuninger <ob@seicom.NET>
1998-06-12 12:08:09 +00:00

47 lines
752 B
Tcsh

#! /bin/csh
if ( $#argv == 0 ) goto usage
if ( $1 == "--make" ) goto make
if ( $1 == "-m" ) goto make
compile:
#
# compile files, check extension
#
if ( $1 == "-c" ) then
set file = $2
else
set file = $1
endif
echo Extension $file:e
if ( $file:e != "Mod" ) then
set file = $file".Mod"
endif
echo compiling $file "..."
o2c $file | o2ef | more
goto end
make:
#
# make Oberon program, remove Extension
#
echo making $2:r $3:r $4:r $5:r $6:r "..."
o2c --make $2:r $3:r $4:r $5:r $6:r
goto end
usage:
#
# show a litle help
#
echo ""
echo " o2 [option] File "
echo ""
echo " option: "
echo " --make make Project "
echo " -m make Project "
echo " -c (default) compile Module "
echo ""
end: