bug-make
[Top][All Lists]
Advanced

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

[bug #51306] Checking programming possibilities around “MAKECMDGOALS”


From: Paul D. Smith
Subject: [bug #51306] Checking programming possibilities around “MAKECMDGOALS”
Date: Sun, 2 Jul 2017 13:18:17 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0

Update of bug #51306 (project make):

              Item Group:                     Bug => Documentation          

    _______________________________________________________

Follow-up Comment #1:

The same way you'd check for a word in any other list of words, in GNU make:


sources = foo.c bar.c

ifeq (,$(filter clean,$(MAKECMDGOALS)))
include $(sources:.c=.d)
endif


will only include the files if "clean" doesn't appear anywhere in
MAKECMDGOALS.

However, I'm not sure that this is the correct behavior.  Suppose someone used
"make clean all"; now none of the dependency files will be included for the
"all" target.

I'll leave this open as a Doc bug to determine whether the example needs to be
reworked.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?51306>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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