After years of not using make, I find myself needing it again, the gnu version now. I'm pretty sure I should be able to do what I want, but haven't figured out how, or found an answer with Google, etc.
I'm trying to create a test target which will execute my program a number of times, saving the results in a log file. Some tests should cause my program to abort. Unfortunately, my makefile aborts on the first test which leads to an error. I have something like:
# Makefile
#
test:
myProg -h > test.log # Display help
myProg good_input >> test.log # should run fine
myProg bad_input1 >> test.log # Error 1
myProg bad_input2 >> test.log # Error 2
With the above, make quits after the bad_input1 run, never getting to the bad_input2 run.
in | a | piped | sequence, the last one determines the exit code;a; more; involved; recipe; line;suffers from the same problem; without jumping through a lot of hurdles, running the same thing repeatedly with different parameters can be annoying to script. I've typically opted for scripting my tests, then if necessary use it from a makefile. - Brian Vandenbergset -ein bash can make it possible to error out when a command fails similar to make recipe lines. - Brian Vandenberg