Compare commits

..

8 Commits

Author SHA1 Message Date
Paul Smith
e2ffc653aa Minor tweaks for 3.76. 1997-09-16 18:08:59 +00:00
Paul Smith
4e58a6ca4c Changes for GNU make 3.76 1997-09-16 14:19:43 +00:00
Paul Smith
41dcca8426 Changes for GNU make 3.76 1997-09-16 14:17:23 +00:00
Paul Eggert
161a026602 automatically generated from GPLed version 1997-09-11 18:13:19 +00:00
Ulrich Drepper
e244062995 automatically generated from GPLed version 1997-09-11 18:13:19 +00:00
Paul Eggert
24fec5cb53 automatically generated from GPLed version 1997-09-11 18:13:19 +00:00
Ulrich Drepper
b903988475 automatically generated from GPLed version 1997-09-11 18:13:19 +00:00
Paul Smith
6ea87be73b Changes for GNU make 3.75.93. 1997-09-05 21:01:49 +00:00
14 changed files with 446 additions and 243 deletions

View File

@@ -1,9 +1,58 @@
Tue Sep 16 10:18:22 1997 Paul D. Smith <psmith@baynetworks.com>
* Version 3.76 released.
Tue Sep 2 10:07:39 1997 Paul D. Smith <psmith@baynetworks.com>
* function.c (expand_function): When processing $(shell...)
translate a CRLF (\r\n) sequence as well as a newline (\n) to a
space. Also remove an ending \r\n sequence.
* make.texinfo (Shell Function): Document it.
Fri Aug 29 12:59:06 1997 Rob Tulloh <rob_tulloh@tivoli.com>
* w32/pathstuff.c (convert_Path_to_windows32): Fix problem where
paths which contain single character entries like `.' are not
handled correctly.
* README.W32: Document path handling issues on Windows systems.
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
@@ -397,7 +395,25 @@ maintainer-clean: maintainer-clean-recursive maintainer-clean-am
@echo "it deletes files that may require special tools to rebuild."
rm -f config.status
.PHONY: default mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr mostlyclean-binPROGRAMS distclean-binPROGRAMS clean-binPROGRAMS maintainer-clean-binPROGRAMS uninstall-binPROGRAMS install-binPROGRAMS mostlyclean-compile distclean-compile clean-compile maintainer-clean-compile install-info-am uninstall-info mostlyclean-aminfo distclean-aminfo clean-aminfo maintainer-clean-aminfo install-data-recursive uninstall-data-recursive install-exec-recursive uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive all-recursive check-recursive installcheck-recursive info-recursive dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive maintainer-clean-recursive tags tags-recursive mostlyclean-tags distclean-tags clean-tags maintainer-clean-tags distdir info dvi check-local installcheck all-recursive-am all-am install-exec-am install-data-am uninstall-am install-exec install-data install uninstall all installdirs mostlyclean-generic distclean-generic clean-generic maintainer-clean-generic clean mostlyclean distclean maintainer-clean
.PHONY: default mostlyclean-hdr distclean-hdr clean-hdr \
maintainer-clean-hdr mostlyclean-binPROGRAMS distclean-binPROGRAMS \
clean-binPROGRAMS maintainer-clean-binPROGRAMS uninstall-binPROGRAMS \
install-binPROGRAMS mostlyclean-compile distclean-compile clean-compile \
maintainer-clean-compile install-info-am uninstall-info \
mostlyclean-aminfo distclean-aminfo clean-aminfo \
maintainer-clean-aminfo install-data-recursive uninstall-data-recursive \
install-exec-recursive uninstall-exec-recursive installdirs-recursive \
uninstalldirs-recursive all-recursive check-recursive \
installcheck-recursive info-recursive dvi-recursive \
mostlyclean-recursive distclean-recursive clean-recursive \
maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
distclean-tags clean-tags maintainer-clean-tags distdir \
mostlyclean-depend distclean-depend clean-depend \
maintainer-clean-depend info dvi check-local installcheck \
all-recursive-am all-am install-exec-am install-data-am uninstall-am \
install-exec install-data install uninstall all installdirs \
mostlyclean-generic distclean-generic clean-generic \
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
# --------------- Local DIST Section

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

5
NEWS
View File

@@ -39,6 +39,9 @@ Version 3.76
* The $(strip) function now removes newlines as well as TABs and spaces.
* The $(shell) function now changes CRLF (\r\n) pairs to a space as well
as newlines (\n).
* Updates to the Windows 95/NT port from Rob Tulloh (see README.W32).
* Eli Zaretskii has updated the port to 32-bit protected mode on MSDOS
@@ -46,6 +49,8 @@ Version 3.76
and utilities. See README.DOS for details, and direct all questions
concerning this port to Eli Zaretskii <eliz@is.elta.co.il> or DJ
Delorie <dj@delorie.com>.
* John W. Eaton has updated the VMS port to support libraries and VPATH.
Version 3.75

View File

@@ -38,7 +38,7 @@ GNU make and sh.exe:
There are very few true ports of Bourne shell for NT right now.
There is a version of GNU bash available from Cygnus gnu-win32
porting effort. Other possibilites are to get the MKS version
porting effort. Other possibilities are to get the MKS version
of sh.exe or to build your own with a package like
NutCracker (DataFocus) or Portage (Consensys).
@@ -46,6 +46,46 @@ GNU make and sh.exe:
freely available. It may be available someday, but I am not in control
of this decision nor do I influence it. Sorry!
GNU make handling of drive letters in pathnames (PATH, vpath, VPATH):
There is a caveat that should be noted with respect to handling
single character pathnames on Windows systems. When colon is
used in PATH variables, make tries to be smart about knowing when
you are using colon as a separator versus colon as a drive
letter. Unfortunately, something as simple as the string 'x:/'
could be interpreted 2 ways: (x and /) or (x:/).
Make chooses to interpret a letter plus colon (e.g. x:/) as a
drive letter pathname. If it is necessary to use single
character directories in paths (VPATH, vpath, Path, PATH), the
user must do one of two things:
a. Use semicolon as the separator to disambiguate colon. For
example use 'x;/' if you want to say 'x' and '/' are
separate components.
b. Qualify the directory name so that there is more than
one character in the path(s) used. For example, none
of these settings are ambiguous:
./x:./y
/some/path/x:/some/path/y
x:/some/path/x:x:/some/path/y
These caveats affect Windows systems only (Windows NT and
Windows 95) and can be ignored for other platforms.
Please note that you are free to mix colon and semi-colon in the
specification of paths. Make is able to figure out the intended
result and convert the paths internally to the format needed
when interacting with the operating system.
You are encouraged to use colon as the separator character.
This should ease the pain of deciding how to handle various path
problems which exist between platforms. If colon is used on
both Unix and Windows systems, then no ifdef'ing will be
necessary in the makefile source.
GNU make test suite:
I verified all functionality with a slightly modified version
@@ -105,17 +145,17 @@ SAMBA/NTFS/VFAT:
under VFAT. VFAT users may wish to be aware that this port
of make does respect case sensitivity.
Version 3.76 contains some preliminary support for FAT.
Make now tries to work around some difficulties with stat'ing of
files and caching of filenames and directories internally.
There is still a known problem with filenames sometimes being found
to have modification dates in the future which cause make to
complain about the file and exit (remake.c).
Version 3.76 contains some preliminary support for FAT. Make
now tries to work around some difficulties with stat'ing of
files and caching of filenames and directories internally.
There is still a known problem with filenames sometimes being
found to have modification dates in the future which cause make
to complain about the file and exit (remake.c).
Bug reports:
Please submit bugs via the normal bug reporting mechanism
which is described in one of the texinfo files. If you don't
have texinfo for Windows NT or Windows 95, these files are simple
which is described in one of the Texinfo files. If you don't
have Texinfo for Windows NT or Windows 95, these files are simple
text files and can be read with a text editor.

View File

@@ -1,5 +1,5 @@
This directory contains the %VERSION% test release of GNU Make.
All bugs reported for previous test releases have been fixed.
This directory contains the %VERSION% release of GNU Make.
All bugs reported for previous releases have been fixed.
Some bugs surely remain.
For general building and installation instructions, see the file INSTALL.

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.76)
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

@@ -160,14 +160,14 @@ patsubst_expand (o, text, pattern, replace, pattern_percent, replace_percent)
if (len < pattern_prepercent_len + pattern_postpercent_len)
fail = 1;
/* Does the prefix match? */
/* Does the prefix match? */
if (!fail && pattern_prepercent_len > 0
&& (*t != *pattern
|| t[pattern_prepercent_len - 1] != pattern_percent[-1]
|| strncmp (t + 1, pattern + 1, pattern_prepercent_len - 1)))
fail = 1;
/* Does the suffix match? */
/* Does the suffix match? */
if (!fail && pattern_postpercent_len > 0
&& (t[len - 1] != pattern_percent[pattern_postpercent_len]
|| t[len - pattern_postpercent_len] != pattern_percent[1]
@@ -318,12 +318,12 @@ int shell_function_pid = 0, shell_function_completed;
The output is written into VARIABLE_BUFFER starting at O. */
/* Note this absorbs a semicolon and is safe to use in conditionals. */
#define BADARGS(func) \
if (reading_filename != 0) \
makefile_fatal (reading_filename, *reading_lineno_ptr, \
"insufficient arguments to function `%s'", \
func); \
else \
#define BADARGS(func) \
if (reading_filename != 0) \
makefile_fatal (reading_filename, *reading_lineno_ptr, \
"insufficient arguments to function `%s'", \
func); \
else \
fatal ("insufficient arguments to function `%s'", func)
static char *
@@ -349,12 +349,12 @@ expand_function (o, function, text, end)
case function_shell:
{
#ifdef WINDOWS32
SECURITY_ATTRIBUTES saAttr;
HANDLE hIn;
HANDLE hErr;
HANDLE hChildOutRd;
HANDLE hChildOutWr;
HANDLE hProcess;
SECURITY_ATTRIBUTES saAttr;
HANDLE hIn;
HANDLE hErr;
HANDLE hChildOutRd;
HANDLE hChildOutWr;
HANDLE hProcess;
#endif
#ifdef __MSDOS__
FILE *fpipe;
@@ -380,7 +380,7 @@ expand_function (o, function, text, end)
#ifndef _AMIGA
/* Using a target environment for `shell' loses in cases like:
export var = $(shell echo foobie)
export var = $(shell echo foobie)
because target_environment hits a loop trying to expand $(var)
to put it in the environment. This is even more confusing when
var was not explicitly exported, but just appeared in the
@@ -391,7 +391,7 @@ expand_function (o, function, text, end)
/* Construct the environment. */
envp = target_environment ((struct file *) 0);
#endif
#endif /* Not Amiga. */
#endif /* Not Amiga. */
/* For error messages. */
if (reading_filename != 0)
@@ -405,111 +405,111 @@ expand_function (o, function, text, end)
#ifndef _AMIGA
# ifdef WINDOWS32
saAttr.nLength = sizeof(SECURITY_ATTRIBUTES);
saAttr.bInheritHandle = TRUE;
saAttr.lpSecurityDescriptor = NULL;
saAttr.nLength = sizeof(SECURITY_ATTRIBUTES);
saAttr.bInheritHandle = TRUE;
saAttr.lpSecurityDescriptor = NULL;
if (DuplicateHandle(GetCurrentProcess(),
GetStdHandle(STD_INPUT_HANDLE),
GetCurrentProcess(),
&hIn,
0,
TRUE,
DUPLICATE_SAME_ACCESS) == FALSE) {
fatal("create_child_process: DuplicateHandle(In) failed (e=%d)\n",
GetLastError());
}
if (DuplicateHandle(GetCurrentProcess(),
GetStdHandle(STD_ERROR_HANDLE),
GetCurrentProcess(),
&hErr,
0,
TRUE,
DUPLICATE_SAME_ACCESS) == FALSE) {
fatal("create_child_process: DuplicateHandle(Err) failed (e=%d)\n",
GetLastError());
}
if (DuplicateHandle(GetCurrentProcess(),
GetStdHandle(STD_INPUT_HANDLE),
GetCurrentProcess(),
&hIn,
0,
TRUE,
DUPLICATE_SAME_ACCESS) == FALSE) {
fatal("create_child_process: DuplicateHandle(In) failed (e=%d)\n",
GetLastError());
}
if (DuplicateHandle(GetCurrentProcess(),
GetStdHandle(STD_ERROR_HANDLE),
GetCurrentProcess(),
&hErr,
0,
TRUE,
DUPLICATE_SAME_ACCESS) == FALSE) {
fatal("create_child_process: DuplicateHandle(Err) failed (e=%d)\n",
GetLastError());
}
if (!CreatePipe(&hChildOutRd, &hChildOutWr, &saAttr, 0))
fatal("CreatePipe() failed (e=%d)\n", GetLastError());
if (!CreatePipe(&hChildOutRd, &hChildOutWr, &saAttr, 0))
fatal("CreatePipe() failed (e=%d)\n", GetLastError());
hProcess = process_init_fd(hIn, hChildOutWr, hErr);
hProcess = process_init_fd(hIn, hChildOutWr, hErr);
if (!hProcess)
fatal("expand_function: process_init_fd() failed\n");
else
process_register(hProcess);
if (!hProcess)
fatal("expand_function: process_init_fd() failed\n");
else
process_register(hProcess);
/* make sure that CreateProcess() has Path it needs */
sync_Path_environment();
/* make sure that CreateProcess() has Path it needs */
sync_Path_environment();
if (!process_begin(hProcess, argv, envp, argv[0], NULL))
pid = (int) hProcess;
else
fatal("expand_function: unable to launch process (e=%d)\n",
process_last_err(hProcess));
if (!process_begin(hProcess, argv, envp, argv[0], NULL))
pid = (int) hProcess;
else
fatal("expand_function: unable to launch process (e=%d)\n",
process_last_err(hProcess));
/* set up to read data from child */
pipedes[0] = _open_osfhandle((long) hChildOutRd, O_RDONLY);
/* set up to read data from child */
pipedes[0] = _open_osfhandle((long) hChildOutRd, O_RDONLY);
/* this will be closed almost right away */
pipedes[1] = _open_osfhandle((long) hChildOutWr, O_APPEND);
/* this will be closed almost right away */
pipedes[1] = _open_osfhandle((long) hChildOutWr, O_APPEND);
# else /* WINDOWS32 */
# ifdef __MSDOS__
{
/* MSDOS can't fork, but it has `popen'.
(Bwt, why isn't `popen' used in all the versions?) */
struct variable *sh = lookup_variable ("SHELL", 5);
int e;
extern int dos_command_running, dos_status;
{
/* MSDOS can't fork, but it has `popen'.
(Bwt, why isn't `popen' used in all the versions?) */
struct variable *sh = lookup_variable ("SHELL", 5);
int e;
extern int dos_command_running, dos_status;
/* Make sure not to bother processing an empty line. */
while (isblank (*text))
++text;
if (*text == '\0')
break;
/* Make sure not to bother processing an empty line. */
while (isblank (*text))
++text;
if (*text == '\0')
break;
if (sh)
{
char buf[PATH_MAX + 7];
/* This makes sure $SHELL value is used by $(shell), even
though the target environment is not passed to it. */
sprintf (buf, "SHELL=%s", sh->value);
putenv (buf);
}
if (sh)
{
char buf[PATH_MAX + 7];
/* This makes sure $SHELL value is used by $(shell), even
though the target environment is not passed to it. */
sprintf (buf, "SHELL=%s", sh->value);
putenv (buf);
}
e = errno;
errno = 0;
dos_command_running = 1;
dos_status = 0;
fpipe = popen (text, "rt");
dos_command_running = 0;
if (!fpipe || dos_status)
{
pipedes[0] = -1;
pid = -1;
if (dos_status)
errno = EINTR;
else if (errno == 0)
errno = ENOMEM;
shell_function_completed = -1;
}
else
{
pipedes[0] = fileno (fpipe);
pid = 42;
errno = e;
shell_function_completed = 1;
}
}
if (pipedes[0] < 0)
e = errno;
errno = 0;
dos_command_running = 1;
dos_status = 0;
fpipe = popen (text, "rt");
dos_command_running = 0;
if (!fpipe || dos_status)
{
pipedes[0] = -1;
pid = -1;
if (dos_status)
errno = EINTR;
else if (errno == 0)
errno = ENOMEM;
shell_function_completed = -1;
}
else
{
pipedes[0] = fileno (fpipe);
pid = 42;
errno = e;
shell_function_completed = 1;
}
}
if (pipedes[0] < 0)
# else /* ! __MSDOS__ */
if (pipe (pipedes) < 0)
if (pipe (pipedes) < 0)
# endif /* __MSDOS__ */
{
perror_with_name (error_prefix, "pipe");
break;
}
{
perror_with_name (error_prefix, "pipe");
break;
}
# ifndef __MSDOS__
pid = vfork ();
@@ -606,28 +606,41 @@ expand_function (o, function, text, end)
if (i > 0)
{
if (buffer[i - 1] == '\n')
buffer[--i] = '\0';
{
if (i > 1 && buffer[i - 2] == '\r')
--i;
buffer[--i] = '\0';
}
else
buffer[i] = '\0';
p = buffer;
while ((p = index (p, '\n')) != 0)
*p++ = ' ';
for (p2=p; *p != '\0'; ++p)
{
if (p[0] == '\r' && p[1] == '\n')
continue;
if (*p == '\n')
*p2++ = ' ';
else
*p2++ = *p;
}
*p2 = '\0';
o = variable_buffer_output (o, buffer, i);
}
}
free (buffer);
}
#else /* Amiga */
#else /* Amiga */
{
/* Amiga can't fork nor spawn, but I can start a program with
redirection of my choice. However, this means that we
redirection of my choice. However, this means that we
don't have an opportunity to reopen stdout to trap it. Thus,
we save our own stdout onto a new descriptor and dup a temp
file's descriptor onto our stdout temporarily. After we
spawn the shell program, we dup our own stdout back to the
stdout descriptor. The buffer reading is the same as above,
except that we're now reading from a file. */
except that we're now reading from a file. */
#include <dos/dos.h>
#include <proto/dos.h>
@@ -699,7 +712,7 @@ expand_function (o, function, text, end)
}
free (buffer);
}
#endif /* Not Amiga. */
#endif /* Not Amiga. */
free (text);
break;
@@ -1051,13 +1064,13 @@ expand_function (o, function, text, end)
p2 = text;
while (*p2 != '\0')
{
while (isspace(*p2))
++p2;
p = p2;
for (i=0; *p2 != '\0' && !isspace(*p2); ++p2, ++i)
{}
if (!i)
break;
while (isspace(*p2))
++p2;
p = p2;
for (i=0; *p2 != '\0' && !isspace(*p2); ++p2, ++i)
{}
if (!i)
break;
o = variable_buffer_output (o, p, i);
o = variable_buffer_output (o, " ", 1);
doneany = 1;
@@ -1235,42 +1248,42 @@ index argument");
/* Check the next argument */
for (p2 = p + 1; isblank(*p2); ++p2)
{}
{}
count = 0;
for (p = p2; p < end; ++p)
{
if (*p == startparen)
++count;
else if (*p == endparen)
--count;
else if (*p == ',' && count <= 0)
break;
}
{
if (*p == startparen)
++count;
else if (*p == endparen)
--count;
else if (*p == ',' && count <= 0)
break;
}
if (p == end)
BADARGS ("wordlist");
BADARGS ("wordlist");
text = expand_argument (p2, p);
for (p2 = text; *p2 != '\0'; ++p2)
if (*p2 < '0' || *p2 > '9')
{
if (reading_filename != 0)
makefile_fatal (reading_filename, *reading_lineno_ptr,
"non-numeric second argument to `wordlist' function");
else
fatal ("non-numeric second argument to `wordlist' function");
}
if (*p2 < '0' || *p2 > '9')
{
if (reading_filename != 0)
makefile_fatal (reading_filename, *reading_lineno_ptr,
"non-numeric second argument to `wordlist' function");
else
fatal ("non-numeric second argument to `wordlist' function");
}
j = (unsigned int)atoi(text);
free (text);
if (j > i)
j -= i;
j -= i;
else
{
unsigned int k;
k = j;
j = i - j;
i = k;
}
{
unsigned int k;
k = j;
j = i - j;
i = k;
}
++j;
/* Extract the requested words */
@@ -1278,13 +1291,13 @@ index argument");
p2 = text;
while (((p = find_next_token (&p2, &len)) != 0) && --i)
{}
{}
if (p)
{
while (--j && (find_next_token (&p2, &len) != 0))
{}
o = variable_buffer_output (o, p, p2 - p);
}
{
while (--j && (find_next_token (&p2, &len) != 0))
{}
o = variable_buffer_output (o, p, p2 - p);
}
free (text);
break;
@@ -1366,34 +1379,34 @@ index argument");
p = p2 + len;
#ifdef VMS
while (p >= p2 && *p != ']'
&& (function != function_basename || *p != '.'))
&& (function != function_basename || *p != '.'))
#else
# ifdef __MSDOS__
while (p >= p2 && *p != '/' && *p != '\\'
&& (function != function_basename || *p != '.'))
&& (function != function_basename || *p != '.'))
# else
while (p >= p2 && *p != '/'
&& (function != function_basename || *p != '.'))
&& (function != function_basename || *p != '.'))
# endif
#endif
--p;
if (p >= p2 && (function == function_dir))
o = variable_buffer_output (o, p2, ++p - p2);
else if (p >= p2 && (*p == '.'))
o = variable_buffer_output (o, p2, p - p2);
else if (p >= p2 && (*p == '.'))
o = variable_buffer_output (o, p2, p - p2);
#if defined(WINDOWS32) || defined(__MSDOS__)
/* Handle the "d:foobar" case */
else if (p2[0] && p2[1] == ':' && function == function_dir)
o = variable_buffer_output (o, p2, 2);
/* Handle the "d:foobar" case */
else if (p2[0] && p2[1] == ':' && function == function_dir)
o = variable_buffer_output (o, p2, 2);
#endif
else if (function == function_dir)
#ifdef VMS
o = variable_buffer_output (o, "[]", 2);
o = variable_buffer_output (o, "[]", 2);
#else
#ifndef _AMIGA
o = variable_buffer_output (o, "./", 2);
o = variable_buffer_output (o, "./", 2);
#else
/* o = o */; /* Just a nop... */
/* o = o */; /* Just a nop... */
#endif /* AMIGA */
#endif /* !VMS */
else
@@ -1421,32 +1434,32 @@ index argument");
p = p2 + len;
#ifdef VMS
while (p >= p2 && *p != ']'
&& (function != function_suffix || *p != '.'))
&& (function != function_suffix || *p != '.'))
#else
# ifdef __MSDOS__
while (p >= p2 && *p != '/' && *p != '\\'
&& (function != function_suffix || *p != '.'))
&& (function != function_suffix || *p != '.'))
# else
while (p >= p2 && *p != '/'
&& (function != function_suffix || *p != '.'))
&& (function != function_suffix || *p != '.'))
# endif
#endif
--p;
if (p >= p2)
{
if (function == function_notdir)
++p;
else if (*p != '.')
continue;
++p;
else if (*p != '.')
continue;
o = variable_buffer_output (o, p, len - (p - p2));
}
#if defined(WINDOWS32) || defined(__MSDOS__)
/* Handle the case of "d:foo/bar". */
else if (function == function_notdir && p2[0] && p2[1] == ':')
{
p = p2 + 2;
o = variable_buffer_output (o, p, len - (p - p2));
}
/* Handle the case of "d:foo/bar". */
else if (function == function_notdir && p2[0] && p2[1] == ':')
{
p = p2 + 2;
o = variable_buffer_output (o, p, len - (p - p2));
}
#endif
else if (function == function_notdir)
o = variable_buffer_output (o, p2, len);

