summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authormikesamuel <mikesamuel@ad8eed46-c659-4a31-e19d-951d88f54425>2011-03-09 05:21:50 +0000
committermikesamuel <mikesamuel@ad8eed46-c659-4a31-e19d-951d88f54425>2011-03-09 05:21:50 +0000
commit4e867904c8295537803c1c8a076e130df5674b58 (patch)
tree6268b9f269d4895c4bf0ec50098e5b4a17156be1 /Makefile
parent842e0c01e15abedc786372c113579385e36473ab (diff)
downloadsanitizer-4e867904c8295537803c1c8a076e130df5674b58.tar.gz
Revamped to use a policy builder pattern instead of requiring people to write their own policies.
git-svn-id: http://owasp-java-html-sanitizer.googlecode.com/svn/trunk@9 ad8eed46-c659-4a31-e19d-951d88f54425
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile26
1 files changed, 22 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 0a19318..cc1837d 100644
--- a/Makefile
+++ b/Makefile
@@ -3,7 +3,7 @@ TEST_CLASSPATH=lib/guava-libraries/guava.jar:lib/htmlparser-1.3/htmlparser-1.3.j
JAVAC_FLAGS=-source 1.5 -target 1.5 -Xlint
-default: tests
+default: tests javadoc findbugs
clean:
rm -rf out
@@ -13,16 +13,34 @@ out:
classes: out/classes.tstamp
out/classes.tstamp: out src/main/org/owasp/html/*.java
- javac ${JAVAC_FLAGS} -classpath ${CLASSPATH} -d out src/main/org/owasp/html/*.java && touch out/classes.tstamp
+ javac -g ${JAVAC_FLAGS} -classpath ${CLASSPATH} -d out src/main/org/owasp/html/*.java && touch out/classes.tstamp
# Depends on all java files under tests.
tests: out/tests.tstamp
out/tests.tstamp: out out/classes.tstamp src/tests/org/owasp/html/*.java
- javac ${JAVAC_FLAGS} -classpath out:${TEST_CLASSPATH} -d out src/tests/org/owasp/html/*.java && touch out/tests.tstamp
+ javac -g ${JAVAC_FLAGS} -classpath out:${TEST_CLASSPATH} -d out src/tests/org/owasp/html/*.java && touch out/tests.tstamp
+
+findbugs: out/findbugs.txt
+ cat out/findbugs.txt
+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
benchmark: out/tests.tstamp
java -cp ${TEST_CLASSPATH}:out org.owasp.html.Benchmark benchmark-data/Yahoo\!.html
profile: out/java.hprof.txt
out/java.hprof.txt: out/tests.tstamp
- java -cp ${TEST_CLASSPATH}:out -agentlib:hprof=cpu=times,format=a,file=out/java.hprof.txt,lineno=y,doe=y org.owasp.html.Benchmark benchmark-data/Yahoo\!.html
+ java -cp ${TEST_CLASSPATH}:out -agentlib:hprof=cpu=times,format=a,file=out/java.hprof.txt,lineno=y,doe=y org.owasp.html.Benchmark benchmark-data/Yahoo\!.html s
+
+javadoc: out/javadoc.tstamp
+out/javadoc.tstamp: src/main/org/owasp/html/*.java
+ mkdir -p out/javadoc
+ javadoc -locale en -d out/javadoc \
+ -classpath ${CLASSPATH} \
+ -use -splitIndex \
+ -windowtitle 'OWASP Java HTML Sanitizer' \
+ -doctitle 'OWASP Java HTML Sanitizer' \
+ -header '<a href="http://code.google.com/p/owasp-java-html-sanitizer">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 \
+ && touch out/javadoc.tstamp