The tag has no usage guidance, but it has a tag wiki.

learn more… | top users | synonyms

0
votes
1answer
28 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 ...
0
votes
1answer
47 views

Recursive Make passing targets in OS X

I am trying to write a recursive clean target for GNU Makefile on OS X (GNU Make 3.81 - from XCode). Following GNU Make documentation, I came up with the following: Main Makefile ...
0
votes
1answer
25 views

Why is echo not working for mt valgrind command?

So I have my makefile working great, except that It doesn't create the valgrind.out file and I don't know why. So the console succesfully prints out that my executable file line is created but not ...
1
vote
2answers
68 views

Check in bash if make has done something

I'm calling make from a bash script. Part of the rest of the script only needs to be executed if make actually did something (i.e. it doesn't say nothing to be done for...). How would I check on ...
0
votes
0answers
13 views

Show “input files” that Make will use

I want to find all the source files that are used for a GNU Make build. At first I thought I therefore wanted to list all the prerequisites, but actually I don't think that's right, because for a ...
1
vote
2answers
455 views

Why does make stop with “Makefile:6: *** multiple target patterns. Stop.”?

Goal I write my slides in a markdown file and compile it to reveal afterwards, uploading it to my webserver and do other things. I wanted to organise the steps after the markdown is written in a ...
2
votes
2answers
60 views

How to prevent Make from randomly overriding files?

Suppose I am in an empty directory. If I now create a Makefile containing nothing but all: randomFilename and an empty file called randomFilename.sh, then GNU Make will perform cat randomFilename.sh ...
1
vote
1answer
43 views

Latexmk, from Makefile, from bash script, from Cron - Latexmk not being executed

I have several Git repositories with LaTeX files that I want to have typeset automatically. The idea is to have a central bash script (run by a cronjob) that executes a bash script in every ...
1
vote
1answer
118 views

Percentage symbol in $(shell) in GNU Makefile dependency

I am aware of LatexMk, but can't install that on the machine where I want to run pdflatex, so I need to write a Makefile of which %.pdf files are targets that depend on %.tex and the *.tex files that ...
3
votes
2answers
161 views

Make target with two words

I'm using a Makefile to compile my Clean code. My Clean files have file names of the format *.icl and are compiled to binaries with the same name but without .icl. This is done with the rule: $(EXE): ...
3
votes
1answer
51 views

Is there a way to disable recursive make?

If I have a makefile I have to use that is using recursive make, is there an easy option to disable that? http://aegis.sourceforge.net/auug97.pdf
0
votes
1answer
59 views

'pkglibexecdir' is not a legitimate directory

I'm following some outdated instructions in an attempt to compile some proprietary, closed-source, unsupported, legacy code. Here is what a typical shell session looks like: $ autoreconf -fi ...
1
vote
1answer
33 views

What is the order order-only prerequisites are processed in a GNU Make file?

I've been reading the documentation but it's still unclear to me how the order is processed. In the example: myrule: | myrule_step1 myrule_step2 @echo "$(@)" myrule_step1: @echo "$(@)" ...
1
vote
2answers
35 views

How to tell whether GNU make is being used in a makefile?

I know GNU Make is by far the most commonly used, but I'm looking for a way to verify that GNU Make is the actual make program that is being used. Is there a special variable I can print from within ...
1
vote
4answers
95 views

Using environment variables for shorter recipes in GNU Make

I would like recipes in GNU Make to use environment variables instead of command line arguments, to make them shorter, so that I can concentrate better on what changes in each command. For example, ...
2
votes
1answer
291 views

GNU Make does not ignore failed command

I have written a rule where a directory should be removed if it exists: .PHONY: distclean distclean: -rmdir release make distclean prints: rmdir release rmdir: failed to remove ‘release’: No ...
0
votes
1answer
72 views

Why gmake fails if vpath points to current directory

Why this doesn't work? If I remove VPATH or set it to '.' - all fine. Empty dir, a.cpp, b.cpp exist before running. VPATH=./. dir/lib.a: dir/a.o dir/b.o touch $@ x: touch x dir/%.o: ...
3
votes
1answer
60 views

Target-specific make variables

How can I force a target-specific variable to be set immediately (line 2)? I want the output of make to be release and make debug to be debug. X = release debug: X = debug debug: all # the rest is ...
6
votes
3answers
7k views

Don't stop make'ing if a command fails, but check exit status

I am trying to instruct GNU Make 3.81 to not stop if a command fails (so I prefix the command with -) but I also want to check the exit status on the next command and print a more informative message. ...
1
vote
0answers
100 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 ...
2
votes
1answer
284 views

Restricting GNU‑Make to POSIX Make behaviour

Is there a known way to make Linux's make reject unintended use of GNU‑Make specific extensions in Makefile when editing or using other's Makefile in Linux? I mean, restricting GNU‑Make to behave as ...
2
votes
1answer
633 views

What does make[number] mean in make V=s?

When I enable make V=s to read the full log of make. I always see make[numer] in the log. e.g: datle@debian:~/workspace/cpx/trunk$ make rm -rf openwrt/tmp cp config/defaut.config openwrt/.config cd ...
7
votes
4answers
169 views

How can I get gmake to give me a list of all included makefiles?

I've inherited a major mess of a makefile network that was itself inherited from another project, with makefiles included all over the place. I'm trying to make a simple change without gutting the ...
0
votes
1answer
184 views

Building Snapwm on FreeBSD (Problem of gcc and clang)?

According to FreeBSD, from version 10 they use Clang/LLVM instead of gcc. on the surface of it all things should perform as been before even better. but I have faced this reality more than I want to. ...
2
votes
2answers
3k views

How to make OpenWrt Makefile compile faster?

I have recorded that it took 50 minutes for an initial compilation of the OpenWrt firmware image, assuming all the necessary packages have been installed via sudo apt-get install. My BuildRoot Root ...
5
votes
1answer
447 views

Strange behavior automating with “make -f”

I have a set of directories, some of which contain makefiles, and some of the makefiles have clean targets. In the parent directory, I have a simple script: #!/bin/bash for f in *; do if [[ ...
0
votes
1answer
1k views

/bin/sh: ./check-dependencies.pl: not found — but check-dependencies.pl exists!

I'm trying to build Moses, but when I run make I get the following output: minakshi@minakshi-Vostro-3500:~/Desktop/working-dir/moses/scripts$ make release # Compile the parts make all make[1]: ...
3
votes
3answers
308 views

How to list prerequisites externally in GNU Make?

How can I query prerequisites of a target from a GNU Make makefile? E.g. if the targets specified like this: fred: wilma barney betty I want to print prerequisites of fred like this: $ make ...
13
votes
2answers
39k views

Where can I find a list of 'make' error codes?

I am trying to compile a program written in Fortran using make (I have a Makefile and, while in the directory containing the Makefile, I type the command $ make target, where "target" is a ...
1
vote
1answer
83 views

What do I install into a given install prefix

Which directories should I expect to have in an install prefix when I'm writing makefiles? I've noticed that in the common prefix /usr, there is no /etc, yet there is an /include dir, which isn't in ...