Commit graph

125 commits

Author SHA1 Message Date
Paul Smith
a6a9ebb54f * Define and use xstrdup() instead of strdup(). 1999-03-05 07:13:12 +00:00
Paul Smith
9e6ba6a148 * Update FSF address info in copyright notices.
* Update maintainers build process; remove GNUmakefile.  Require builders to
  run automake && autoreconf by hand.
* Use AC_SUBST_FILE to get the maintMakefile included, rather than GNU
  make's include directive, which conflicts with automake 1.4's include
  directive.
1999-03-05 05:55:11 +00:00
Paul Smith
2c64fb221a Checkpoint changes. Bug fixes, mostly. 1998-10-03 05:39:55 +00:00
Paul Smith
e2403327e9 GNU make release 3.77. 1998-07-30 20:54:47 +00:00
Paul Smith
3e12cad198 Quick changes for make 3.76.1. 1997-09-19 19:47:55 +00:00
Paul Smith
be3fb0ae6d Updates for GNU make 3.75.92. 1997-08-27 20:30:54 +00:00
Paul Smith
63dff1e0bc Bug fixes and automake changes. 1997-08-18 18:11:04 +00:00
Paul Smith
0ada207e2d Changes for make 3.75.1 1997-04-07 07:21:16 +00:00
Roland McGrath
6fa74367b7 Tue Aug 27 01:06:34 1996 Roland McGrath <roland@baalperazim.frob.com>
* main.c (print_version): Print out bug-reporting address.
Mon Aug 26 19:55:47 1996  Roland McGrath  <roland@baalperazim.frob.com>

	* main.c (print_data_base): Don't declare ctime; headers do it for us
 	already.
1996-08-27 11:29:03 +00:00
Roland McGrath
08905cdcbc Thu Jul 25 19:53:31 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* main.c (define_makeflags): Back up P to point at null terminator
	when killing final space and dash before setting MFLAGS.
1996-07-26 00:33:25 +00:00
Roland McGrath
fde68d03f3 Sun Jul 14 12:59:27 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* main.c (main): Exit with status 2 when update_goal_chain returns 2.
1996-07-14 17:07:13 +00:00
Roland McGrath
610526fee7 Sat Jun 22 14:56:05 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* 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-22 21:42:06 +00:00
Roland McGrath
d86e4a26c8 Sat Jun 22 14:56:05 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* 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-22 19:31:12 +00:00
Roland McGrath
e7a525c5d5 Wed May 15 10:14:14 CDT 1996 Rob Tulloh <tulloh@tivoli.com>
* 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-22 21:51:45 +00:00
Roland McGrath
c8484a6170 Sun May 12 19:19:43 1996 Aaron Digulla <digulla@fh-konstanz.de>
* 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-13 18:40:11 +00:00
Roland McGrath
abe5f64440 Thu May 9 13:54:49 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* main.c (main): Use unsigned for fread return.
1996-05-09 18:28:03 +00:00
Roland McGrath
e99a3aca7e Thu May 9 13:54:49 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* 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-05-09 18:02:06 +00:00
Roland McGrath
9e443adaf6 Tue Mar 19 20:21:34 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
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.
1996-03-20 14:57:41 +00:00
Roland McGrath
856d83462f (main): Don't call init_dir. 1995-12-12 03:32:46 +00:00
Roland McGrath
37cf6fdc18 (log_working_directory): Made global.
Print entering msg only once.
1995-11-26 01:37:07 +00:00
Roland McGrath
b1e6353edd (enter_command_line_file): Barf if NAME is "". 1995-10-10 18:59:08 +00:00
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