[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
how to reference the directory where current Makefile resides ?
From: |
Yakov Lerner |
Subject: |
how to reference the directory where current Makefile resides ? |
Date: |
Sat, 19 May 2007 10:34:08 +0300 |
How can I reference the directory where the currently executed Makefile
resides (like what $(dirname $0) is in bash ) ?
Here is what I am trying to do:
1. In the same dir of Makefile, there is a "submakefile" that I need to
include ("include submakefile").
2. When my cwd is same where Makefile resides, then no problem:
'include submakefile' works.
3. But when I am in different dir, then make does not find the
submakefile. Is there any builtin variable for the directory of
the current Makefile (like `dirname $0` in shell) ?, so I can write
something line
include $(DIR_OF_MAKEFILE)/submakefile
?
Thanks
Yakov
- how to reference the directory where current Makefile resides ?,
Yakov Lerner <=