]> code.citadel.org Git - citadel.git/commitdiff
General make script for java code
authorChilly <chilly@uncensored.citadel.org>
Wed, 28 Jul 1999 17:59:20 +0000 (17:59 +0000)
committerChilly <chilly@uncensored.citadel.org>
Wed, 28 Jul 1999 17:59:20 +0000 (17:59 +0000)
shaggy/jmake [new file with mode: 0755]

diff --git a/shaggy/jmake b/shaggy/jmake
new file mode 100755 (executable)
index 0000000..e334183
--- /dev/null
@@ -0,0 +1,29 @@
+#!/usr/bin/perl
+
+while( $file = <*.java> ) {
+       $file =~ s/[\r\n]//g;
+
+       $dirty = 0;
+
+       $output = $file;
+       $output =~ s/java$/class/;
+
+       if( -f $output ) {
+               @out = stat( $output );
+               @in = stat( $file );
+               if( $in[9] > $out[9] ) { $dirty = 1; }
+               }
+       else { $dirty = 1; }
+
+       if( $dirty ) {
+               $objs .= " $file";
+               }
+       }
+
+if( $objs ) {
+       print "javac $objs\n";
+       system( "javac $objs" );
+       }
+else {
+       print "Nothing to make\n";
+       }