Specifying path to "makefile" using "make" command

theva

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.

Etan Reisner

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.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

pytest using Makefile and make command

From Dev

Make: command not found when specifying cross compiler path

From Dev

Make command using default target name 'Makefile'

From Dev

Makefile path directory using ~/

From Dev

make command execution from the Makefile

From Dev

How "make" command locates makefile

From Dev

Using Grep Command Without Specifying a Certain Directory

From Dev

Use system command instead of Bash builtin without specifying the full path

From Dev

How to clean object files without using command 'make clean' when compiling with makefile?

From Dev

Make work find pipe awk command in Makefile

From Dev

using path with "*" in unzip command

From Dev

Using devenv.exe from the command line and specifying the platform

From Dev

Using makefile wildcard command for file names with spaces

From Dev

How to make a file executable using Makefile

From Dev

Make: "The system cannot find the path specified" only when compiling with makefile?

From Dev

How can I make a Makefile file target depend on a different path?

From Dev

Specifying file path in Mac

From Dev

fprintf - specifying path

From Dev

how to make the command get proper file path?

From Dev

How can I override flags in my Makefile by modifying the make command

From Dev

Make command doesn't execute but Makefile.am existed

From Dev

make command won't work although makefile exists

From Dev

How to make mod_rewrite redirect properly in a subdirectory without specifying the path?

From Dev

Error when using command 'make'

From Dev

Makefile - a command in a command?

From Dev

Specifying location.path in angularjs

From Dev

Specifying an alternate path for a Haystack template

From Dev

specifying the log path for IE driver

From Dev

Specifying a Shebang path in a shell script

Related Related

  1. 1

    pytest using Makefile and make command

  2. 2

    Make: command not found when specifying cross compiler path

  3. 3

    Make command using default target name 'Makefile'

  4. 4

    Makefile path directory using ~/

  5. 5

    make command execution from the Makefile

  6. 6

    How "make" command locates makefile

  7. 7

    Using Grep Command Without Specifying a Certain Directory

  8. 8

    Use system command instead of Bash builtin without specifying the full path

  9. 9

    How to clean object files without using command 'make clean' when compiling with makefile?

  10. 10

    Make work find pipe awk command in Makefile

  11. 11

    using path with "*" in unzip command

  12. 12

    Using devenv.exe from the command line and specifying the platform

  13. 13

    Using makefile wildcard command for file names with spaces

  14. 14

    How to make a file executable using Makefile

  15. 15

    Make: "The system cannot find the path specified" only when compiling with makefile?

  16. 16

    How can I make a Makefile file target depend on a different path?

  17. 17

    Specifying file path in Mac

  18. 18

    fprintf - specifying path

  19. 19

    how to make the command get proper file path?

  20. 20

    How can I override flags in my Makefile by modifying the make command

  21. 21

    Make command doesn't execute but Makefile.am existed

  22. 22

    make command won't work although makefile exists

  23. 23

    How to make mod_rewrite redirect properly in a subdirectory without specifying the path?

  24. 24

    Error when using command 'make'

  25. 25

    Makefile - a command in a command?

  26. 26

    Specifying location.path in angularjs

  27. 27

    Specifying an alternate path for a Haystack template

  28. 28

    specifying the log path for IE driver

  29. 29

    Specifying a Shebang path in a shell script

HotTag

Archive