bug-make
[Top][All Lists]
Advanced

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

[bug #44783] Pattern rule redefinition are silently ignored


From: Paul D. Smith
Subject: [bug #44783] Pattern rule redefinition are silently ignored
Date: Sun, 12 Jul 2015 17:41:54 +0000
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:39.0) Gecko/20100101 Firefox/39.0

Update of bug #44783 (project make):

                  Status:                    None => Not A Bug              
             Open/Closed:                    Open => Closed                 

    _______________________________________________________

Follow-up Comment #1:

It's perfectly acceptable to have two different pattern rules for the same
target and even most, but not exactly, the same prerequisites.  Consider
building a .o file from a .c file, or a .cpp file, or a .f file, etc.  For
prerequisites, sometimes you might require multiple prerequisites, sometimes
only one.

It's true that in the situation you describe the latter rule has no effect
because the first rule will always fire first.  However, make cannot know that
until all the makefiles have been parsed (for example the first rule might be
deleted leaving only the second one).  And in order to determine that after
all makefiles have been parsed, make would have to compare each of the pattern
rules against the rest of the pattern rules to see if there were duplicates.

It should be fairly straightforward to determine when an unexpected rule is
being used, by use of the --trace flag or the --debug flags.

    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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