Changes for GNU make 3.75.93.

This commit is contained in:
Paul Smith 1997-09-05 21:01:49 +00:00
parent f6490d62cf
commit 6ea87be73b
6 changed files with 103 additions and 21 deletions

View file

@ -1,9 +1,39 @@
Fri Aug 29 02:01:27 1997 Paul D. Smith <psmith@baynetworks.com>
* Version 3.75.93.
Thu Aug 28 19:39:06 1997 Rob Tulloh <rob_tulloh@tivoli.com>
* job.c (exec_command): [WINDOWS32] If exec_command() is invoked
from main() to re-exec make, the call to execvp() would
incorrectly return control to parent shell before the exec'ed
command could run to completion. I believe this is a feature of
the way that execvp() is implemented on top of WIN32 APIs. To
alleviate the problem, use the supplied process launch function in
the sub_proc library and suspend the parent process until the
child process has run. When the child exits, exit the parent make
with the exit code of the child make.
Thu Aug 28 17:04:47 1997 Paul D. Smith <psmith@baynetworks.com>
* Makefile.DOS.template (distdir): Fix a line that got wrapped in
email.
* Makefile.am (loadavg): Give the necessary cmdline options when
linking loadavg.
* configure.in: Check for pstat_getdynamic for getloadvg on HP.
* job.c (start_job_command): [VMS,_AMIGA] Don't perform empty
command optimization on these systems; it doesn't make sense.
Wed Aug 27 17:09:32 1997 Paul D. Smith <psmith@baynetworks.com>
* Version 3.75.92
Tue Aug 26 11:59:15 1997 Paul D. Smith <psmith@baynetworks.com>
* main.c (print_version): Add 97 to copyright years.
* main.c (print_version): Add '97 to copyright years.
* read.c (do_define): Check the length of the array before looking
at a particular offset.

View file

@ -296,9 +296,7 @@ distdir: $(DISTFILES)
rm -rf $(distdir)
mkdir $(distdir)
-chmod 777 $(distdir)
@for file in $(DISTFILES); do d=$(srcdir); test -f $(distdir)/$$file || ln $$d/$$file $(distdir)/$$file 2> /dev/null || cp -p $$d/$$file $(distdir)/$$file; done
for subdir in $(SUBDIRS); do test -d $(distdir)/$$subdir || mkdir $(distdir)/$$subdir || exit 1; chmod 777 $(distdir)/$$subdir; (cd $$subdir && $(MAKE) top_distdir=../$(top_distdir)/$$subdir distdir=../$(distdir)/$$subdir distdir) || exit
1; done
@for file in $(DISTFILES); do d=$(srcdir); test -f $(distdir)/$$file || ln $$d/$$file $(distdir)/$$file 2> /dev/null || cp -p $$d/$$file $(distdir)/$$file; done; for subdir in $(SUBDIRS); do test -d $(distdir)/$$subdir || mkdir $(distdir)/$$subdir || exit 1; chmod 777 $(distdir)/$$subdir; (cd $$subdir && $(MAKE) top_distdir=../$(top_distdir)/$$subdir distdir=../$(distdir)/$$subdir distdir) || exit 1; done
$(MAKE) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-info
$(MAKE) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-hook
alloca.o alloca.lo: alloca.c config.h

View file

@ -48,7 +48,7 @@ check-local: check-loadavg check-regression
#
loadavg: loadavg.c config.h
@rm -f loadavg
$(LINK) -DTEST $(make_LDFLAGS) loadavg.c $(LIBS)
$(LINK) -I. -I$(srcdir) -DHAVE_CONFIG_H -DTEST $(make_LDFLAGS) loadavg.c $(LIBS)
# We copy getloadavg.c into a different file rather than compiling it
# directly because some compilers clobber getloadavg.o in the process.
loadavg.c: getloadavg.c

View file

