tags:

views:

737

answers:

2

I have a Makefile in:

project/all_app/myapp/src/Makefile

I also have a master Depend.mk in

project/Depend.mk

Can I include the main Makefile by using the relative path?

include ../../../../Depend.mk
+1  A: 

The rules for include in make are a little bit complex - see this section of the GNU make manual. But yes - you can do what you asked.

anon
A: 

Be warned that make's include starts at pwd, not the path to the Makefile. (so make -f will probably cause problems)

jrr