bugmake - Bugs: bug #46203, Patch to make -j value visible to...

 
 

bug #46203: Patch to make -j value visible to make

Submitter:  Emanuele Santoro <esantoro>
Submitted:  Tue 13 Oct 2015 06:19:44 PM UTC
   
 
Severity:  3 - Normal Item Group:  Enhancement
Status:  Fixed Privacy:  Public
Assigned to:  psmith Open/Closed:  Closed
Component Version:  4.1 Operating System:  Any
Fixed Release:  4.2 Triage Status:  Medium Effort
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 04 Apr 2016 05:52:28 AM UTC, comment #1: 

I decided to do this differently.  Instead of creating a new variable I just modified make to ensure that the -jN flag was present in MAKEFLAGS and N was correct.

You can get the value using something like:

  slots := $(patsubst -j%,%,$(filter -j%,$(MAKEFLAGS)))


This will be in the next release.

Paul D. Smith <psmith>
Group administrator
Tue 13 Oct 2015 06:19:44 PM UTC, original submission:  

Hi!

I implemented a patch for GNU Make providing the value of the -j command line option via the #J variable inside the Makefile (I implemented the #J variable).

It would be lovely to see this patch merged in the main source tree.

Attached is the patch implementing this. I have tested on my laptop (Ubuntu 14.04, x86_64) and the test suite passes:

Regression PASSED: GNU Make 4.1.90 (x86_64-unknown-linux-gnu) built with gcc

I am not 100% sure this is done correctly, it's my first contribution to GNU Make and the first time I am using Savannah.

Please review this patch and tell me if I can improve it in any way for inclusion in the main source tree.

Thanks in advance,
--
Emanuele Santoro

Emanuele Santoro <esantoro>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #35186:  0001-Implemented-J-automatic-variable-for-number-of-concu.patch added by esantoro (3KiB - text/x-patch - The patch implementing the #J variable)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by psmith (Updated the item)
  • -email is unavailable- added by esantoro (Submitted the item)
  •  

    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
    2016-04-04 psmith StatusNone Fixed
        Assigned toNone psmith
        Open/ClosedOpen Closed
        Fixed ReleaseNone 4.2
        Triage StatusNone Medium Effort
    2016-02-29 psmith SummaryPatch Patch to make -j value visible to make
    2015-10-13 esantoro Attached File- Added 0001-Implemented-J-automatic-variable-for-number-of-concu.patch, #35186

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code