I have one top level Makefile
. The project has several subdirectories of various depths.
How can I launch make
from any subdirectory, so it uses the top level Makefile, just like git
finds automatically its top-level .git
directory ?
Structure :
/
/a/
/b/c
/Makefile
/Readme
Scenario :
/$ make
... Works ...
/b$ make
... Cannot find makefile
I'd like the 2nd scenario to do the same as the first one.
Hint, it would ideally serve as :make
rule in vi
, but shouldn't be vi-specific
Update: the / is not the root dir, only the root of the project, the real intent is to mimic git