GNU make 4.3 Is Released

From LinuxReviews
Jump to navigationJump to search
Black-and-white-gnu-head.png

The GNU project has very quietly released a major update to the make utility used to compile the vast majority of free software programs. It has been almost four years since make 4.2 was released in May 2016. The latest version supports specifying a -j job number in Makefiles, the job limit under Windows has been raised from 63 to 4095 and support for newer versions of the GNU libc and musl C runtime libraries is added.

written by Öyvind Sæther  2020-01-22 - last edited 2020-01-22. © CC BY

Gnu.jpg
GNU provides free software so you can have true freedom when you are using computers.

New versions of GNU make are rare these days. GNU make has, after all, been around since 1988. There is only so much room for improvement in a utility which determines what pieces of a large program - like the Linux kernel - should be compiled.

There are two backwards-incompatible changes in GNU make 4.3. Number signs (#) inside macro references or function invocations are no longer interpreted as being comments which means that number signs that are escaped with backslahses resolve to \# - not just # as they previously did. That could cause some problems in existing makefiles. foo := $(shell echo '\#') used to mean #, now it means \#.

+= is also changed in a backwards-incompatible way. Make 4.3 will only add a space when += is used if the variable it is used on exists. Using += on a non-existing variable would previously create a variable starting with a space.

GNU make 4.3 has new grouped explicit targets for generating multiple targets in a single invocation.

GNU make 4.3 allows developers to set a MAKEFLAGS variable specifying what -j job number should be used. This kind of makes sense in a day and age when very few people compile software on a single core computer. Most of us are probably running make -j$(nproc) when we compile so all cores and threads are utilized most of the time. But that is not always the case. Sometimes you want to do other things while you compile.

Some what related, make's -jN job process limit under Microsoft Windows has been raised from 63 to 4095 jobs.

A new --no-silent option is added in case you want to override any -s/--silent/--quiet flag imposed in a Makefile.

Lastly, GNU make 4.3 can interoperate with newer GNU libc and musl C runtime libraries.

GNU make 4.3 can be downloaded from ftp.gnu.org/gnu/make/.

0.00
(0 votes)


avatar

Anonymous (5b72d448)

21 months ago
Score 0++

In an article on phoronix, I read that GNU Make 4.3 can speed up GNU/Linux builds greatly.

As a result, I updated and released the fork of that I have which includes hooks to profile a build, and has a complete debugger in it (although most of the time the better tracing that is in there is enough).

The most recent version has a feature though that I really like and use a lot which is adding an option to look in parent directories for a Makefile if none is found in the current directory.

You can download the sourcecode from either sourceforge or from github. Both have a full list of the release notes.
avatar

Anonymous (22d0812ce6)

3 months ago
Score 0

I have just tested the option --no-silence advertised on this page with the new GNU Make 4.3 and it does not seem to has any effect.

$ cat Makefile .SILENT:

all: echo foo > /dev/null

$ make --no-silent $

Nothing happened just like the option was not given at all.

And I expected "echo foo > /dev/null" to be written on standard output like if the ".SILENT:" rules was not written on the first line of the Makefile.

Am I wrong in my expectation ?
Add your comment
LinuxReviews welcomes all comments. If you do not want to be anonymous, register or log in. It is free.