summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authormikesamuel <mikesamuel@ad8eed46-c659-4a31-e19d-951d88f54425>2011-03-10 22:58:05 +0000
committermikesamuel <mikesamuel@ad8eed46-c659-4a31-e19d-951d88f54425>2011-03-10 22:58:05 +0000
commitc40720da9b9b265dd6bb6ba893afd5ec9fe0da10 (patch)
tree2734e237212d719582179901dbb4bc644c16643b /Makefile
parent6d8c2e9241d042a3e0bff40dac4c388966ad060c (diff)
downloadsanitizer-c40720da9b9b265dd6bb6ba893afd5ec9fe0da10.tar.gz
Fixed improper uses of $? in Makefile
git-svn-id: http://owasp-java-html-sanitizer.googlecode.com/svn/trunk@19 ad8eed46-c659-4a31-e19d-951d88f54425
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile17
1 files changed, 11 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 63ec3d7..6c152ca 100644
--- a/Makefile
+++ b/Makefile
@@ -13,24 +13,29 @@ out:
classes: out/classes.tstamp
out/classes.tstamp: out src/main/org/owasp/html/*.java
- javac -g ${JAVAC_FLAGS} -classpath ${CLASSPATH} -d out src/main/org/owasp/html/*.java && touch out/classes.tstamp
+ javac -g ${JAVAC_FLAGS} -classpath ${CLASSPATH} -d out \
+ $$(echo $^ | tr ' ' '\n' | egrep '\.java$$')
+ touch out/classes.tstamp
# Depends on all java files under tests.
tests: out/tests.tstamp out/org/owasp/html/alltests
out/tests.tstamp: out out/classes.tstamp src/tests/org/owasp/html/*.java
- javac -g ${JAVAC_FLAGS} -classpath out:${TEST_CLASSPATH} -d out src/tests/org/owasp/html/*.java
+ javac -g ${JAVAC_FLAGS} -classpath out:${TEST_CLASSPATH} -d out \
+ $$(echo $^ | tr ' ' '\n' | egrep '\.java$$')
touch out/tests.tstamp
out/org/owasp/html/alltests: src/tests/org/owasp/html/*Test.java
- echo $? | tr ' ' '\n' | perl -pe 's#^src/tests/|\.java$$##g; s#/#.#g;' > $@
+ echo $^ | tr ' ' '\n' | perl -pe 's#^src/tests/|\.java$$##g; s#/#.#g;' > $@
runtests: tests
java -classpath out:src/tests:${TEST_CLASSPATH} junit.textui.TestRunner org.owasp.html.AllTests
# Runs findbugs to identify problems.
findbugs: out/findbugs.txt
- cat out/findbugs.txt
+ cat $^
out/findbugs.txt: out/tests.tstamp
- find out/org -type d | xargs tools/findbugs-1.3.9/bin/findbugs -textui -effort:max -auxclasspath ${TEST_CLASSPATH} > out/findbugs.txt
+ find out/org -type d | \
+ xargs tools/findbugs-1.3.9/bin/findbugs -textui -effort:max \
+ -auxclasspath ${TEST_CLASSPATH} > $@
# Runs a benchmark that compares performance.
benchmark: out/tests.tstamp
@@ -52,7 +57,7 @@ out/javadoc.tstamp: src/main/org/owasp/html/*.java
-doctitle 'OWASP Java HTML Sanitizer' \
-header '<a href="http://code.google.com/p/owasp-java-html-sanitizer" target=_top>code.google.com home</a>' \
-J-Xmx250m -nohelp -sourcetab 8 -docencoding UTF-8 -protected \
- -encoding UTF-8 -author -version src/main/org/owasp/html/*.java \
+ -encoding UTF-8 -author -version $^ \
&& touch out/javadoc.tstamp
# Packages the documentation, and libraries in the distrib directory,