Commit graph

104 commits

Author SHA1 Message Date
Roland McGrath
78ac5bd9c7 (define_makeflags): Omit command line variable definitions from MFLAGS
value.
1995-08-10 23:58:12 +00:00
Roland McGrath
ea38e1fe78 (main): Fixed braino in assert. 1995-03-28 18:59:57 +00:00
Roland McGrath
cb51d55ab2 Avoid string in assert expression. Some systems are broken. 1995-03-27 10:28:35 +00:00
Roland McGrath
3f9ce84b4a Include <assert.h>. 1995-03-24 23:39:24 +00:00
Roland McGrath
bdbe8501c6 (main): Handle 1 and 2 returns from update_goal_chain makefile run
properly.
1995-03-24 23:27:05 +00:00
Roland McGrath
1331cca1fa (handle_non_switch_argument): New function, broken out of decode_switches.
(decode_switches): Set optind to 0 to reinitialize getopt, not to 1.  When
getopt_long returns EOF, break the loop and handle remaining args with a
simple second loop.
1995-03-24 05:56:41 +00:00
Roland McGrath
3a0f9ce0cb (decode_switches): Reset optind to 1 instead of 0. 1995-03-08 18:10:43 +00:00
Roland McGrath
636435e5c2 (decode_switches): If non-option arg is "-", ignore it. 1995-03-07 22:31:01 +00:00
Roland McGrath
f6d5cdba19 (main): Pass missing arg to tmpnam. 1995-02-22 03:19:53 +00:00
Roland McGrath
d85ab5953a (main): Don't call signame_init #ifdef HAVE_STRSIGNAL. 1995-02-22 03:17:22 +00:00
Roland McGrath
4c7f18cd09 (print_version): Add 95 to copyright years. 1995-02-11 01:39:58 +00:00
Roland McGrath
bbd5e695f5 Cast results of alloca' to char *'. 1995-02-06 22:37:36 +00:00
Roland McGrath
21a8ec0d72 (main) [! HAVE_MKTEMP]: Use tmpnam instead of mktemp. 1995-02-05 23:49:40 +00:00
Roland McGrath
3fb9ebf83f (debug_signal_handler): New function; toggles debug_flag.
(main): Handle SIGUSR1 with that.
1995-01-26 06:29:18 +00:00
Roland McGrath
e1dd3bfa4a (decode_switches): For --help, print usage to stdout. 1995-01-07 16:38:08 +00:00
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