Fix path for .eva targets
Running make 2048.eva
from the repository root would loop infinitely with make re-calling itself at the same path. This Change should fix this issue.
Merge request reports
Activity
It seems I can't assign people but I can ping @maroneze
assigned to @virgile
@virgile, do you use this specific
%.eva
target yourself? Otherwise I think it could be removed (I don't use it myself, I didn't notice it existed...).Well, at each directory level probably, but not for the global Makefile. It seems to me that the original rule was meant to launch specific analyses, e.g. make 2048/2048.eva, probably in case you have more than one analysis configured in a given directory, e.g.
make miniz/miniz-example3.eva
. Of course, for 2048, you can only domake 2048/2048.eva
, thus it's less useful, and I agree that it is confusing and would deserve at least some documentation if we are to keep it that way.@maroneze, I let you decide what to do here.
Hum, indeed, the old rule allowed things such as
make miniz/.frama-c/miniz-example3.eva
. So you still need to add the.frama-c
(at least I had to, otherwise it didn't do much). The proposed fix will disable that.It seems that if I replace the rule with:
%.eva: .FORCE $(MAKE) -C $(dir $@)/.frama-c $(notdir $@)
This should allow running
make miniz/miniz-example3.eva
, and would preventmake 2048.eva
from accidentally looping.Do you think this would be better? Do you see a use case that my proposed change would break?
You're right, we don't want to type explicitly
.frama-c
on the command line. I'm wondering if this target (as originally written) was ever used. I'm OK with the change, though, but I think that it would be even better to have a proper error message if$(dir @)
is empty, i.e.%.eva: .FORCE $(if $(subst ./,,$(dir $@)),\ $(MAKE) -C $(dir $@)/.frama-c $(notdir $@),\ $(error "Usage: make dir/target.eva"))