From 3dd1faa5c849dbeb59a88653068c010699ce86f7 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 14 Nov 2005 15:31:13 +0000 Subject: Implemented the .INCLUDE_DIRS special variable. It expands to a list of directories that make searches for included makefiles. --- read.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'read.c') 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; -- cgit v1.2.3