[CRIU] [PATCH 1/3] Makefile: implicit default goal

Kir Kolyshkin kir at virtuozzo.com
Wed Oct 5 12:05:03 PDT 2016


On 10/05/2016 12:22 AM, Cyrill Gorcunov wrote:
> On Tue, Oct 04, 2016 at 06:58:51PM -0700, Kir Kolyshkin wrote:
>> Since commit e6dcf46 there is no need to specify the default goal
>> explicitly. The common convention for Makefiles is the first goal
>> that is there is the default one, so most universally there's "all:"
>> goal somewhere at the beginning. Let's do the same thing, moving
>> the "all:" target up and removing the DEFAULT_GOAL.
>>
>> Cc: Cyrill Gorcunov <gorcunov at openvz.org>
>> Signed-off-by: Kir Kolyshkin <kir at openvz.org>
>>   
>> -.DEFAULT_GOAL := all
> You know, I'm not happy with removing explicit default goal.
> This forces to remember that if you add some another target
> earlier it become the main one. I would prefer to keep it
> explicitly.

The thing is, the first goal in Makefile is always the
default one. This is something as obvious as, say,
knowing that static variables are initialized with 0 in C.

Anyway, I agree that explicit is good, so we can move
"all:" to the beginning (expected place), but keep the
DEFAULT_GOAL just for clarity. I'll send a v2 soon.

Thanks,
   Kir


More information about the CRIU mailing list