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


_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to