summaryrefslogtreecommitdiff
path: root/job.c
AgeCommit message (Collapse)AuthorFilesLines
1996-05-22Wed May 15 10:14:14 CDT 1996 Rob Tulloh <tulloh@tivoli.com>Roland McGrath1-7/+191
* 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-3/+22
* job.c: No Pipes on Amiga, too (load_too_high) Neither on Amiga ENV variable on Amiga are in a special directory and are not passed as third argument to main().
1996-05-09Thu May 9 13:54:49 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>Roland McGrath1-8/+80
* 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-23/+345
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-01-12Don't declare unblock_sigs; job.h already does.Roland McGrath1-2/+2
1996-01-06(NGROUPS_MAX): Don't try to define this macro.Roland McGrath1-14/+0
1995-12-14(reap_children): Call unblock_sigs after start_job_command.Roland McGrath1-1/+11
1995-11-26[HAVE_UNION_WAIT]: Include sys/wait.h.Roland McGrath1-3/+3
(start_job_command): Pass new arg to `message'; fix inverted test in that call.
1995-11-22(start_job_command): Pass null instead of "" to message; don't add newline.Roland McGrath1-4/+4
1995-11-22(start_job_command): Use `message' to print the command, and call it withRoland McGrath1-12/+14
an empty string if the command is silent.
1995-08-17(getdtablesize): Remove decls and macros.Roland McGrath1-17/+0
1995-08-07(child_error): Do nothing if IGNORED under -s.Roland McGrath1-0/+3
1995-08-07(exec_command): Correctly use ARGV[0] for script name when running shellRoland McGrath1-1/+1
directly.
1995-08-01(child_execute_job): Close STDIN_FD and STDOUT_FD after dup'ing from them.Roland McGrath1-8/+4
Don't try to close all excess descriptors; getdtablesize might return a huge value. Any open descriptors in the parent should have FD_CLOEXEC set.
1995-08-01(start_job_command): Set FD_CLOEXEC flag on BAD_STDIN descriptor.Roland McGrath1-0/+16
1995-04-26(job_next_command): Skip empty lines.Roland McGrath1-18/+12
(new_job): Don't test the return of job_next_command. Just let start_waiting_job handle the case of empty commands.
1995-03-24(start_job_command, reap_children): Set update_status to 2 instead of 1Roland McGrath1-3/+3
for failed commands.
1995-03-21(search_path): Function removed (was already #if 0'd out).Roland McGrath1-105/+0
1995-03-09(construct_command_argv_internal) [__MSDOS__]: Fix typos.Roland McGrath1-2/+2
1995-02-22(child_error): Use strsignal.Roland McGrath1-8/+3
1995-02-10(start_job_command): Remember to call notice_finsihed_file under -n when3.72.6Roland McGrath1-4/+2
not recursing. To do this, consolidate that code under the empty command case and goto there for the -n case.
1995-02-05[HAVE_SYSCONF_OPEN_MAX] (getdtablesize): Define as macro using sysconf.Roland McGrath1-0/+4
1995-01-15Fix nits in last change.Roland McGrath1-6/+5
1995-01-15(start_job_command): Save and restore environ around vfork call.Roland McGrath1-58/+48
(search_path): Function #if 0'd out. (exec_command): Use execvp instead of search_path.
1995-01-15(construct_command_argv_internal): Handle " quoting too, when noRoland McGrath1-14/+21
backslash, $ or ` characters appear inside the quotes.
1994-11-29(start_waiting_job): Use set_command_state.Roland McGrath1-1/+1
1994-11-01(start_job_command): When ARGV is nil, only set update_state and callRoland McGrath1-2/+6
notice_finished_file if job_next_command returns zero.
1994-11-01(start_job_command): Call notice_finished_file for empty command line.Roland McGrath1-0/+1
1994-10-24(start_job_command): In FLAGS initialization, OR inRoland McGrath1-1/+6
CHILD->file->command_flags.
1994-09-29(reap_children): Call delete_child_targets for non-signal error ifRoland McGrath1-1/+7
.DELETE_ON_ERROR is a target.
1994-09-26(reap_children): Don't change C->file->command_state when dying.Roland McGrath1-24/+29
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.
1994-09-07(start_job_command): Whenever we set CHILD->file->update_status, callRoland McGrath1-4/+6
notice_finished_file instead of just set_command_state.
1994-09-07Changed all assignments of command_state members to calls toRoland McGrath1-4/+4
set_command_state.
1994-07-25(PATH_SEPARATOR_CHAR): Macro removed (now in make.h).Roland McGrath1-3/+0
1994-07-25[__MSDOS__]: Include <process.h>.Roland McGrath1-2/+99
(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>.
1994-07-04(search_path): Use safe_stat in place of stat.Roland McGrath1-1/+1
1994-06-24(construct_command_argv_internal): After swallowing a backslash-newlineRoland McGrath1-1/+2
combination, if INSTRING is set goto string_char (new label) for normal INSTRING handling code.
1994-05-10(construct_command_argv_internal): Swallow backslash-newline combinationsRoland McGrath1-7/+17
inside '' strings too.
1994-04-25(construct_command_argv_internal): Notice newline inside '' string whenRoland McGrath1-0/+6
RESTP is non-null.
1994-04-21(reap_children): Die with 2 for error.Roland McGrath1-6/+12
(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.
1993-10-14entered into RCSRoland McGrath1-0/+4
1993-09-28Formerly job.c.~110~Roland McGrath1-1/+1
1993-09-20Formerly job.c.~109~Roland McGrath1-3/+24
1993-09-17Formerly job.c.~108~Roland McGrath1-0/+2
1993-08-11Formerly job.c.~107~Roland McGrath1-1/+1
1993-08-11Formerly job.c.~106~Roland McGrath1-5/+12
1993-08-09Formerly job.c.~105~Roland McGrath1-9/+42
1993-06-25Formerly job.c.~104~Roland McGrath1-2/+12
1993-05-12Formerly job.c.~103~Roland McGrath1-3/+3
1993-05-06Formerly job.c.~102~Roland McGrath1-9/+23