Top "Gnu-make" questions

This tag is for questions about `gmake`, the GNU version of the `make` utility to maintain and update programs.

Suppress and ignore output for Makefile?

I know that the @ prefix suppresses output from a shell command in Makefiles, and also that the - prefix will …

makefile gnu-make
Making CMake print commands before executing

I'm working on a large C++ project built with CMake on Linux. CMake runs okay, producing a horde of Makefiles …

linux cmake gnu-make
How to check return value from the shell directive

In my Makefile, I need to test if the current directory is an SVN repo or not and if it …

shell makefile return-value gnu-make
Remove prefix with make

Is there a way to remove a prefix from a string (a pathname in my case) in make? As an …

makefile gnu-make
makefile is missing separator

Alright I am stuck on this and I have no idea what I am doing wrong. Everything was going great …

makefile syntax-error gnu-make
How can I highlight the warning and error lines in the make output?

Sometimes, make's output fills the screen. It's a little bit hard to identify all the warning and error message lines. …

bash shell makefile gnu-make
Parallel make: set -j8 as the default option

I can set number of threads for the build process using -j argument. For example, I have 4 cores +4 virtual. When …

linux makefile build gnu-make parallel-builds
How to get the invoking target of makefile?

How to get the invoking target of the GNU make Makefile? for example, I invoke make with the following command …

makefile gnu gnu-make
Can't assign variable inside recipe

How do I make this work? It errors out with "make: somevariable: Command not found" sometarget: somevariable = somevalue Full example: …

makefile gnu-make
GNU Make pattern to build output in different directory than src

I'm trying to create a Makefile which places my .o files in a different directory than my source files. I'm …

makefile gnu-make