Specifically I’m thinking of a “clean” rule to remove leftover files.
files=file1 file2
clean:
rm -f $(files)
file1: file1dependancy.o
How can I make clean automatically rm -f file1dependancy.o or is that even possible?
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.
Normally, the structure of the makefile would look something like:
Depending on your version of
make, there might be a macro for ‘all the dependencies’; it isn’t inPOSIX make, though.