Lets say I want to make a task happen every time a makefile is executed.
As a part of a testcase I want to ensure that no leftovers from a failed test can happen.
I would implement something like:
KILL_PROC := $(shell killall myprocess)
This works fine except when there is no process. Then the app exits with error code 1. Normally I would use a minus in front of the actuall command... but with this syntax it's being intepretted as a different command.
Is there any resolution on this?
-- Henrik
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Lets say I want to make a task happen every time a makefile is executed.
As a part of a testcase I want to ensure that no leftovers from a failed test can happen.
I would implement something like:
KILL_PROC := $(shell killall myprocess)
This works fine except when there is no process. Then the app exits with error code 1. Normally I would use a minus in front of the actuall command... but with this syntax it's being intepretted as a different command.
Is there any resolution on this?
-- Henrik
Hi Henrik,
the behaviour you noticed is incompatible with gmake, and hence should be dropped, transforming the error into a warning. Any objections?
Daniel
Well I don't mind if you want everything to remain compatible with gmake. However it would be useful if there was another way to get the same result.
What would this warning say?
Same message as the old error. Resynch and you've got it.