[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Removing make goals
From: |
Werner LEMBERG |
Subject: |
Removing make goals |
Date: |
Sun, 05 Apr 2009 12:49:02 +0200 (CEST) |
Folks,
how can I remove a make goal?
Consider that I have suite of targets `foo-a', `foo-b', ... Normally
I would say, for example,
make foo-a
Now imagine that I want to have a special build with a debug target,
and I want to say
make debug foo-a
The `debug' isn't a real target; I rather test with
.PHONY major
ifneq ($(findstring debug,$(MAKECMDGOALS)),)
...
endif
to set some flags and the like.
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
but it's inelegant IMHO. Is there any better solution? Otherwise I
can imagine a new directive to remove a goal.
Werner
- Removing make goals,
Werner LEMBERG <=