summaryrefslogtreecommitdiff
path: root/read.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@redhat.com>1992-05-03 22:03:26 +0000
committerRoland McGrath <roland@redhat.com>1992-05-03 22:03:26 +0000
commita2032ba51f253d4340b8de9d5f751925c70fe53b (patch)
treedb123484d1d7161f1da42e25df8642f2219be50a /read.c
parentb8d48ad379dcc21ad8787f6529eb7ac8e8a04a41 (diff)
downloadgunmake-a2032ba51f253d4340b8de9d5f751925c70fe53b.tar.gz
Formerly read.c.~29~
Diffstat (limited to 'read.c')
-rw-r--r--read.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/read.c b/read.c
index 0e1cb4e..0b60f77 100644
--- a/read.c
+++ b/read.c
@@ -413,6 +413,40 @@ read_makefile (filename, type)
"Empty `override' directive");
continue;
}
+ else if (word1eq ("export", 6))
+ {
+ struct variable *v;
+ p2 = next_token (p + 6);
+ v = try_variable_definition (p2, o_file);
+ if (v != 0)
+ v->export = 1;
+ else
+ {
+ unsigned int len;
+ for (p = find_next_token (&p2, &len); p != 0;
+ p = find_next_token (&p2, &len))
+ {
+ v = lookup_variable (p, len);
+ if (v == 0)
+ v = define_variable (p, len, "", o_file, 0);
+ v->export = v_export;
+ }
+ }
+ }
+ else if (word1eq ("unexport", 8))
+ {
+ unsigned int len;
+ struct variable *v;
+ p2 = next_token (p + 8);
+ for (p = find_next_token (&p2, &len); p != 0;
+ p = find_next_token (&p2, &len))
+ {
+ v = lookup_variable (p, len);
+ if (v == 0)
+ v = define_variable (p, len, "", o_file, 0);
+ v->export = v_noexport;
+ }
+ }
else if (word1eq ("include", 7))
{
/* We have found an `include' line specifying a nested