bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC] .NOT_DEFAULT: target


From: Noel Yap
Subject: Re: [RFC] .NOT_DEFAULT: target
Date: Mon, 17 May 2004 19:49:38 -0400
User-agent: Mozilla Thunderbird 0.5 (Windows/20040212)

Boris Kolpackov wrote:

Alternatively, if you have a makefile which is always included at the
top (say your bootstrap.make file) you can put the "all" target in that
file as the first thing:

Now you are forcing user to use the same name for default target which is
not always acceptable (well, at least not in my case).

I do exactly this.  Unless the user wants to use the default target name 
("default" in my case) for their own purposes, I see no problem with this.  
They can always do something like:

        default: my-own-default

in their makefiles.

If you /really/ want to make this open, you can use a macro (again, so long as 
they don't use the same macro).

Mm.  I don't know about this.  It seems like it's the wrong way
around... if what you want to have is the default target, why have
people declare everything that _cannot_ be the default?  Why not just
declare what _IS_ the default?

A few thoughts:


- .NOT_DEFAULT is meant for the build system developers, not "people" ;-). Now GNU make has powerful enough inclusions/scripting mechanisms that
     make "generic" build systems possible. There are however features
     that are still <makefile-is-one-big-file>-minded. "Default target is
     first target" is one of them.

   - Default target is the choice of a user makefile not the build system.
     So default target is most likely going to be specified in a user
makefile. Putting it in other words, targets declared by the build system should not be default. That's why we may want a mechanism to express that.

I feel the best mechanism to express that would be for the client makefile to say what it 
wants the default target to be.  Yes, one can consider this to be "messy".

IMHO, I don't like the "first target is the default target" rule, but it's 
something we have to live with.  Given this, it's up to the build system developers to 
specify what the default target is as part of their contract to the users.

MTC,
Noel




reply via email to

[Prev in Thread] Current Thread [Next in Thread]