bugmake - Bugs: bug #45486, .ONESHELL:, -n option...


bug #45486: .ONESHELL:, -n option (--print-only) and the $(MAKE) variable

Submitted by:  None
Submitted on:  Tue 07 Jul 2015 06:47:12 AM UTC  
Severity:  3 - Normal Item Group:  Bug
Status:  Not A Bug Privacy:  Public
Assigned to:  None Open/Closed:  Closed
Component Version:  3.81 Operating System:  None
Fixed Release:  None Triage Status:  None

Add a New Comment (Rich Markup)

You are not logged in

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


Sun 12 Jul 2015 09:37:05 PM UTC, comment #2: 

I'm going to close this for now.  Feel free to add another comment if you'd like to discuss it further.

Paul D. Smith <psmith>
Project Administrator
Tue 07 Jul 2015 12:23:13 PM UTC, comment #1: 

.ONESHELL causes all the recipe lines to be invoked with a single shell.  It would be directly contradictory (and in fact would often fail) to run only some of the recipe lines but not others in the face of .ONESHELL.

For example, people often use .ONESHELL so they don't need to worry about backslashes, like this:

        $(MAKE) FLAGS="$$args"

It would be wrong for make to only run the recipe in the second line when -n is given.

I'm not sure I see what behaviour you are expecting to get in your example.

Paul D. Smith <psmith>
Project Administrator
Tue 07 Jul 2015 06:47:12 AM UTC, original submission:  

.ONESHELL: causes an occurence of $(MAKE) in any recipe line to undo the effect of the -n option (--print-only) on all recipe lines. I do not believe that is correct behavior.

Please see attached Makefile for example and more details.



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

Attach Files:

Attached Files
file #34389:  Makefile.debug-print-only added by None (2KiB - application/octet-stream)


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)

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

    Only logged-in users can vote.




    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-07-12 psmith StatusNone => Not A Bug
        Open/ClosedOpen => Closed
    2015-07-07 None Attached File- => Added Makefile.debug-print-only, #34389

    Back to the top

    Powered by Savane 3.5