View File

@@ -6,23 +6,23 @@
Copyright (C) 1987, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97
Free Software Foundation, Inc.
NOTE: The canonical source of this file is maintained with the GNU C Library.
Bugs can be reported to bug-glibc@prep.ai.mit.edu.
NOTE: The canonical source of this file is maintained with the GNU C Library.
Bugs can be reported to bug-glibc@prep.ai.mit.edu.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any
later version.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any
later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
USA. */
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
USA. */
/* This tells Alpha OSF/1 not to define a getopt prototype in <stdio.h>.
Ditto for AIX 3.2 and <stdlib.h>. */
@@ -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()
@@ -276,7 +276,9 @@ store_args_and_env (int argc, char *const *argv)
original_argc = argc;
original_argv = argv;
}
# ifdef text_set_element
text_set_element (__libc_subinit, store_args_and_env);
# endif /* text_set_element */
# define SWAP_FLAGS(ch1, ch2) \
if (nonoption_flags_len > 0) \

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 */

View File

@@ -40,6 +40,13 @@ build.sh.in: build.template Makefile.am
$< > $@
chmod a-w+x $@
# We clean everything here. The GNU standards for makefile conventions say
# you shouldn't remove configure, etc., but this makefile is only available
# in a full development distribution, so they'll only be removed then.
#
MAINTAINERCLEANFILES = $(TEMPLATES) Makefile.DOS build.sh.in \
configure Makefile.in stamp-h.in
# Put the alpha distribution files up for anonymous FTP.
#
ALPHA := ~ftp/gnu

