bugmake - Bugs: bug #51190, make -n does not show exported...


bug #51190: make -n does not show exported variables

Submitted by:  Robert Durkacz <rdurkacz>
Submitted on:  Tue 06 Jun 2017 11:36:42 AM UTC  
Severity: 3 - NormalItem Group: Enhancement
Status: NonePrivacy: Public
Assigned to: NoneOpen/Closed: Open
Component Version: 3.81Operating System: Any
Fixed Release: NoneTriage Status: None

Add a New Comment(Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Tue 06 Jun 2017 11:36:42 AM UTC, original submission:

make -n fails if export is used with recursion by the following argument:

If I run "make some_target" and get an unexpected result, I would do this--
make -n some_target > script
to see what it was make was trying to do. If I run the commands in
"script", one by one or together,
I think I should get the same result as in the original case.
But it turns out not to work properly if "export" is used in the
Makefile. Thus suppose the contents of "script" is--

make target2

and suppose Makefile "exported" var=XXX. Then to give the same result,
"script" really should be--

export var=XXX
make target2

So that is the argument and I am suggesting that if we must have "export" in make, then the
workings of "make -n" should be upgraded to report any exports that
are set up.

Some people who know make very well would consider this to be a enhancement proposal but not a bug fix but users of make like me might reasonably think it axiomatic that make -n when executed as a script should give the same result as make as a job.

Robert Durkacz <rdurkacz>


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

Attach File(s):

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by psmith (Updated the item)
  • -unavailable- added by rdurkacz (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follows 1 latest change.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 23 Jun 2017 01:02:45 AM UTCpsmithSummarymake -n fails if export is used with recursion=>make -n does not show exported variables

    Back to the top

    Powered by Savane 3.1-cleanup1