From d74227e0ddb78f4534ae37cb05e9134192ccef8c Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Thu, 10 Mar 2011 22:22:59 +0000 Subject: Added rules for building java classes and jar files. --- share/autoinclude/general-rules.bld | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'share/autoinclude') diff --git a/share/autoinclude/general-rules.bld b/share/autoinclude/general-rules.bld index 0b8f6e3..9110401 100644 --- a/share/autoinclude/general-rules.bld +++ b/share/autoinclude/general-rules.bld @@ -127,3 +127,27 @@ rule "flex" execute("${FLEX} ${FLEXFLAGS} ${INPUT}"); } } + +rule "jar" +{ + input "*.class"; + profile "build" + { + if exists(OUTPUT) then + { + unlink(OUTPUT); + } + execute("jar cvf ${OUTPUT} ${INPUT}"); + } +} + +rule "class" +{ + input "*.java"; + output INPUT.regex("\\.java", ".class"); + profile "build" + { + execute("javac -cp . ${INPUT}"); + } +} + -- cgit v1.2.3