Skip to main content

Questions tagged [makefile]

The tag has no usage guidance.

11 votes
1 answer
10k views

How to escape "$@" in a makefile?

test: @echo "#!/bin/bash\njava -classpath \"$(CLASSPATH)\" com.atm.ATM \"$@\"" > test @chmod a+x test I am trying to escape the "$@" so that it literally appears in the "test" script as "$@...
xomm's user avatar
  • 321
-1 votes
1 answer
318 views

Why use RANLIB=echo in a makefile?

I generally have RANLIB=ranlib in a makefile, but I came across makefiles with RANLIB=echo or RANLIB=@echo or RANLIB=echo >/dev/null. I am looking for an explanation for such usages.
Armut's user avatar
  • 101
0 votes
1 answer
2k views

Running scripted commands within a makefile (Linux make)

I have battled with this for the most of last night. I want to rename all the files xxxx-yyyy to xxxx:yyyy in a folder from a makefile. I have a renamefiles.sh which does the job fine: #!/bin/sh ...
Simon H's user avatar
  • 111
2 votes
1 answer
106 views

Understanding a makefile script for Linux

I am using fpgalink fx2 to build on a Windows machine. Here is makefile what is meaning of following script : BRANCH := $(shell TRY=$(CURDIR) BRANCH=dev while [ "$${TRY}" != "$(ROOT)" -a "$${TRY}" !=...
vport's user avatar
  • 31
3 votes
1 answer
2k views

Makefile issues with interactive shells started as a target

Currently having a weird problem: Got a Makefile to get some handy shortcuts inside a Project: shell: docker exec -it $(web) sh ... ..which basically invokes an interactive shell inside a ...
DrSlow's user avatar
  • 51
0 votes
1 answer
1k views

Usage of Bash commands in Nested Loops in Makefile

I want to use bash commands in nested loops in makefile, my current code is not working. Can some one guide me what can be the problem. I have written a simple code in test target. Here, I want to go ...
Umar's user avatar
  • 175
4 votes
1 answer
10k views

Should make contain `-rm` or `rm -f` [closed]

The question should be clear from the title, but here goes. Which is better, or, are there any better options: thing: rm -f a.file b.file doTheMake thing: -rm a.file b.file ...
John Kemeny's user avatar
3 votes
1 answer
14k views

Bash commands in Makefile

I want to use bash commands in Makefile along with MATLAB scripts. Currently when i put a simple bash command in Makefile and run that target, I get error /bin/bash: ./test1: No such file or ...
Umar's user avatar
  • 175
0 votes
0 answers
146 views

Makefile doesn't work with "modules"

I have this makefile of WrapFS. My problem is that make doesn't work when I add "modules" to all part. When I delete "modules", make works, yet doesn't generate wrapfs.ko. WRAPFS_VERSION="0.1" ...
Dalia's user avatar
  • 1
0 votes
0 answers
136 views

What are the -DPOSIX and -DXWINDOWS flags for in Makefiles?

I see -DPOSIX has something to do with POSIX compliancy...which I can kinda get my head around because my program uses a posix library (pthreads) but I can't dig up anything relevant on what -...
Volumetricsteve's user avatar
0 votes
1 answer
1k views

How do I make sure my code is compiling with -o3 in gnu make?

I have a huge Makefile I'm working with and trying to trim down. Right now, it's layed out to build several different programs with tons of options I'll never use. My hope is to first make sure the ...
Volumetricsteve's user avatar
2 votes
1 answer
5k views

Proper syntax for escaping a `$` in a regex in a bash shell script/makefile?

I'm running a Makefile which includes the following line... find ./ -type f -regextype emacs -regex ".*tests$" | xargs rm -f and am getting an error: find ./ -type f -regextype emacs -regex ".*...
iceman's user avatar
  • 361
2 votes
0 answers
151 views

How to add a 'greek' character in the path using cURL?

I have a Makefile where one of many tasks is to upload a file using cURL, one of these files, has a greek character in the name and when I try to upload using cURL, I receive this error: curl: (43) A ...
Jan Cássio's user avatar
2 votes
0 answers
5k views

GCC option : Unrecognized command line

I am trying to build my project with the gcc compiler, but I get this error: gcc: error: unrecognized command line option '-mthumb' Isn't -mthumb a default option for gcc? output of gcc --version:...
Zohra-tl's user avatar
4 votes
0 answers
448 views

How do I write a Makefile target for hundreds of numbered files?

I have some art projects that use blender as part of the toolchain. I would like to be able to write a Makefile target which specifies that several hundred files can be updated with a single command. ...
Mutant Bob's user avatar

15 30 50 per page