help-make
[Top][All Lists]
Advanced

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

Question on targets and goals


From: Jeffrey Walton
Subject: Question on targets and goals
Date: Mon, 8 Aug 2011 06:51:04 -0400

Hi All,

I would like to invoke make with a debug or release configuration, but
without a rule:
    `make debug` or `make release`

Later:

ifeq ($(MAKECMDGOALS),debug)
  CXXFLAGS += -DDEBUG=1 -g3 -ggdb -O0
endif

Because I don't have a rule, I'm getting a make error:
    make: *** No rule to make target `debug'.  Stop.

So I think I've figured out how *not* to do it.

I need to pick up debug or release, then invoke the `all` rule.  Can
anyone suggest a way that works?

Jeff



reply via email to

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