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
_______________________________________________
Bug-make mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-make