On Mon, 2017-12-18 at 17:10 +0100, Gökçe Aydos wrote:
> 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 target?

Because there can only ever be one default goal.  That's just the way
make works: the first target defined in the makefile is the default
goal, so there is only ever one.

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?

_______________________________________________
Help-make mailing list
Help-make@gnu.org
https://lists.gnu.org/mailman/listinfo/help-make

Reply via email to