Commit graph

89 commits

Author SHA1 Message Date
Roland McGrath
e25e2fb7f5 (define_makeflags): When no flags, set WORDS to zero. 1994-11-07 18:57:56 +00:00
Roland McGrath
1a886b6359 (define_makeflags): Terminate properly when FLAGSTRING is empty. 1994-11-06 23:33:55 +00:00
Roland McGrath
07f09cfd88 (main): Move checks .IGNORE, .SILENT, .POSIX to snap_deps. 1994-10-24 22:57:07 +00:00
Roland McGrath
0e352e4bf7 (switches): Bump flag values for --no-print-directory and
--warn-undefined-variables, so neither is 1 (which indicates a nonoption
argument).
1994-10-16 05:01:46 +00:00
Roland McGrath
3f8bde0f25 (main): Add missing code in .IGNORE test. 1994-10-16 03:39:35 +00:00
Roland McGrath
1766b7fa59 (main): Define hidden automatic variable with command vars, and
MAKEOVERRIDES to a reference to that.
(define_makeflags): If posix_pedantic, write a reference to that instead.
1994-10-01 08:07:35 +00:00
Roland McGrath
fa999783d7 (posix_pedantic): New variable.
(main): Set posix_pedantic if .POSIX is a target.
Fix .IGNORE and .SILENT hecks to require is_target.
1994-09-30 01:04:54 +00:00
Roland McGrath
2feb36f620 (quote_as_word): Actually test DOUBLE_DOLLARS, instead of always doubling. 1994-09-26 22:45:08 +00:00
Roland McGrath
f40918e005 (quote_as_word): Renamed from shell_quote.
Take new arg; if nonzero, also double $s.
(main): Define MAKEOVERRIDES from command_variables here.
(define_makeflags): Don't use command_variables here; instead write a
reference $(MAKEOVERRIDES) in MAKEFLAGS.  Make vars recursive.
1994-09-26 22:37:10 +00:00
Roland McGrath
03cd08cca2 (decode_switches): Loop until optind hits ARGC, not just until getopt_long
returns EOF.  Initialize C to zero before loop; in loop if C is EOF, set
optarg from ARGV[optind++], else call getopt_long.
(decode_env_switches): Use variable_expand instead of
allocated_variable_expand.  Allocate a fresh buffer to copy split words
into; scan characters by hand to break words and debackslashify.
(shell_quote): New function.
(define_makeflags): Allocate doubled space for switch args, and command
variable names and values; use shell_quote to quote those things.
1994-09-10 07:01:10 +00:00
Roland McGrath
b321e0f535 (decode_switches): The non-option return from getopt is 1, not 0.
(command_variables): New type and variable.
(decode_switches, decode_env_switches): After making a variable definition,
record the struct variable pointer in the command_variables chain.
(define_makeflags): If ALL, write variable definitions for
command_variables.
1994-09-09 06:45:51 +00:00
Roland McGrath
c1433e9495 (other_args): Variable removed.
(goals, lastgoal): New static variables (moved from auto in main).
(main): Don't process OTHER_ARGS at all.
Don't set variable MAKEOVERRIDES at all; define MAKE to just $(MAKE_COMMAND).
(init_switches): Prepend a - (return in order) instead of a + (require order).
(decode_switches): Don't set OTHER_ARGS at all.
Grok '\0' return from getopt_long as non-option argument; try variable
definition and (if !ENV) enter goal targets here.
(decode_env_switches): Use allocated_variable_expand to store value.
Use find_next_token to simplify word-splitting loop.
Don't prepend a dash to uninterpreted value.
Instead, if split into only one word, try variable definition and failing
that prepend a dash to the word and pass it to decode_switches as a single arg.
1994-09-09 05:37:40 +00:00
Roland McGrath
4c0fef3dd7 (init_switches): Put a + first in options. 1994-09-06 23:13:43 +00:00
Roland McGrath
021ea7e61c (directory_before_chdir): New variable, moved out of main (was local).
(main) [__MSDOS__]: Look for \ or : to delimit last component of PROGRAM.
Don't frob ARGV[0] before setting MAKE_COMMAND variable.
(die): Change back to `directory_before_chdir' before dying.

Part of MSDOS/GO32 port from DJ Delorie <dj@ctron.com>.
1994-07-25 23:33:26 +00:00
Roland McGrath
716e804b5b (main, decode_switches): Die with 2 for errors.
(main): Accept 2 return from update_goal_chain and die with that.
1994-04-21 02:08:28 +00:00
Roland McGrath
4e4b1ed670 (main): When disqualifying makefiles for updating, use double_colon pointer
to find all entries for a file.
1994-04-05 10:20:03 +00:00
Roland McGrath
d3fbc4f345 entered into RCS 1994-03-23 14:12:55 +00:00
Roland McGrath
8e1432e250 Formerly main.c.~105~ 1994-02-16 21:13:16 +00:00
Roland McGrath
7c1f91ced2 Formerly main.c.~104~ 1994-01-06 23:12:09 +00:00
Roland McGrath
65b8056203 Formerly main.c.~103~ 1993-12-16 20:10:36 +00:00
Roland McGrath
4f752036ac Formerly main.c.~102~ 1993-12-15 22:49:45 +00:00
Roland McGrath
462e175970 Formerly main.c.~101~ 1993-10-27 22:14:41 +00:00
Roland McGrath
c727af1bcc Formerly main.c.~100~ 1993-10-26 23:55:04 +00:00
Roland McGrath
251b0fc75f Formerly main.c.~99~ 1993-10-25 18:52:25 +00:00
Roland McGrath
88054f8ad3 Formerly main.c.~98~ 1993-10-14 22:23:39 +00:00
Roland McGrath
f8300f1e1c Formerly main.c.~97~ 1993-09-28 18:20:17 +00:00
Roland McGrath
f8c3e52b0f Formerly main.c.~96~ 1993-09-20 22:05:19 +00:00
Roland McGrath
16667d15e0 Formerly main.c.~95~ 1993-09-09 00:14:18 +00:00
Roland McGrath
308e6149e6 Formerly main.c.~94~ 1993-08-19 20:36:08 +00:00
Roland McGrath
2f8d1abe7c Formerly main.c.~93~ 1993-08-11 20:04:39 +00:00
Roland McGrath
3cc0c7306a Formerly main.c.~92~ 1993-08-11 06:59:04 +00:00
Roland McGrath
c52575a837 Formerly main.c.~91~ 1993-08-11 06:54:23 +00:00
Roland McGrath
aef2a1ccd0 Formerly main.c.~90~ 1993-07-14 22:56:38 +00:00
Roland McGrath
9c32a4c3cd Formerly main.c.~89~ 1993-06-25 19:47:20 +00:00
Roland McGrath
f4fac65746 Formerly main.c.~88~ 1993-06-08 00:08:45 +00:00
Roland McGrath
074d147ef7 Formerly main.c.~87~ 1993-06-04 19:53:32 +00:00
Roland McGrath
55f5d979ae Formerly main.c.~86~ 1993-06-04 00:27:28 +00:00
Roland McGrath
9766fe1775 Formerly main.c.~85~ 1993-06-03 20:56:33 +00:00
Roland McGrath
80091295df Formerly main.c.~84~ 1993-06-02 20:51:28 +00:00
Roland McGrath
0246a6dc63 Formerly main.c.~83~ 1993-05-26 18:33:12 +00:00
Roland McGrath
fe92d8e656 Formerly main.c.~82~ 1993-05-22 20:20:16 +00:00
Roland McGrath
3d952e5879 Formerly main.c.~81~ 1993-05-14 21:50:11 +00:00
Roland McGrath
fba3960a6a Formerly main.c.~80~ 1993-04-26 20:05:02 +00:00
Roland McGrath
f02ced5786 Formerly main.c.~79~ 1993-04-14 18:20:33 +00:00
Roland McGrath
8c01d0459a Formerly main.c.~78~ 1993-04-12 20:51:42 +00:00
Roland McGrath
542a0f8112 Formerly main.c.~77~ 1993-04-08 22:14:23 +00:00
Roland McGrath
5973c4e97a Formerly main.c.~76~ 1993-04-07 20:40:35 +00:00
Roland McGrath
07c6b685b7 Formerly main.c.~75~ 1993-04-02 22:16:47 +00:00
Roland McGrath
f9b50f6436 Formerly main.c.~74~ 1993-03-18 01:02:20 +00:00
Roland McGrath
d5ef06dee5 Formerly main.c.~73~ 1993-03-08 18:49:51 +00:00