summaryrefslogtreecommitdiff
path: root/read.c
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@kolpackov.net>2005-11-14 15:31:13 +0000
committerBoris Kolpackov <boris@kolpackov.net>2005-11-14 15:31:13 +0000
commit3dd1faa5c849dbeb59a88653068c010699ce86f7 (patch)
tree8113d5a2f399afe057181e718267fd6d04441897 /read.c
parent82103b1a49394a7063f8cddfc89f759ddf847de9 (diff)
downloadgunmake-3dd1faa5c849dbeb59a88653068c010699ce86f7.tar.gz
Implemented the .INCLUDE_DIRS special variable. It expands to a list
of directories that make searches for included makefiles.
Diffstat (limited to 'read.c')
-rw-r--r--read.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/read.c b/read.c
index 9fbfd35..894bf6f 100644
--- a/read.c
+++ b/read.c
@@ -2917,7 +2917,8 @@ construct_include_path (char **arg_dirs)
dirs[idx] = 0;
- /* Now compute the maximum length of any name in it. */
+ /* Now compute the maximum length of any name in it. Also add each
+ dir to the .INCLUDE_DIRS variable. */
max_incl_len = 0;
for (i = 0; i < idx; ++i)
@@ -2930,6 +2931,10 @@ construct_include_path (char **arg_dirs)
dirs[i] = savestring (dirs[i], len - 1);
if (len > max_incl_len)
max_incl_len = len;
+
+ /* Append to .INCLUDE_DIRS. */
+ do_variable_definition (NILF, ".INCLUDE_DIRS", dirs[i],
+ o_default, f_append, 0);
}
include_directories = dirs;