Permalink
Browse files

directly compile to output dir

  • Loading branch information...
1 parent b029c15 commit 9e373b76066f8d69c3285781476261cf61c52514 @steveschnepp steveschnepp committed Jul 22, 2012
Showing with 9 additions and 5 deletions.
  1. +8 −4 Makefile
  2. +1 −1 Makefile.config
View
12 Makefile
@@ -47,7 +47,7 @@ PODMAN5 := build/master/doc/munin.conf node/doc/munin-node.conf
default: build
.java.class:
- cd plugins/javalib && $(JC) $(JFLAGS) $(subst plugins/javalib/,,$*.java)
+ $(JC) -sourcepath plugins/javalib -d build/plugins/javalib $(JFLAGS) plugins/javalib/$(subst plugins/javalib/,,$*.java)
uninstall:
echo "Uninstall is not implemented yet"
@@ -313,9 +313,12 @@ build-plugins-java: build/plugins/javalib/munin-jmx-plugins.jar
build/plugins/javalib/munin-jmx-plugins.jar: $(CLASSFILES)
cd build/plugins/javalib && $(JAR) cf munin-jmx-plugins.jar org/munin/plugin/jmx
-build/%.class: %.class
- mkdir -p build/`dirname $*.class`
- cp $**.class build/`dirname $*.class`
+build-java-stamp:
+ mkdir -p build/plugins/javalib
+ touch build-java-stamp
+
+build/%.class: %.class build-java-stamp
+ @echo "Compiling $*"
######################################################################
# DIST RULES
@@ -364,6 +367,7 @@ endif
-rm -f build-stamp
-rm -f build-doc-stamp
-rm -f build-man-stamp
+ -rm -f build-java-stamp
-rm -rf t/install
-rm -f dists/redhat/munin.spec
View
2 Makefile.config
@@ -156,7 +156,7 @@ CHGRP := chgrp
# Java compiler stuff - only needed on the buildhost
JC := javac
-JFLAGS := -g -source 1.5 -target 1.5
+JFLAGS := -g -source 1.5 -target 1.5 -Xlint
JAR := jar
# Check if the java compiler works

0 comments on commit 9e373b7

Please sign in to comment.