diff options
Diffstat (limited to 'usr.bin/make/main.c')
-rw-r--r-- | usr.bin/make/main.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/usr.bin/make/main.c b/usr.bin/make/main.c index b835586..284cfe2 100644 --- a/usr.bin/make/main.c +++ b/usr.bin/make/main.c @@ -355,9 +355,14 @@ rearg: while((c = getopt(argc, argv, OPTFLAGS)) != -1) { * on the end of the "create" list. */ for (argv += optind, argc -= optind; *argv; ++argv, --argc) - if (Parse_IsVar(*argv)) + if (Parse_IsVar(*argv)) { + char *ptr = Var_Quote(*argv); + + Var_Append(MAKEFLAGS, ptr, VAR_GLOBAL); + free(ptr); + Parse_DoVar(*argv, VAR_CMD); - else { + } else { if (!**argv) Punt("illegal (null) argument."); if (**argv == '-') { @@ -645,10 +650,6 @@ main(int argc, char **argv) MainParseArgs(argc, argv); -#ifdef POSIX - Var_AddCmdLine(MAKEFLAGS); -#endif - /* * Find where we are... * All this code is so that we know where we are when we start up |