[12607] in Athena Bugs

home help back first fref pref prev next nref lref last post

New suncc script...

daemon@ATHENA.MIT.EDU (Theodore Ts'o)
Thu Sep 15 11:56:12 1994

Date: Thu, 15 Sep 1994 11:56:05 +0500
From: Theodore Ts'o <tytso@MIT.EDU>
To: alexp@MIT.EDU
Cc: bugs@MIT.EDU

Hey Alex,

	Here's a new suncc script.  The current one has the problem that
command line arguments with embedded spaces and quotes in them, such as:

	suncc -DCMD_PATH='"/bin /local/bin"' hueristic.c

lose because the shell interpretes the quoting characters twice, and so
the wrong arguments get passed to the C compiler.

	I've fixed the problem the way I fixed it for the cygnus gcc
script --- by rewriting it in perl.  Could you take a look at it, and if
you like it, install it in /mit/sunsoft/sun4bin/suncc?  Thanks!

						- Ted

#!/usr/athena/bin/perl

# This script sets environment variables needed by suncc and runs it.

$LOCKERNAME = "sunsoft";

if (! -d ("/mit/" . $LOCKERNAME)) {
	system("attach ${LOCKERNAME} > /dev/null");
}

$sunbase="/mit/sunsoft/sunwspro";

$ENV{"LD_LIBRARY_PATH"} = "${sunbase}/SC2.0.1:/usr/openwin/lib";
$ENV{"LM_LICENSE_FILE"} = "${sunbase}/SunTech_License/license.dat";
$ENV{"SUNPRO_SB_EX_FILE_NAME"} = "${sunbase}/SC2.0.1/lib/sun_source_brower.ex";

exec("${sunbase}/bin/cc", @ARGV) || die "Can't run ${sunbase}/bin/cc: $!\n";



home help back first fref pref prev next nref lref last post