my build system insists on executing make with all the targets in one call, so i get:
make clean test clean build
the second clean will just say "Nothing to be done for `clean'." even though it's added to the .PHONY target.
any way around that?
Yuk! Do not do this. Do not rely on implicit ordering of targets—it changes completely when you use make -j
. Make your ordering explicit. If you really must clean between builds, then something like:
.PHONY: everything
everything:
${MAKE} clean
${MAKE} test
${MAKE} clean
${MAKE} build
Again, the recursive make is rather smelly, but is your best option in this case.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With