News for hackers. Stuff that matters.
Re:GNU make insanity: finding the value of the -j parameter by JoshTriplett on Saturday March 28, 2015 @06:43PM (#9283050)

        $ cat Makefile
        test:
        	+env | grep MAKEFLAGS
        $ make -j4 test
        env | grep MAKEFLAGS
        MAKEFLAGS= -j --jobserver-fds=3,4
If you want to act like a sub-make, then parse MAKEFLAGS from your environment, and if you see -j and --jobserver-fds=R,W , then parse R and W as file descriptor numbers, block waiting for a byte from R before starting an additional parallel job, and write a byte to W when done with a parallel job.

There are no comments on this comment yet.