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>.
Roland McGrath [Mon, 25 Jul 1994 23:23:03 +0000 (23:23 +0000)]
[__MSDOS__]: Include <process.h>.
(PATH_SEPARATOR_CHAR): New macro; differing defns for [__MSDOS__] and not.
[__MSDOS__] (dos_pid, dos_status, dos_bname, dos_bename, dos_batch_file):
New variables.
(reap_children) [__MSDOS__]: Don't call wait; just examine those vars.
(unblock_sigs) [__MSDOS__]: Do nothing.
(start_job_command) [__MSDOS__]: Use spawnvpe instead of vfork and exec.
(load_too_high) [__MSDOS__]: Always return true.
(search_path) [__MSDOS__]: Check for : or / in FILE to punt.
Use PATH_SEPARATOR_CHAR instead of ':'.
(construct_command_argv_internal) [__MSDOS__]: Wholly different values for
sh_chars and sh_cmds. Wholly new code to handle shell scripts.
Part of MSDOS/GO32 port from DJ Delorie <dj@ctron.com>.
Roland McGrath [Mon, 25 Jul 1994 23:01:19 +0000 (23:01 +0000)]
[__MSDOS__] (dosify): New function.
(dir_contents_file_exists_p) [__MSDOS__]: Call it on FILENAME and process
the result instead of FILENAME itself.
(file_impossible_p) [__MSDOS__]: Likewise.
Part of MSDOS/GO32 port from DJ Delorie <dj@ctron.com>.
Roland McGrath [Mon, 25 Jul 1994 22:54:09 +0000 (22:54 +0000)]
[__MSDOS__]: Define GCC_IS_NATIVE.
(default_suffix_rules) [__MSDOS__]: Use `y_tab.c' instead of `y.tab.c'.
(default_variables) [GCC_IS_NATIVE]: Set CC and CXX to `gcc', YACC to
`bison -y', and LEX to `flex'.
Part of MSDOS/GO32 port from DJ Delorie <dj@ctron.com>.
Roland McGrath [Fri, 24 Jun 1994 09:40:13 +0000 (09:40 +0000)]
(construct_command_argv_internal): After swallowing a backslash-newline
combination, if INSTRING is set goto string_char (new label) for normal
INSTRING handling code.
Roland McGrath [Wed, 11 May 1994 01:42:43 +0000 (01:42 +0000)]
(Overriding Makefiles): Don't suggest using .DEFAULT; that loses if the
target file exists. Instead recommend the combination of a match-anything
rule and a force target.
Roland McGrath [Thu, 21 Apr 1994 22:35:15 +0000 (22:35 +0000)]
(dist): Depend on rcs-mark first.
(rcs-mark): New target.
(rcs-mark-alpha, rcs-mark-beta): Use $(version-); append : to name for -N.
(version-): New variable, removes dots (RCS doesn't like) from $(version).
Roland McGrath [Thu, 21 Apr 1994 02:15:37 +0000 (02:15 +0000)]
(update_goal_chain): Set STATUS to FILE->update_status, to preserve whether
it's 2 for error or 1 for -q trigger. When STATUS gets nonzero and -q is
set, always stop immediately.
Roland McGrath [Thu, 21 Apr 1994 02:00:20 +0000 (02:00 +0000)]
(reap_children): Die with 2 for error.
(start_job_command): Set update_status to 2 for error. Set it to 1 when we
would run a command and question_flag is set.
Roland McGrath [Thu, 21 Apr 1994 00:55:18 +0000 (00:55 +0000)]
(Archive Members): Don't say archive file must exist. Instead, in ar cmds
example, use `c' flag and mention it is needed if archive doesn't exist.
(Archive Update): Fix typo: foo.o -> file.o.