diff options
author | Roland McGrath <roland@redhat.com> | 1993-12-16 20:10:36 +0000 |
---|---|---|
committer | Roland McGrath <roland@redhat.com> | 1993-12-16 20:10:36 +0000 |
commit | 65b80562036bd9e72cdecf3c4c63d16d92cacee3 (patch) | |
tree | 92e92f2d472c92c7e09647ea2dd4a5c48531c27b | |
parent | 4f752036acd358448667df93950af4a02650fce5 (diff) | |
download | make-65b80562036bd9e72cdecf3c4c63d16d92cacee3.tar.gz |
Formerly main.c.~103~
-rw-r--r-- | main.c | 36 |
1 files changed, 20 insertions, 16 deletions
@@ -1493,6 +1493,7 @@ define_makeflags (all, makefile) { register const struct command_switch *cs; char *flagstring; + struct variable *v; /* We will construct a linked list of `struct flag's describing all the flags which need to go in MAKEFLAGS. Then, once we @@ -1662,22 +1663,25 @@ define_makeflags (all, makefile) *p = '\0'; } - define_variable ("MAKEFLAGS", 9, - /* On Sun, the value of MFLAGS starts with a `-' but - the value of MAKEFLAGS lacks the `-'. - Be compatible with this unless FLAGSTRING starts - with a long option `--foo', since removing the - first dash would result in the bogus `-foo'. */ - flagstring[1] == '-' ? flagstring : &flagstring[1], - /* This used to use o_env, but that lost when a - makefile defined MAKEFLAGS. Makefiles set - MAKEFLAGS to add switches, but we still want - to redefine its value with the full set of - switches. Of course, an override or command - definition will still take precedence. */ - o_file, 0) - /* Always export MAKEFLAGS. */ - ->export = v_export; + v = define_variable ("MAKEFLAGS", 9, + /* On Sun, the value of MFLAGS starts with a `-' but + the value of MAKEFLAGS lacks the `-'. + Be compatible with this unless FLAGSTRING starts + with a long option `--foo', since removing the + first dash would result in the bogus `-foo'. */ + flagstring[1] == '-' ? flagstring : &flagstring[1], + /* This used to use o_env, but that lost when a + makefile defined MAKEFLAGS. Makefiles set + MAKEFLAGS to add switches, but we still want + to redefine its value with the full set of + switches. Of course, an override or command + definition will still take precedence. */ + o_file, 0); + if (! all) + /* The first time we are called, set MAKEFLAGS to always be exported. + We should not do this again on the second call, because that is + after reading makefiles which might have done `unexport MAKEFLAGS'. */ + v->export = v_export; /* Since MFLAGS is not parsed for flags, there is no reason to override any makefile redefinition. */ (void) define_variable ("MFLAGS", 6, flagstring, o_env, 0); |