JAVAC=javac #JFLAGS=-classpath . JAVA_CMD=/usr/bin/java %.class : %.java $(JAVAC) $(JFLAGS) $< go: checkstyle Hello.class $(JAVA_CMD) Hello checkstyle: JAVA_CMD=$(JAVA_CMD) checkstyle -c sun_checks.xml Hello.java package-info.java clean: rm -f *.class