Skip to main content

All Questions

Tagged with
-1 votes
1 answer
259 views

Why don’t make check the timestamp when the dependency file is not generated?

I create an ugly Makefile, it worked beyond my expectations. When main.o is not built successfully, the executable is built every time I make. In my opinion, after the main.o target command is ...
chen zhang's user avatar
5 votes
1 answer
6k views

cd in a Makefile doesn't seems to be taken into account after sshfs

I have a Makefile with a sshfs command followed with a cd command: mr: # mount-remote sshfs -p 5022 -o nonempty [email protected]:mnt /home/julien/myworking_path cd ./...
JKHA's user avatar
  • 189
2 votes
1 answer
730 views

Use variable inside of command in Makefile

Let's say the LINK variable contains the following: 1a2b3c. I'd like to display Full path: /home/build/1a2b3c. PWD is currently at /home; I can't get the following to work: @echo "Full path: $(...
Karl Morrison's user avatar
4 votes
2 answers
6k views

Send env to a makefile target

I am trying to set an env var which is git sha1 commit for a makefile target. I am setting a lot of env vars and only this fails with no such file or directory error. I am hell confused. Please help ...
Medhamsh's user avatar
  • 303
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
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
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
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
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
1 vote
2 answers
418 views

Configure Makefile

I am trying to create a file Makefile to use with make so I can compile my codes faster. What I would like to do is just type in the terminal: make dev myOutputName And it should run: gcc -Wall -...
user avatar
4 votes
3 answers
17k views

Diff in bash script?

I've been toying around with makefiles and bash scripts and I'm interested in this: Is it possible to get a boolean value from a diff(or something similar) so that I can use it in a bash script to ...
Gman's user avatar
  • 41
5 votes
2 answers
3k views

Unable to preserve hard links. Why?

I'm trying to create a Makefile that would automate remastering Knoppix distribution. I'm trying to copy filesystem from the read-only compressed loop device to normal filesystem to be able to modify ...
dpc.pw's user avatar
  • 143
1 vote
1 answer
2k views

Problem isolating the environment variable in a shell script

I’m a novice here but stackoverflow has helped me in the past. I’m writing a bash shell script to generate a makefile (starting small). echo "\ include \$(GNUSTEP_MAKEFILES)/common.make APP_NAME = ...
Not Rick Astley's user avatar