bugmake - Bugs: bug #63981, suppress "-jN forced in...

 
 

bug #63981: suppress "-jN forced in submake" warning with -j1

Submitter:  None
Submitted:  Thu 30 Mar 2023 04:03:07 PM UTC
   
 
Severity:  3 - Normal Item Group:  Enhancement
Status:  Fixed Privacy:  Public
Assigned to:  psmith Open/Closed:  Closed
Component Version:  4.4.1 Operating System:  Any
Fixed Release:  SCM Triage Status:  Small Effort
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 02 Apr 2023 02:28:56 PM UTC, comment #1: 

I made this change because of the manual although I'm not exactly sure it's the best idea.

Note that there are better ways to force a makefile to be not parallel; for example you can use:


all:
        $(MAKE) --eval '.NOTPARALLEL:' -f one.mk


which should be enough and is (IMO) clearer.

Paul D. Smith <psmith>
Group administrator
Thu 30 Mar 2023 04:03:07 PM UTC, original submission:  

In a recursive make model there may be a subdirectory which isn't parallel-safe. This can happen particularly when building third-party code which you can't or shouldn't fix. In this case you may want to suppress parallelism in that sub-make by passing -j1 but this results in a warning. The warning makes sense for any -j value >1 but not, I think, with -j1. And the manual seems to agree. It says:

This warning is generated if a recursive invocation of a make process is forced to have ‘-jN’ in its argument list (where N is greater than one).

But even make 4.4.1 prints it with -j1.

Test case:

$ head -50 Makefile one.mk
==> Makefile <==
.PHONY: all
all:
$(info Building $@ in $(lastword $(MAKEFILE_LIST)))
$(MAKE) -j1 -f one.mk

==> one.mk <==
.PHONY: all
all:
$(info Building $@ in $(lastword $(MAKEFILE_LIST)))
@:

$ make-4.4.1 -j12 --no-print
Building all in Makefile
make-4.4.1 -j1 -f one.mk
make-4.4.1[1]: warning: -j1 forced in submake: resetting jobserver mode.
Building all in one.mk

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 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-04-02 psmith StatusNone Fixed
        Assigned toNone psmith
        Open/ClosedOpen Closed
        Component VersionNone 4.4.1
        Operating SystemNone Any
        Fixed ReleaseNone SCM
        Triage StatusNone Small Effort

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code