bugmake - Bugs: bug #13401, MAKEFILES indirect include...

 
 

bug #13401: MAKEFILES indirect include incorrectly supplies default goal

Submitter:  None
Submitted:  Tue 14 Jun 2005 03:08:58 PM UTC
   
 
Severity:  3 - Normal Item Group:  Bug
Status:  Fixed Privacy:  Public
Assigned to:  psmith Open/Closed:  Closed
Component Version:  3.80 Operating System:  POSIX-Based
Fixed Release:  3.82 Triage Status:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 13 Jun 2009 11:10:11 PM UTC, comment #1: 

Fixed.  Thanks.

Paul D. Smith <psmith>
Group administrator
Tue 14 Jun 2005 03:08:58 PM UTC, original submission:  

The documentation for the MAKEFILES variable says "the default goal is never
taken from one of these makefiles". The set of makefiles described below
demonstrate that if a file in MAKEFILES includes another file which contains a
goal definition, that goal gets used as the default goal. While the
documentation for MAKEFILES doesn't explicitly discuss this situation, I think
the present behavior is certainly contrary to reasonable expectations.

To test, create separate files from the makefiles described below, all in a
single directory, and invoke make in that directory. The goal called
indirect_goal from include_bug_indirect.mk will be run, printing the message

  "MAKEFILES indirectly included goal used as default."

The expected (and I believe correct behavior) is to instead run the all goal
from include_bug_recurse.mk, printing the message

  "This should be the default goal."

The makefiles are:

---------- Makefile ----------
all: ; $(MAKE) -f include_bug_recurse.mk MAKEFILES=include_bug_include.mk

---------- include_bug_recurse.mk ----------
all: ; @echo This should be the default goal.

---------- include_bug_indirect.mk ----------
.PHONY: indirect_goal
indirect_goal: ; @echo MAKEFILES indirectly included goal used as default.

---------- include_bug_include.mk ----------
include include_bug_indirect.mk

---------- (end of makefiles) ----------

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by psmith (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-07-28 psmith Fixed Release4.0 3.82
    2009-06-13 psmith StatusNone Fixed
        Assigned toNone psmith
        Open/ClosedOpen Closed
        Fixed ReleaseNone 4.0

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code