[Top][All Lists]

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

[bug #26596] MAKEFLAGS documentation tweak

From: anonymous
Subject: [bug #26596] MAKEFLAGS documentation tweak
Date: Sun, 17 May 2009 00:01:34 +0000
User-agent: Mozilla/5.0 (X11; U; OpenBSD i386; en-US; rv: Gecko/2009050322 Firefox/3.0.10


                 Summary: MAKEFLAGS documentation tweak
                 Project: make
            Submitted by: None
            Submitted on: Sun 17 May 2009 12:01:32 AM UTC
                Severity: 3 - Normal
              Item Group: Enhancement
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
       Component Version: 3.81
        Operating System: Any
           Fixed Release: None



Right now, the value of MAKEFLAGS varies during the processing.  For
immediate expansion, its value doesn't include any options that have
arguments, nor does it include variable assignments.  Later, during deferred
expansion, its value is recalculated to include those.  My guess is that this
was done to avoid false positives when testing for flags, however it should be
documented, preferably on the "Conditionals that Test Flags" page, so that
someone wanting to test for the presence of -j can deduce that they need to do
it in the commands using $(if) instead of using an ifeq/ifneq directive.

(There's probably no sane way to provide a MAKEFLAGS that includes options
with arguments without also including their options.  The best I can figure
would be to put the option argument values (and internal options like
--jobserver-fds) into their own hidden variables and reference those from
MAKEFLAGS.  I.e., this command:
   make -I"My Desktop/include" -nw -j3

would result in the equivalent of
 *1* = --jobserver-fds=3,4
 *2* = "My Desktop/include"
 MAKEFLAGS = wn ${*1*} -j -I ${*2*}

that would permit safe flag testing, even during deferred expansion, by using
$(findstring) against this:
  $(if $(filter --,$(value MAKEFLAGS)),$(filter-out -- $(lastword $(value

But I doubt anyone actually cares enough about the possibility of false
positives against $(MAKEOVERRIDES) or the .POSIX equivalent to actually bother
with that...)

Philip Guenther


Reply to this item at:


  Message sent via/by Savannah

reply via email to

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