@ -3,7 +3,7 @@ AC_REVISION([$Id$])
AC_PREREQ(2.12)dnl dnl Minimum Autoconf version required.
AC_INIT(vpath.c)dnl dnl A distinctive file to look for in srcdir.
AM_INIT_AUTOMAKE(make, 3.75.92)
AM_INIT_AUTOMAKE(make, 3.75.93)
AM_CONFIG_HEADER(config.h)
AC_CONFIG_SUBDIRS(glob)
@ -45,7 +45,7 @@ changequote([,])dnl
fi
AC_MSG_RESULT($ac_cv_check_symbol_$1)])dnl
AC_CHECK_FUNCS(memmove psignal mktemp \
AC_CHECK_FUNCS(memmove psignal mktemp pstat_getdynamic \
dup2 getcwd sigsetmask getgroups setlinebuf \
seteuid setegid setreuid setregid strerror strsignal)
AC_CHECK_SYMBOL(sys_siglist)

View file

@ -79,7 +79,7 @@ USA. */
#endif
#endif
#if defined (_WINDOWS32) && !defined (__CYGWIN32__)
#if defined (WINDOWS32) && !defined (__CYGWIN32__)
/* It's not Unix, really. See? Capital letters. */
#include <windows.h>
#define getpid() GetCurrentProcessId()

80
job.c
View file

@ -787,6 +787,7 @@ start_job_command (child)
/* Optimize an empty command. People use this for timestamp rules,
and forking a useless shell all the time leads to inefficiency. */
#if !defined(VMS) && !defined(_AMIGA)
if (
#ifdef __MSDOS__
unixy_shell /* the test is complicated and we already did it */
@ -800,6 +801,7 @@ start_job_command (child)
set_command_state (child->file, cs_running);
goto next_command;
}
#endif /* !VMS && !_AMIGA */
/* Tell update_goal_chain that a command has been started on behalf of
this target. It is important that this happens here and not in
@ -827,9 +829,7 @@ start_job_command (child)
fflush (stderr);
#ifndef VMS
#ifndef WINDOWS32
#ifndef _AMIGA
#ifndef __MSDOS__
#if !defined(WINDOWS32) && !defined(_AMIGA) && !defined(__MSDOS__)
/* Set up a bad standard input that reads from a broken pipe. */
@ -857,9 +857,7 @@ start_job_command (child)
}
}
#endif /* !AMIGA */
#endif /* !WINDOWS32 */
#endif /* !__MSDOS__ */
#endif /* !WINDOWS32 && !_AMIGA && !__MSDOS__ */
/* Decide whether to give this child the `good' standard input
(one that points to the terminal or whatever), or the `bad' one
@ -869,7 +867,7 @@ start_job_command (child)
if (child->good_stdin)
good_stdin_used = 1;
#endif /* Not VMS */
#endif /* !VMS */
child->deleted = 0;
@ -1602,11 +1600,66 @@ exec_command (argv, envp)
char **argv, **envp;
{
#ifdef VMS
/* Run the program. */
execve (argv[0], argv, envp);
perror_with_name ("execve: ", argv[0]);
_exit (EXIT_FAILURE);
/* Run the program. */
execve (argv[0], argv, envp);
perror_with_name ("execve: ", argv[0]);
_exit (EXIT_FAILURE);
#else
#ifdef WINDOWS32
HANDLE hPID;
HANDLE hWaitPID;
int err = 0;
int exit_code = EXIT_FAILURE;
/* make sure CreateProcess() has Path it needs */
sync_Path_environment();
/* launch command */
hPID = process_easy(argv, envp);
/* make sure launch ok */
if (hPID == INVALID_HANDLE_VALUE)
{
int i;
fprintf(stderr,
"process_easy() failed failed to launch process (e=%d)\n",
process_last_err(hPID));
for (i = 0; argv[i]; i++)
fprintf(stderr, "%s ", argv[i]);
fprintf(stderr, "\nCounted %d args in failed launch\n", i);
exit(EXIT_FAILURE);
}
/* wait and reap last child */
while (hWaitPID = process_wait_for_any())
{
/* was an error found on this process? */
err = process_last_err(hWaitPID);
/* get exit data */
exit_code = process_exit_code(hWaitPID);
if (err)
fprintf(stderr, "make (e=%d, rc=%d): %s",
err, exit_code, map_windows32_error_to_string(err));
/* cleanup process */
process_cleanup(hWaitPID);
/* expect to find only last pid, warn about other pids reaped */
if (hWaitPID == hPID)
break;
else
fprintf(stderr,
"make reaped child pid %d, still waiting for pid %d\n",
hWaitPID, hPID);
}
/* return child's exit code as our exit code */
exit(exit_code);
#else /* !WINDOWS32 */
/* Be the user, permanently. */
child_access ();
@ -1658,18 +1711,19 @@ exec_command (argv, envp)
}
_exit (127);
#endif /* !WINDOWS32 */
#endif /* !VMS */
}
#else /* On Amiga */
void exec_command (argv)
char **argv;
{
MyExecute (argv);
MyExecute (argv);
}
void clean_tmp (void)
{
DeleteFile (amiga_bname);
DeleteFile (amiga_bname);
}
#endif /* On Amiga */