View File

@@ -5746,8 +5746,10 @@ The @code{shell} function performs the same function that backquotes
(@samp{`}) perform in most shells: it does @dfn{command expansion}. This
means that it takes an argument that is a shell command and returns the
output of the command. The only processing @code{make} does on the result,
before substituting it into the surrounding text, is to convert newlines to
spaces.@refill
before substituting it into the surrounding text, is to convert each
newline or carriage-return / newline pair to a single space. It also
removes the trailing (carriage-return and) newline, if it's the last
thing in the result.@refill
The commands run by calls to the @code{shell} function are run when the
function calls are expanded. In most cases, this is when the makefile is
@@ -5856,18 +5858,34 @@ You can specify a different goal or goals with arguments to @code{make}.
Use the name of the goal as an argument. If you specify several goals,
@code{make} processes each of them in turn, in the order you name them.
@cindex @code{MAKECMDGOALS}
@vindex MAKECMDGOALS
@code{Make} will set the special variable @code{MAKECMDGOALS} to the
list of goals you specified on the command line. If no goals were given
on the command line, this variable is empty.
Any target in the makefile may be specified as a goal (unless it
starts with @samp{-} or contains an @samp{=}, in which case it will be
parsed as a switch or variable definition, respectively). Even
targets not in the makefile may be specified, if @code{make} can find
implicit rules that say how to make them.
@cindex @code{MAKECMDGOALS}
@vindex MAKECMDGOALS
@code{Make} will set the special variable @code{MAKECMDGOALS} to the
list of goals you specified on the command line. If no goals were given
on the command line, this variable is empty. Note that this variable
should be used only in special circumstances.
An example of appropriate use is to avoid including @file{.d} files
during @code{clean} rules (@pxref{Automatic Dependencies}), so
@code{make} won't create them only to immediately remove them
again:@refill
@example
@group
sources = foo.c bar.c
ifneq ($(MAKECMDGOALS),clean)
include $(sources:.c=.d)
endif
@end group
@end example
One use of specifying a goal is if you want to compile only a part of
the program, or only one of several programs. Specify as a goal each
file that you wish to remake. For example, consider a directory containing
@@ -8797,6 +8815,12 @@ The flags given to @code{make}. You can set this in the environment or
a makefile to set flags.@*
@xref{Options/Recursion, ,Communicating Options to a Sub-@code{make}}.
@item MAKECMDGOALS
The targets given to @code{make} on the command line. Setting this
variable has no effect on the operation of @code{make}.@*
@xref{Goals, ,Arguments to Specify the Goals}.
@item SUFFIXES
The default list of suffixes before @code{make} reads any makefiles.

View File

@@ -12,10 +12,6 @@ Make with this makefile to rebuild.
Here are some notes about GNU Make for VMS:
Libraries are not supported. They were in GNU Make 3.60 but somehow I didn't
care porting the code. If there is enough interest, I'll do it at some
later time.
The variable $^ separates files with commas instead of spaces (It's the
natural thing to do for VMS).
@@ -41,8 +37,6 @@ less than what vms provides. This might be a problem on the faster Alphas.
You can use a : in a filename only if you preceed it with a backslash ('\').
E.g.- hobbes\:[bogas.files]
None of the stuff in vpath.c has been implemented yet.
Make ignores success, informational, or warning errors (-S-, -I-, or -W-).
But it will stop on -E- and -F- errors. (unless you do something to override
this in your makefile, or whatever).

View File

@@ -38,11 +38,15 @@ convert_Path_to_windows32(char *Path, char to_delim)
if ((etok - p) == 1) {
if (*(etok - 1) == ';' ||
*(etok - 1) == ':') {
etok[-1] = to_delim;
etok[0] = to_delim;
etok[-1] = to_delim;
etok[0] = to_delim;
p = ++etok;
continue; /* ignore empty bucket */
} else if (etok = strpbrk(etok+1, ":;")) {
} else if (!isalpha(*p)) {
/* found one to count, handle things like '.' */
*etok = to_delim;
p = ++etok;
} else if ((*etok == ':') && (etok = strpbrk(etok+1, ":;"))) {
/* found one to count, handle drive letter */
*etok = to_delim;
p = ++etok;
@@ -55,11 +59,6 @@ convert_Path_to_windows32(char *Path, char to_delim)
p = ++etok;
}
#if 0
/* convert to backward slashes */
for (p = Path, p = strchr(p, '/'); p; p = strchr(p, '/'))
*p = '\\';
#endif
return Path;
}