I would like to run a makefile from another place in the file system. How do I pass the location of the makefile to make?
if I stand in "/" and I would like to run a makefile that resists in "/dir/dir2/dir3/makefile", how do I add that to the make command?
I tried:
make --file=dir/dir2/dir3/makefile
but it did not worked.
All relative paths in the makefile will be relative to your current directory and not the directory of the makefile.
Assuming that you understand that and what you want to do is still going to work then you want the -f
flag to specify the makefile to use. (Which is in the man page, the manual and the --help
output.)
If, instead, what you mean is you want to cd
to somewhere else and run make then perhaps you are looking for (cd /some/path && make)
?
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments