Werner,
On 4/5/2009 4:49 AM, Werner LEMBERG wrote:
Doing so works fine, however, make says something like
nothing to be done for `debug'
Currently, I do
.PHONY major
ifneq ($(findstring debug,$(MAKECMDGOALS)),)
...
debug:
@:
endif
I've dealt with large GNU make files, and this is exactly what we do.
Inelegant it may be, but it solves the problem. The trouble is that
we're really trying to overload the function of a make goal. Instead of
building something called "debug" with a debug goal, we're trying to
define something like a pseudo-goal, which adds functionality to the
real goal - "target".
One way around this would be to define a real goal called
"debug-target", which sets additional flags, and then calls $(MAKE) on
"target" with appropriate debug command line flags. Unfortunately, make
is just flexible enough to allow us to do things with it that were never
originally intended, but not quite flexible enough to have these
extension operations be first-class extensions.
Regards,
John
_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make