@ -12,25 +12,24 @@ ANALYZER = crashcontext
SOURCES = $( wildcard *.java)
SOURCES = $( wildcard *.java)
OBJECTS = $( patsubst %.java,%.class,$( SOURCES) )
OBJECTS = $( patsubst %.java,%.class,$( SOURCES) )
EXP_TESTs = $( sort $( patsubst %.java,%.exp.test,$( SOURCES) ) )
EXP_TESTs = $( sort $( patsubst %.java,%.exp.test.noreplace ,$( SOURCES) ) )
INFER_OUTs = $( patsubst %.java,infer-out-%,$( SOURCES) )
INFER_OUTs = $( patsubst %.java,infer-out-%,$( SOURCES) )
$(OBJECTS) : $( SOURCES )
$(OBJECTS) : $( SOURCES )
javac -cp $( CLASSPATH) $( SOURCES)
javac -cp $( CLASSPATH) $( SOURCES)
# analyze a single source file and generate the test results for it
# analyze a single source file and generate the test results for it
%.exp.test : $( INFER_BIN ) %.stacktrace .json %.java
%.exp.test .noreplace: $( JAVA_DEPS ) %.stacktrace .json %.java
$( call silent_on_success,\
$( call silent_on_success,\
$( INFER_BIN) -a $( ANALYZER) -o infer-out-$* --stacktrace $* .stacktrace.json \
$( INFER_BIN) -a $( ANALYZER) -o infer-out-$* --stacktrace $* .stacktrace.json \
-- javac -cp $( CLASSPATH) $* .java)
-- javac -cp $( CLASSPATH) $* .java)
# add a newline at the end of the json when creating the exp.test
# add a newline at the end of the json when creating the exp.test
bash -c 'cat infer-out-$*/crashcontext/crashcontext.json <(echo) > $*.exp.test'
$( COPY) infer-out-$* /crashcontext/crashcontext.json $@ && echo >> $@
# combine the test results for all the source files
# combine the test results for all the source files
issues.exp.test : $( EXP_TESTs )
issues.exp.test : $( EXP_TESTs )
cat $( EXP_TESTs) > issues.exp.test
cat $( EXP_TESTs) > issues.exp.test
default : compile
default : compile
.PHONY : compile
.PHONY : compile