I wanted to write a minimal Makefile with two targets:
target1 target2:
echo $@
clean:
rm $(.DEFAULT_GOAL)
I noticed that .DEFAULT_GOAL [1] supports only one target name, so I
have to define a separate target with target{1,2} as prerequisites.
Why does .DEFAULT_GOAL support only one
Quoting Paul Smith:
I don't quite understand what you're trying to do here. Why do you
always want to delete the single default goal, regardless of what was
built?
You are right Paul, the clean recipe does not make sense anymore—it
only removes target1. I thought I can use .DEFAULT_GOAL to