All Questions
13
questions
-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 ...
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 ./...
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: $(...
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 ...
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 "$@...
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
...
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 ...
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 ...
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 ".*...
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 -...
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 ...
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 ...
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 = ...