[6286] in java-interest
a script to compile
daemon@ATHENA.MIT.EDU (Todd E. Gee)
Thu Mar 28 15:29:25 1996
Date: Wed, 20 Mar 1996 10:44:17 -0500
Reply-To: Java Interest <JAVA-INTEREST@JAVASOFT.COM>
From: "Todd E. Gee" <tgee@EECS.UMICH.EDU>
To: Multiple recipients of list JAVA-INTEREST
<JAVA-INTEREST@JAVASOFT.COM>
I wrote this simple csh script to compile all the .java files in the
current directory.
It's simpler than a make file and never needs updating. My usual drill is
to have all my development .java files in the current directory and then,
when I have one that's ready to "freeze", I move it to somewhere else in
my CLASSPATH.
Anyway, here it is,
Todd
tgee@umich.edu
----- Begin Include -----
#
# A java compile script.
#
# will compile all .java programs in current directory if the .class
# file doesn't exist or the .java file is newer....
# Java options:
set jopt = '-g'
foreach file (*.java)
unset comp
if (-e $file:r.class) then
# class file exists
set a = `ls -t -1 $file:r.java $file:r.class | head -1`
if ($a == $file:r.java) then
set comp
endif
else
# class file doesn't exist -- compile...
set comp
endif
if ($?comp) then
echo compiling $file
javac $jopt $file
endif
end
------ End Include ------
Why do I use csh rather than tcl or perl? I'm twisted. %-)
-----
This message has been forwarded via the JAVA-INTEREST
mailing list. In order to unsubscribe from this list, send a message to
listserv@javasoft.com with the command 'signoff JAVA-INTEREST' in
the message body (not in the subject line).
-----
This message has been forwarded via the JAVA-INTEREST
mailing list. In order to unsubscribe from this list, send a message to
listserv@javasoft.com with the command 'signoff JAVA-INTEREST' in
the message body (not in the subject line).