Roland McGrath [Sun, 15 Jan 1995 15:57:48 +0000 (15:57 +0000)]
(start_job_command): Save and restore environ around vfork call.
(search_path): Function #if 0'd out.
(exec_command): Use execvp instead of search_path.
Roland McGrath [Sun, 15 Jan 1995 15:32:37 +0000 (15:32 +0000)]
(variable_expand): Rewrote computed variable name and substitution
reference handling to be simpler. First expand the entire text between the
parens if it contains any $s, then examine the result of that for
subtitution references and do no further expansion while parsing them.
Roland McGrath [Wed, 11 Jan 1995 00:14:53 +0000 (00:14 +0000)]
(default_variables) [__hpux]: Remove special definition of ARFLAGS.
Existence of the `f' flag is not consistent across HPUX versions;
and one might be using GNU ar anyway.
Roland McGrath [Sun, 13 Nov 1994 10:02:19 +0000 (10:02 +0000)]
(CPPFLAGS): New variable, set from @CPPFLAGS@.
(RANLIB): Variable removed.
(prefix, exec_prefix): Set these from @...@.
(.c.o): Use $(CPPFLAGS).
(glob/libglob.a): Don't pass down variables to sub-make.
glob/Makefile should be configured properly by configure.
(distclean): Remove config.log and config.cache (autoconf stuff).
Roland McGrath [Mon, 24 Oct 1994 22:56:27 +0000 (22:56 +0000)]
(snap_deps): Check .IGNORE, .SILENT, .POSIX here instead of in main.
If .IGNORE has deps, OR COMMANDS_NOERROR into their command_flags and
don't set -i. Likewise .SILENT.
Roland McGrath [Sat, 1 Oct 1994 08:07:35 +0000 (08:07 +0000)]
(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.
Roland McGrath [Mon, 26 Sep 1994 23:02:40 +0000 (23:02 +0000)]
(reap_children): Don't change C->file->command_state when dying.
Test it only after calling start_job_command for a new command line.
When no more cmds, just set C->file->update_status.
(start_job_command): When the last line is empty or under -n, set
C->file->update_status.
(start_waiting_job): Grok cs_not_started after start_job_command as success.
(new_job): Set C->file->update_status when there are no cmds.
(job_next_command): When out of lines, don't set CHILD->file->update_status or
CHILD->file->command_state.
Roland McGrath [Mon, 26 Sep 1994 22:37:10 +0000 (22:37 +0000)]
(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.
Roland McGrath [Sat, 10 Sep 1994 07:01:10 +0000 (07:01 +0000)]
(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.
Roland McGrath [Fri, 9 Sep 1994 06:45:51 +0000 (06:45 +0000)]
(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.
Roland McGrath [Fri, 9 Sep 1994 05:37:40 +0000 (05:37 +0000)]
(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.
Roland McGrath [Wed, 7 Sep 1994 07:06:46 +0000 (07:06 +0000)]
(notice_finished_file): Only recheck modtimes if FILE->command_state was
cs_running on entry (meaning the commands actually just ran).
(update_file_1): Whenever we set FILE->update_status, call
notice_finished_file instead of just set_command_state.
Roland McGrath [Mon, 25 Jul 1994 23:33:26 +0000 (23:33 +0000)]
(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>.