summaryrefslogtreecommitdiff
path: root/main.c
AgeCommit message (Collapse)AuthorFilesLines
1996-07-14Sun Jul 14 12:59:27 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>Roland McGrath1-2/+3
* main.c (main): Exit with status 2 when update_goal_chain returns 2.
1996-06-22Sat Jun 22 14:56:05 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>Roland McGrath1-1/+1
* remote-stub.c (remote_setup, remote_cleanup): New (empty) functions. * main.c (main): Call remote_setup. (die): Call remote_cleanup. * main.c (print_version): Add 96 to copyright years.
1996-06-22Sat Jun 22 14:56:05 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>Roland McGrath1-34/+21
* remote-stub.c (remote_setup, remote_cleanup): New (empty) functions. * main.c (main): Call remote_setup. (die): Call remote_cleanup. * main.c (print_version): Add 96 to copyright years.
1996-05-22Wed May 15 10:14:14 CDT 1996 Rob Tulloh <tulloh@tivoli.com>Roland McGrath1-1/+182
* dir.c: WIN32 does not support inode. For now, fully qualified pathname along with st_mtime will be keys for files. Fixed problem where vpath can be confused when files are added to a directory after the directory has already been read in. The code now attempts to reread the directory if it discovers that the datestamp on the directory has changed since it was cached by make. This problem only seems to occur on WIN32 right now so it is lumped under port #ifdef WIN32. * function.c: WIN32: call subproc library (CreateProcess()) instead of fork/exec. * job.c: WIN32: Added the code to do fork/exec/waitpid style processing on WIN32 systems via calls to subproc library. * main.c: WIN32: Several things added here. First, there is code for dealing with PATH and SHELL defaults. Make tries to figure out if the user has %PATH% set in the environment and sets it to %Path% if it is not set already. Make also looks to see if sh.exe is anywhere to be found. Code path through job.c will change based on existence of a working Bourne shell. The checking for default shell is done twice: once before makefiles are read in and again after. Fall back to MSDOS style execution mode if no sh.exe is found. Also added some debug support that allows user to pause make with -D switch and attach a debugger. This is especially useful for debugging recursive calls to make where problems appear only in the sub-make. * make.h: WIN32: A few macros and header files for WIN32 support. * misc.c: WIN32: Added a function end_of_token_w32() to assist in parsing code in read.c. * read.c: WIN32: Fixes similar to MSDOS which allow colon to appear in filenames. Use of colon in filenames would otherwise confuse make. * remake.c: WIN32: Added include of io.h to eliminate compiler warnings. Added some code to default LIBDIR if it is not set on WIN32. * variable.c: WIN32: Added support for detecting Path/PATH and converting them to semicolon separated lists for make's internal use. New function sync_Path_environment() which is called in job.c and function.c before creating a new process. Caller must set Path in environment since we don't have fork() to do this for us. * vpath.c: WIN32: Added detection for filenames containing forward or backward slashes. * NMakefile: WIN32: Visual C compatible makefile for use with nmake. Use this to build GNU make the first time on Windows NT or Windows 95. * README.WIN32: WIN32: Contains some helpful notes. * build_w32.bat: WIN32: If you don't like nmake, use this the first time you build GNU make on Windows NT or Windows 95. * config.h.WIN32: WIN32 version of config.h * subproc.bat: WIN32: A bat file used to build the subproc library from the top-level NMakefile. Needed because WIndows 95 (nmake) doesn't allow you to cd in a make rule. * w32/include/dirent.h * w32/compat/dirent.c: WIN32: opendir, readdir, closedir, etc. * w32/include/pathstuff.h: WIN32: used by files needed functions defined in pathstuff.c (prototypes). * w32/include/sub_proc.h: WIN32: prototypes for subproc.lib functions. * w32/include/w32err.h: WIN32: prototypes for w32err.c. * w32/pathstuff.c: WIN32: File and Path/Path conversion functions. * w32/subproc/build.bat: WIN32: build script for subproc library if you don't wish to use nmake. * w32/subproc/NMakefile: WIN32: Visual C compatible makefile for use with nmake. Used to build subproc library. * w32/subproc/misc.c: WIN32: subproc library support code * w32/subproc/proc.h: WIN32: subproc library support code * w32/subproc/sub_proc.c: WIN32: subproc library source code * w32/subproc/w32err.c: WIN32: subproc library support code
1996-05-13Sun May 12 19:19:43 1996 Aaron Digulla <digulla@fh-konstanz.de>Roland McGrath1-15/+18
* main.c: (main), variable.c Changed handling of ENV-vars. Make stores now the names of the variables only and reads their contents when they are accessed to reflect that these variables are really global (ie. they CAN change WHILE make runs !) This handling is made in lookup_variable()
1996-05-09Thu May 9 13:54:49 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>Roland McGrath1-2/+2
* main.c (main): Use unsigned for fread return.
1996-05-09Thu May 9 13:54:49 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>Roland McGrath1-1/+77
* GNUmakefile (globfiles): Add AmigaDOS support files. (distfiles): Add $(amigafiles). (amigafiles): New variable. Thu Nov 7 10:18:16 1995 Aaron Digulla <digulla@fh-konstanz.de> * Added Amiga support in commands.c, dir.c, function.c, job.c, main.c, make.h, read.c, remake.c * commands.c: Amiga has neither SIGHUP nor SIGQUIT * dir.c: Amiga has filenames with Upper- and Lowercase, but "FileName" is the same as "filename". Added strieq() which is use to compare filenames. This is like streq() on all other systems. Also there is no such thing as "." under AmigaDOS. * function.c: On Amiga, the environment is not passed as envp, there are no pipes and Amiga can't fork. Use my own function to create a new child. * job.c: default_shell is "" (The system automatically chooses a shell for me). Have to use the same workaround as MSDOS for running batch commands. Added HAVE_SYS_PARAM_H. NOFILE isn't known on Amiga. Cloned code to run children from MSDOS. Own version of sh_chars[] and sh_cmds[]. No dup2() or dup() on Amiga. * main.c: Force stack to 20000 bytes. Read environment from ENV: device. On Amiga, exec_command() does return, so I exit() afterwards. * make.h: Added strieq() to compare filenames. * read.c: Amiga needs special extension to have passwd. Only one include-dir. "Makefile" and "makefile" are the same. Added "SMakefile". Added special code to handle device names (xxx:) and "./" in rules. * remake.c: Only one lib-dir. Amiga link-libs are named "%s.lib" instead of "lib%s.a". * main.c, rule.c, variable.c: Avoid floats at all costs. * vpath.c: Get rid of as many alloca()s as possible.
1996-03-20Tue Mar 19 20:21:34 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>Roland McGrath1-16/+33
Merged VMS port from Klaus Kaempf <kkaempf@didymus.rmi.de>. * make.h (PARAMS): New macro. * config.h-vms: New file. * makefile.com: New file. * makefile.vms: New file. * readme.vms: New file. * vmsdir.h: New file. * vmsfunctions.c: New file. * vmsify.c: New file. * file.h: Renamed to filedef.h to avoid conflict with VMS system hdr. * ar.c: Added prototypes and changes for VMS. * commands.c: Likewise. * commands.h: Likewise. * default.c: Likewise. * dep.h: Likewise. * dir.c: Likewise. * expand.c: Likewise. * file.c: Likewise. * function.c: Likewise. * implicit.c: Likewise. * job.c: Likewise. * job.h: Likewise. * main.c: Likewise. * make.h: Likewise. * misc.c: Likewise. * read.c: Likewise. * remake.c: Likewise. * remote-stub.c: Likewise. * rule.c: Likewise. * rule.h: Likewise. * variable.c: Likewise. * variable.h: Likewise. * vpath.c: Likewise. * compatMakefile (srcs): Rename file.h to filedef.h.
1995-12-12(main): Don't call init_dir.Roland McGrath1-4/+0
1995-11-26(log_working_directory): Made global.Roland McGrath1-24/+18
Print entering msg only once.
1995-10-10(enter_command_line_file): Barf if NAME is "".Roland McGrath1-0/+3
1995-08-10(define_makeflags): Omit command line variable definitions from MFLAGSRoland McGrath1-3/+18
value.
1995-03-28(main): Fixed braino in assert.Roland McGrath1-1/+1
1995-03-27Avoid string in assert expression. Some systems are broken.Roland McGrath1-2/+2
1995-03-24Include <assert.h>.Roland McGrath1-0/+1
1995-03-24(main): Handle 1 and 2 returns from update_goal_chain makefile runRoland McGrath1-2/+5
properly.
1995-03-24(handle_non_switch_argument): New function, broken out of decode_switches.Roland McGrath1-55/+59
(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-08(decode_switches): Reset optind to 1 instead of 0.Roland McGrath1-1/+1
1995-03-07(decode_switches): If non-option arg is "-", ignore it.Roland McGrath1-5/+6
1995-02-22(main): Pass missing arg to tmpnam.3.72.8Roland McGrath1-1/+1
1995-02-22(main): Don't call signame_init #ifdef HAVE_STRSIGNAL.Roland McGrath1-1/+1
1995-02-11(print_version): Add 95 to copyright years.Roland McGrath1-1/+1
1995-02-06Cast results of `alloca' to `char *'.Roland McGrath1-1/+1
1995-02-05(main) [! HAVE_MKTEMP]: Use tmpnam instead of mktemp.Roland McGrath1-1/+6
1995-01-26(debug_signal_handler): New function; toggles debug_flag.Roland McGrath1-0/+14
(main): Handle SIGUSR1 with that.
1995-01-07(decode_switches): For --help, print usage to stdout.Roland McGrath1-5/+8
1994-11-07(define_makeflags): When no flags, set WORDS to zero.Roland McGrath1-1/+4
1994-11-06(define_makeflags): Terminate properly when FLAGSTRING is empty.Roland McGrath1-0/+2
1994-10-24(main): Move checks .IGNORE, .SILENT, .POSIX to snap_deps.Roland McGrath1-11/+2
1994-10-16(switches): Bump flag values for --no-print-directory andRoland McGrath1-2/+2
--warn-undefined-variables, so neither is 1 (which indicates a nonoption argument).
1994-10-16(main): Add missing code in .IGNORE test.Roland McGrath1-1/+1
1994-10-01(main): Define hidden automatic variable with command vars, andRoland McGrath1-5/+25
MAKEOVERRIDES to a reference to that. (define_makeflags): If posix_pedantic, write a reference to that instead.
1994-09-30(posix_pedantic): New variable.Roland McGrath1-2/+12
(main): Set posix_pedantic if .POSIX is a target. Fix .IGNORE and .SILENT hecks to require is_target.
1994-09-26(quote_as_word): Actually test DOUBLE_DOLLARS, instead of always doubling.Roland McGrath1-1/+1
1994-09-26(quote_as_word): Renamed from shell_quote.Roland McGrath1-53/+67
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-10(decode_switches): Loop until optind hits ARGC, not just until getopt_longRoland McGrath1-17/+74
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-09(decode_switches): The non-option return from getopt is 1, not 0.Roland McGrath1-61/+145
(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(other_args): Variable removed.Roland McGrath1-128/+61
(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-06(init_switches): Put a + first in options.Roland McGrath1-1/+2
1994-07-25(directory_before_chdir): New variable, moved out of main (was local).Roland McGrath1-1/+19
(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-04-21(main, decode_switches): Die with 2 for errors.Roland McGrath1-3/+7
(main): Accept 2 return from update_goal_chain and die with that.
1994-04-05(main): When disqualifying makefiles for updating, use double_colon pointerRoland McGrath1-3/+1
to find all entries for a file.
1994-03-23entered into RCSRoland McGrath1-1/+2
1994-02-16Formerly main.c.~105~Roland McGrath1-3/+3
1994-01-06Formerly main.c.~104~Roland McGrath1-2/+2
1993-12-16Formerly main.c.~103~Roland McGrath1-16/+20
1993-12-15Formerly main.c.~102~Roland McGrath1-1/+5
1993-10-27Formerly main.c.~101~Roland McGrath1-5/+3
1993-10-26Formerly main.c.~100~Roland McGrath1-2/+0
1993-10-25Formerly main.c.~99~Roland McGrath1-0/+2