Skip to content
Snippets Groups Projects
Commit 01bc9ad3 authored by Virgile Prevosto's avatar Virgile Prevosto
Browse files

[fc-scripts] use AST_DIFF variable to trigger incremental analysis in Eva

updating parsing results is irrelevant
parent 1fbc38d4
No related branches found
No related tags found
No related merge requests found
...@@ -162,9 +162,6 @@ SHELL := $(shell which bash) ...@@ -162,9 +162,6 @@ SHELL := $(shell which bash)
%.parse: SOURCES = $(filter-out %/command,$^) %.parse: SOURCES = $(filter-out %/command,$^)
%.parse: PARSE = $(FRAMAC) \ %.parse: PARSE = $(FRAMAC) \
$(if $(AST_DIFF),\
$(if $(wildcard $@/framac.sav $*.eva/framac.sav),\
-load $@/framac.reparse -then -no-eva -ast-diff,),) \
$(FCFLAGS) \ $(FCFLAGS) \
$(if $(value MACHDEP),-machdep $(MACHDEP),) \ $(if $(value MACHDEP),-machdep $(MACHDEP),) \
-cpp-extra-args="$(CPPFLAGS)" $(SOURCES) \ -cpp-extra-args="$(CPPFLAGS)" $(SOURCES) \
...@@ -199,7 +196,14 @@ SHELL := $(shell which bash) ...@@ -199,7 +196,14 @@ SHELL := $(shell which bash)
mv $@/{running,command} mv $@/{running,command}
touch $@ # Update timestamp and prevent remake if nothing changes touch $@ # Update timestamp and prevent remake if nothing changes
%.eva: EVA = $(FRAMAC) $(FCFLAGS) -eva $(EVAFLAGS) define incremental
$(if $(AST_DIFF),\
$(if $(wildcard $@/framac.sav),\
-eva-load $@/framac.sav,\
$(warning Cannot do incremental analysis: no previously saved state)))
endef
%.eva: EVA = $(FRAMAC) $(FCFLAGS) -eva $(call incremental,$1) $(EVAFLAGS)
%.eva: PARSE_RESULT = $(word 1,$(subst ., ,$*)).parse %.eva: PARSE_RESULT = $(word 1,$(subst ., ,$*)).parse
%.eva: $$(PARSE_RESULT) $$(shell $(SHELL) $(DIR)cmd-dep.sh $$@/command $$(EVA)) $(if $(BENCHMARK),.FORCE,) %.eva: $$(PARSE_RESULT) $$(shell $(SHELL) $(DIR)cmd-dep.sh $$@/command $$(EVA)) $(if $(BENCHMARK),.FORCE,)
@$(call display_command,$(EVA)) @$(call display_command,$(EVA))
...@@ -208,7 +212,7 @@ SHELL := $(shell which bash) ...@@ -208,7 +212,7 @@ SHELL := $(shell which bash)
{ {
$(call time_with_output,$@/stats.txt) \ $(call time_with_output,$@/stats.txt) \
$(EVA) \ $(EVA) \
-load $(PARSE_RESULT)/framac.sav -save $@/framac.sav \ -load $(PARSE_RESULT)/framac.sav \
-eva-flamegraph $@/flamegraph.txt \ -eva-flamegraph $@/flamegraph.txt \
-kernel-log w:$@/warnings.log \ -kernel-log w:$@/warnings.log \
-from-log w:$@/warnings.log \ -from-log w:$@/warnings.log \
...@@ -216,6 +220,8 @@ SHELL := $(shell which bash) ...@@ -216,6 +220,8 @@ SHELL := $(shell which bash)
-scope-log w:$@/warnings.log \ -scope-log w:$@/warnings.log \
-eva-log w:$@/warnings.log \ -eva-log w:$@/warnings.log \
-then \ -then \
-remove-projects @all_but_current -save $@/framac.sav \
-then \
-report-csv $@/alarms.csv -report-no-proven \ -report-csv $@/alarms.csv -report-no-proven \
-report-log w:$@/warnings.log \ -report-log w:$@/warnings.log \
-metrics-eva-cover \ -metrics-eva-cover \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment