Questions tagged [gnu-make]

GNU Make is the GNU project's implementation of the `make` utility. On BSD systems, the GNU Make executable is sometimes called `gmake` to differentiate it from BSD Make.

14 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
2
votes
0answers
765 views

Is there an automatic translator from Makefile to CMakeLists.txt?

I have several inherited projects - on RHEL 7, part of which are created using make, and the rest are utilising cmake. I'm wondering: is there an automatic translator that will take a Makefile as ...
2
votes
0answers
109 views

How to check if a target will be run?

I know that the variable MAKECMDGOALS In GNU Make will contain the names of final goals for the run, i.e. the targets included on the command line. However I'd like to check if a target will be made, ...
1
vote
0answers
23 views

Pattern-specific make variable based on the highest level target name

Goal In the usual case of a target (mother target) calling another target (child target) as prerequisite, I'd like to assign a pattern-specific variable (see the manual page) with the following ...
1
vote
0answers
238 views

Compiling Octave: how to add a new item to the include directories for Qt?

Situation My distro is Ubuntu 14.04. I am installing Octave 4.2.1. I have a shell script doing this for me using GNU make. Octave is in search of Qt libraries. I wish to use the Qt5 5.8 binaries ...
1
vote
0answers
327 views

PHP 7.1.2 cannot Gmake : Zend Error

I use Solaris 11.3 Sparc 64 bit, Mysql Enterprise Advance 5.7.1, Apache 2.4.25 and PHP 7.1.2 I configure PHP with following parameter. export CC="gcc -m64" export CFLAGS="-std=gnu99" ./configure --...
1
vote
0answers
245 views

How to compile dcp2icc?

After trying for hours I am unable to compile dcp2icc-0.1 on Linux. With a simple Makefile added to the original code it fails as follows: g++ -o build/XMP/source/XMPCore/ExpatAdapter.o -c -O2 -...
0
votes
2answers
31 views

If function in Makefile seems to disregard conditional and executes unexpectedly

The following is a simple recipe that is not behaving as I want it to: $(eval PkgName := $(shell pacman -Qq zsh | awk '{print $$1}')) $(if ifeq ($(strip ${PkgName}),), pacman -Sy --noconfirm zsh) All ...
0
votes
0answers
37 views

How do the two identical targets in a Makefile work?

I have a Makefile that has two identical targets, one for mkdir and the other for cp. The Makefile creates dir when it does not exist, and then copy files. I wonder how it works. As I know, Makefile ...
0
votes
0answers
34 views

Makefile and lazy loading env file

What I want to do ? Load an env file in "lazy" loading like this: $ cat env.int X=file $ make toto X=file $ X=env make toto X=env What I got ? I've got a env-file env.int like this: X=file ...
0
votes
0answers
21 views

Induction in makefile

Can I make a recipe where a file named 3 has 2 as a prerequisite. 2 has 1 as a prerequisite. And 1 has no prerequisite? Something like 1: touch 1 n: n - 1 touch n
0
votes
0answers
118 views

Custom error message in GNU make if required but not otherwise?

In GNU's make is it possible to print a custom error message instead of GNU's default one, possibly with the line number as well? I am fine with make's default behavior in all other scenarios. Here ...
0
votes
0answers
142 views

Use variables in Makefile recipe

Consider this Makefile: DIRS = foo bar baz ADIRSGLOBAL = $(addprefix A, $(DIRS)) all: $(DIRS) $(DIRS): ADIR=$(addprefix A, $@) @echo $(addprefix A, $@) @echo "ADIR="$(ADIR) ...
0
votes
1answer
2k views

Simple shell loop fail in Makefile

Why does the shell loop l='abc de f'; for k in $l ;{ echo $k; } inside Makefile not work ? instead only give abc de f at once How to solve such in the definitive way?
0
votes
1answer
555 views

GNU Make4.1 Segmentation Fault

During a make check after compiling GNU Make-4.1, the following error occurs. make[2]: Entering directory '/mnt/lfs/sources/make-4.1' cd tests && perl ./run_make_tests.pl -srcdir /mnt/lfs/...