Skip to content

Instantly share code, notes, and snippets.

@sanmai
Last active October 8, 2022 21:23
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sanmai/dcc31ae20afa6e8ba4721f174fe05fd9 to your computer and use it in GitHub Desktop.
Save sanmai/dcc31ae20afa6e8ba4721f174fe05fd9 to your computer and use it in GitHub Desktop.
Trying to force `--jobs` with GNU Make 4.1
$ make -v
GNU Make 4.1
$ strings /usr/bin/make | grep MAKEOPTS

Outputs nothing. There's no MAKEOPTS.

With a Makefile like below:

$ make
' -j --jobserver-fds=3,4' must have --jobs=8

Only -j gets propagated with no digits whatsoever.

CPUS ?= $(shell nproc)
MAKEFLAGS += --jobs=$(CPUS)
all:
@echo \'$(MAKEFLAGS)\' must have --jobs=$(CPUS)
@sanmai
Copy link
Author

sanmai commented Feb 22, 2018

So GNU Make 4.2.1 rolled into Sid some days ago.

$ make
' -j8' must have --jobs=8
$ make -v
GNU Make 4.2.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment