mirror of
https://git.savannah.gnu.org/git/make.git
synced 2025-02-05 14:07:46 +00:00
Formerly main.c.~103~
This commit is contained in:
parent
4f752036ac
commit
65b8056203
1 changed files with 20 additions and 16 deletions
36
main.c
36
main.c
|
@ -1493,6 +1493,7 @@ define_makeflags (all, makefile)
|
||||||
{
|
{
|
||||||
register const struct command_switch *cs;
|
register const struct command_switch *cs;
|
||||||
char *flagstring;
|
char *flagstring;
|
||||||
|
struct variable *v;
|
||||||
|
|
||||||
/* We will construct a linked list of `struct flag's describing
|
/* We will construct a linked list of `struct flag's describing
|
||||||
all the flags which need to go in MAKEFLAGS. Then, once we
|
all the flags which need to go in MAKEFLAGS. Then, once we
|
||||||
|
@ -1662,22 +1663,25 @@ define_makeflags (all, makefile)
|
||||||
*p = '\0';
|
*p = '\0';
|
||||||
}
|
}
|
||||||
|
|
||||||
define_variable ("MAKEFLAGS", 9,
|
v = define_variable ("MAKEFLAGS", 9,
|
||||||
/* On Sun, the value of MFLAGS starts with a `-' but
|
/* On Sun, the value of MFLAGS starts with a `-' but
|
||||||
the value of MAKEFLAGS lacks the `-'.
|
the value of MAKEFLAGS lacks the `-'.
|
||||||
Be compatible with this unless FLAGSTRING starts
|
Be compatible with this unless FLAGSTRING starts
|
||||||
with a long option `--foo', since removing the
|
with a long option `--foo', since removing the
|
||||||
first dash would result in the bogus `-foo'. */
|
first dash would result in the bogus `-foo'. */
|
||||||
flagstring[1] == '-' ? flagstring : &flagstring[1],
|
flagstring[1] == '-' ? flagstring : &flagstring[1],
|
||||||
/* This used to use o_env, but that lost when a
|
/* This used to use o_env, but that lost when a
|
||||||
makefile defined MAKEFLAGS. Makefiles set
|
makefile defined MAKEFLAGS. Makefiles set
|
||||||
MAKEFLAGS to add switches, but we still want
|
MAKEFLAGS to add switches, but we still want
|
||||||
to redefine its value with the full set of
|
to redefine its value with the full set of
|
||||||
switches. Of course, an override or command
|
switches. Of course, an override or command
|
||||||
definition will still take precedence. */
|
definition will still take precedence. */
|
||||||
o_file, 0)
|
o_file, 0);
|
||||||
/* Always export MAKEFLAGS. */
|
if (! all)
|
||||||
->export = v_export;
|
/* 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
|
/* Since MFLAGS is not parsed for flags, there is no reason to
|
||||||
override any makefile redefinition. */
|
override any makefile redefinition. */
|
||||||
(void) define_variable ("MFLAGS", 6, flagstring, o_env, 0);
|
(void) define_variable ("MFLAGS", 6, flagstring, o_env, 0);
|
||||||
|
|
Loading…
Reference in a new issue