Questions tagged [gnu-make]

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

GNU Make is the GNU implementation of the Make utility. It is probably the most common version in use today.

GNU Make supports extensions to the Make language beyond the POSIX standard, therefore GNU Make solutions may not work under other versions, so the gnu-make tag is appropriate for questions from those using GNU Make, or pertaining to makefiles written for it.

Documentation

The latest GNU Make manual can be found in several formats here.

See also

make makefile

4424 questions
1
vote
1 answer

Makefile with sed throwing *** target pattern contains no '%'. Stop

I have a Makefile in which I need to pass an image name to another script but the issue is, Image Name has : and - in its line for eg: image.name-v1:latest. As per google make file having : in variable causes issue. How to resolve this issue in…
Saurabh Arora
  • 377
  • 2
  • 4
  • 11
1
vote
0 answers

Header file not found while using soong build Android.bp in AOSP

I am trying to build my HAL implementation and service using Android.bp Soong build. Even though the build process is successful with Android.mk, after converting this Android.mk file into Android.bp, the build process is failed with the error as…
hugtech
  • 877
  • 3
  • 11
  • 16
1
vote
1 answer

How can I include a dependency file generated by a custom command in cmake for GNU make?

I have integrated a tool that generates some code from a text file in CMake based build environment. This tool is also able to generate the dependency file in the GNU make format (pretty much like gcc -MD does it for c files). I would like to…
Louis Caron
  • 1,043
  • 1
  • 11
  • 17
1
vote
1 answer

Makefile sometimes ignores variable in recipe

I have the following Makefile CXX = g++ CXXFLAGS = -g -Wall COMPILE = ${CXX} ${CXXFLAGS} -c LINK = ${CXX} -lpthread LIB_INC = -Ilib -Iwrappers -Iprocesses src := $(wildcard lib/*.cpp) $(wildcard wrappers/*.cpp) obj = $(src:.cpp=.o) src_1 :=…
simon
  • 41
  • 3
1
vote
1 answer

Why does this simple Makefile go into an infinite loop?

The command "make clean" causes this simple Makefile to go into an infinite loop, spawning process after process, if the directory m1 does not exist: clean-1: cd m1; make clean clean: clean-1 I guess I'm doing something wrong with…
bob.sacamento
  • 6,283
  • 10
  • 56
  • 115
1
vote
0 answers

cloning / compiling with msys shell , some files appear "\#include "xyz.h"

I am cloning/compiling some gstreamer repos within msys64 shell , for example : git clone git://anongit.freedesktop.org/git/gstreamer/gst-plugins-base && cd gst-plugins-base && git checkout 1.16.1 After compiling with make, something strange happens…
Mohammad Kanan
  • 4,452
  • 10
  • 23
  • 47
1
vote
1 answer

How can I append my git commit to my bin within makefile?

I am trying to create a rule within a make file to read a git commit and append into the name of a binary, so far I am struggling with the fact that the variable that will hold the commit seems to be empty, append_git_commit: $(preName)/FLASH.bin …
ndarkness
  • 1,011
  • 2
  • 16
  • 36
1
vote
1 answer

Why is my GNUMakefile ignored during micropython build?

I'm trying to compile micropython for the ESP32. ( git@github.com:micropython/micropython.git and git@github.com:espressif/esp-idf.git) in micropython/ports/esp32/GNUMakefile I have variables defined like so: #PYTHON2 = $(shell…
1
vote
1 answer

Get GNU makefile targets from command

I use the following code to get a makefile targets list which works OK for most cases, however when you use makefile like this you get only two targets and not all. cat Makefile command: ## Command description @echo "Execution…
NSS
  • 755
  • 1
  • 11
  • 30
1
vote
1 answer

Trying to install SDL Perl on Windows 10, problems with "make" (and "dmake" and "gmake")

I am using Windows 10 and Strawberry Perl. I found this nice tutorial on building a 3D engine in Perl. Which requires SDL. For a couple of days I've been trying to install it, but it doesn't work. First I tried via CPAN, no success. No I am trying…
1
vote
2 answers

Makefile won't assign variable values in `ifeq` statement within function definition

I'm trying to assign a value to a variable in make when a condition is met, inside a function: Without $() around the ifeq statements: VARIABLE=true define test_ifeq FOO := foo ifeq (${VARIABLE}, true) FOO := true else …
Neil
  • 24,551
  • 15
  • 60
  • 81
1
vote
0 answers

Use IntelliJ and Java installed on Windows, but "make" command on WSL2

I am currently using the Windows 10 20H1 (build 19041.153) with WSL2 enabled. I have already configured git in WSL2 and managed to clone the repository to my C:/ drive. I have the oracle Java 8 installed on Windows and what I want to achieve is to…
1
vote
1 answer

make dependencies: skip vendor and package headers with gcc?

I'm starting a new project and thinking of using gcc 6.3.1 -MM to generate the dependencies into a file called Make.Dep, that I'll include from Makefile. The -M option outputs all headers, including system headers. The -MM option doesn't output…
Swiss Frank
  • 1,985
  • 15
  • 33
1
vote
0 answers

"Nonrepresentable section on output" when compiling GCC

I'm trying to compile the GCC from source with module-TS support and I cloned to the devel branch (as stated here) : git clone --branch devel/c++-modules git://gcc.gnu.org/git/gcc.git SRCDIR Here's my configuration options : ./configure…
Parsa Mousavi
  • 1,052
  • 1
  • 13
  • 31
1
vote
2 answers

Using bash arithmetic expansion in GNU makefile

I would like to use bash's arithmetic expansion for binary operations in a Makefile (GNU make + bash on Debian). These are not covered by expr. I need this in a Makefile: $ x=$(( 255 & 2#11110000)); echo $x 240 Things that don't work: $ cat…
Volker Stolz
  • 7,274
  • 1
  • 32
  • 50
1 2 3
99
100