Questions tagged [makefile]
The makefile tag has no usage guidance.
85
questions
549
votes
14
answers
527k
views
How do I make rm not give an error if a file doesn't exist?
I'm writing a makefile that will clean up some useless files at the end of the compilation. If a target has already been made, it will of course skip that target and the useless file may not be there....
83
votes
5
answers
128k
views
How to run make file from any directory?
In order to run make file, I am supposed to go to the make file's directory and from there only I can run the make file. How can I do the same even if i am in any directory?
29
votes
3
answers
28k
views
How to setup vim to edit both Makefile and normal code files with two different types of indentation?
I am using Mac OSX 10.7.5, the contents of .vimrc is as follow:
set tabstop=4
set shiftwidth=4
set softtabstop=4
set expandtab
set shiftround
set smarttab
set autoindent
set copyindent
...
12
votes
4
answers
79k
views
How to use makefiles on Windows
I have a LaTeX project using make files for compilation and want to write the texts on Windows using Kile.
I had a quick look on google but only really came up with Make for Windows the last version ...
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 "$@...
9
votes
2
answers
8k
views
Makefile fails to install file correctly, installing HPL
I started installing HPL a while ago and had a related question. I've been following along with this guide from Intel. I figure this warrants a whole new one. When I try to make the archive, the ...
7
votes
2
answers
5k
views
For simple projects, what do makefiles offer over "plain" bash scripts?
For example, if I'm developing a front-end only website, I might have several CoffeeScript files, several Sass files, several HTML Files, and a few images.
The CoffeeScript files need to be compiled ...
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 ./...
5
votes
1
answer
9k
views
Install R 3.5.2 under Ubuntu: "jni.h: No such file or directory"
I have a problem with installing the newest version of R, an error "fatal error: jni.h: No such file or directory" that I don't understand appeared.
Here is what I did before getting an error in the ...
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 ...
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 ...
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
...
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 ...
4
votes
1
answer
1k
views
Use matlab in makefiles etc. How to speed things up?
I use a lot of matlab to process data etc. Yet I find my workflow a bit of sluggish, so I was wondering if I could speed things up a little using makefiles.
What I would like to do is write an .m ...
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. ...