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?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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:Again, the recursive make is rather smelly, but is your best option in this case.