yeah, but this code will delete Makefile.target only if you set "TARGET=target" in your makefile.

Do you know a platform called "target"?

this doesn't make sense, hardcoding the variable or passing in the command line is just the same, calling a variable $(TARGET) isn't the same as putting the value "target" inside it.