* Various fixes for problems in the 3.79.0.1 pretest.

This commit is contained in:
Paul Smith 2000-06-19 21:22:44 +00:00
parent f04e78f11b
commit 0d70d05458
16 changed files with 133 additions and 68 deletions

View file

@ -1,3 +1,26 @@
2000-06-19 Paul D. Smith <psmith@gnu.org>
* function.c (handle_function): If the last argument was empty, we
were pretending it didn't exist rather than providing an empty
value. Keep looking until we're past the end, not just at the end.
* implicit.c (pattern_search): Multi-target implicit rules weren't
expanding the "also made" targets correctly if the pattern didn't
contain a slash but the target did; in that case the directory
part wasn't being added back to the stem on the "also made"
targets. Reported by Seth M LaForge <sethml@newtonlabs.com>, with
a patch.
2000-06-17 Eli Zaretskii <eliz@is.elta.co.il>
* Makefile.DOS.template (DESTDIR, bindir, datadir, libdir)
(infodir, mandir, includedir): Support installation under a
non-default DESTDIR.
* remake.c (f_mtime): Fix the spelling of __MSDOS__.
* configh.DOS.template (HAVE_FDOPEN, HAVE_MKSTEMP): Define.
2000-06-14 Paul D. Smith <psmith@gnu.org>
* acinclude.m4 (pds_WITH_GETTEXT): rewrite fp_WITH_GETTEXT and

View file

@ -15,26 +15,25 @@ VPATH = $(srcdir)
prefix = /dev/env/DJDIR
exec_prefix = ${prefix}
bindir = ${exec_prefix}/bin
datadir = ${prefix}/share
libdir = ${prefix}/lib
infodir = ${prefix}/info
# DJGPP doesn't have separate man tree, use info instead.
mandir = ${prefix}/info
includedir = ${prefix}/include
bindir = /bin
datadir = /share
libdir = /lib
infodir = /info
mandir = /man
includedir = /include
oldincludedir = c:/djgpp/include
DESTDIR =
DESTDIR = /dev/env/DJDIR
pkgdatadir = $(datadir)/make
pkglibdir = $(libdir)/make
pkgincludedir = $(includedir)/make
localedir = $(prefix)/share/locale
localedir = $(datadir)/locale
INSTALL = ${bindir}/ginstall -c
INSTALL_PROGRAM = ${bindir}/ginstall -c
INSTALL_DATA = ${bindir}/ginstall -c -m 644
INSTALL_SCRIPT = ${bindir}/ginstall -c
INSTALL = ${exec_prefix}/bin/ginstall -c
INSTALL_PROGRAM = ${exec_prefix}/bin/ginstall -c
INSTALL_DATA = ${exec_prefix}/bin/ginstall -c -m 644
INSTALL_SCRIPT = ${exec_prefix}/bin/ginstall -c
transform = s,x,x,
# This will fail even if they don't have a Unix-like shell (stock DOS
@ -52,7 +51,7 @@ AR = ar
CC = gcc
CPP = gcc -E
LIBOBJS =
MAKEINFO = ${bindir}/makeinfo
MAKEINFO = ${exec_prefix}/bin/makeinfo
PACKAGE = make
PERL = perl
RANLIB = ranlib
@ -78,7 +77,7 @@ BUILT_SOURCES = README build.sh-in
EXTRA_DIST = $(BUILT_SOURCES) $(man_MANS) README.customs remote-cstms.c make-stds.texi texinfo.tex SCOPTIONS SMakefile Makefile.ami README.Amiga config.ami amiga.c amiga.h NMakefile README.DOS configh.dos configure.bat makefile.com README.W32 build_w32.bat config.h-W32 subproc.bat make.lnk config.h-vms makefile.vms readme.vms vmsdir.h vmsfunctions.c vmsify.c
SUBDIRS = glob
mkinstalldirs = ${bindir}/gmkdir -p
mkinstalldirs = ${exec_prefix}/bin/gmkdir -p
CONFIG_HEADER = config.h
CONFIG_CLEAN_FILES = build.sh
PROGRAMS = $(bin_PROGRAMS)

View file

@ -95,6 +95,15 @@ To build from sources:
will also need GNU Fileutils and GNU Sed for this (they should
be available from the DJGPP sites).
By default, GNU make will install into your DJGPP installation
area. If you wish to use a different directory, override the
DESTDIR variable when invoking "make install", like this:
make install DESTDIR=c:/other/dir
This causes the make executable to be placed in c:/other/dir/bin,
the man pages in c:/other/dir/man, etc.
Without a Unix-style shell, you will have to install programs
and the docs manually. Copy make.exe to a directory on your
PATH, make.i* info files to your Info directory, and update the

View file

@ -534,7 +534,7 @@ not GNU gettext
AC_DEFINE(HAVE_LIBINTL_H, 1, [Define if you have <libintl.h>.])
else
with_included_gettext=yes
LIBS="$fp_keep_LIBS"
LIBS="$pds_keep_LIBS"
fi
fi
])

View file

@ -23,6 +23,9 @@
#endif
/* Define if you have the fdopen function. */
#define HAVE_FDOPEN 1
/* Define if you have sigsetmask. */
#define HAVE_SIGSETMASK 1
@ -32,6 +35,9 @@
/* Define if you have the memmove function. */
#define HAVE_MEMMOVE 1
/* Define if you have the mkstemp function. */
#define HAVE_MKSTEMP 1
#define SCCS_GET "get"
/* Define to `unsigned long' or `unsigned long long'

View file

@ -3,7 +3,7 @@ AC_REVISION([$Id$])
AC_PREREQ(2.13)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.79.0.1)
AM_INIT_AUTOMAKE(make, 3.79.0.2)
AM_CONFIG_HEADER(config.h)
dnl Regular configure stuff
@ -66,7 +66,7 @@ AC_MSG_RESULT($ac_cv_check_symbol_$1)])dnl
# Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
# Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
AC_SEARCH_LIBS(clock_gettime, [rt posix4])
if test $ac_cv_search_clock_gettime != no; then
if test "$ac_cv_search_clock_gettime" != no; then
AC_DEFINE(HAVE_CLOCK_GETTIME, 1,
[Define if you have the clock_gettime function.])
fi

View file

@ -17,9 +17,10 @@ along with GNU Make; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include "make.h"
#include <assert.h>
#include "make.h"
#include "filedef.h"
#include "job.h"
#include "commands.h"
@ -426,6 +427,9 @@ expand_argument (str, end)
{
char *tmp;
if (str == end)
return xstrdup("");
if (!end || *end == '\0')
tmp = str;
else

3
file.c
View file

@ -17,9 +17,10 @@ along with GNU Make; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include "make.h"
#include <assert.h>
#include "make.h"
#include "dep.h"
#include "filedef.h"
#include "job.h"

View file

@ -1778,7 +1778,7 @@ handle_function (op, stringp)
p = beg;
nargs = 0;
for (p=beg, nargs=0; p < end; ++argvp)
for (p=beg, nargs=0; p <= end; ++argvp)
{
char *next;

View file

@ -1,5 +1,5 @@
/* Implicit rule searching for GNU Make.
Copyright (C) 1988,89,90,91,92,93,94,97 Free Software Foundation, Inc.
Copyright (C) 1988,89,90,91,92,93,94,97,2000 Free Software Foundation, Inc.
This file is part of GNU Make.
GNU Make is free software; you can redistribute it and/or modify
@ -117,6 +117,7 @@ pattern_search (file, archive, depth, recursions)
/* The start and length of the stem of FILENAME for the current rule. */
register char *stem = 0;
register unsigned int stemlen = 0;
register unsigned int fullstemlen = 0;
/* Buffer in which we store all the rules that are possibly applicable. */
struct rule **tryrules
@ -582,18 +583,23 @@ pattern_search (file, archive, depth, recursions)
}
if (!checked_lastslash[foundrule])
/* Always allocate new storage, since STEM might be
on the stack for an intermediate file. */
file->stem = savestring (stem, stemlen);
{
/* Always allocate new storage, since STEM might be
on the stack for an intermediate file. */
file->stem = savestring (stem, stemlen);
fullstemlen = stemlen;
}
else
{
int dirlen = (lastslash + 1) - filename;
/* We want to prepend the directory from
the original FILENAME onto the stem. */
file->stem = (char *) xmalloc (((lastslash + 1) - filename)
+ stemlen + 1);
bcopy (filename, file->stem, (lastslash + 1) - filename);
bcopy (stem, file->stem + ((lastslash + 1) - filename), stemlen);
file->stem[((lastslash + 1) - filename) + stemlen] = '\0';
fullstemlen = dirlen + stemlen;
file->stem = (char *) xmalloc (fullstemlen + 1);
bcopy (filename, file->stem, dirlen);
bcopy (stem, file->stem + dirlen, stemlen);
file->stem[fullstemlen] = '\0';
}
file->cmds = rule->cmds;
@ -606,12 +612,12 @@ pattern_search (file, archive, depth, recursions)
if (i != matches[foundrule])
{
struct dep *new = (struct dep *) xmalloc (sizeof (struct dep));
new->name = p = (char *) xmalloc (rule->lens[i] + stemlen + 1);
new->name = p = (char *) xmalloc (rule->lens[i] + fullstemlen + 1);
bcopy (rule->targets[i], p,
rule->suffixes[i] - rule->targets[i] - 1);
p += rule->suffixes[i] - rule->targets[i] - 1;
bcopy (stem, p, stemlen);
p += stemlen;
bcopy (file->stem, p, fullstemlen);
p += fullstemlen;
bcopy (rule->suffixes[i], p,
rule->lens[i] - (rule->suffixes[i] - rule->targets[i]) + 1);
new->file = enter_file (new->name);

3
job.c
View file

@ -17,9 +17,10 @@ along with GNU Make; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include "make.h"
#include <assert.h>
#include "make.h"
#include "job.h"
#include "debug.h"
#include "filedef.h"

6
make.h
View file

@ -39,6 +39,11 @@ Boston, MA 02111-1307, USA. */
# define PARAMS(protos) ()
#endif /* C++ or ANSI C. */
/* Specify we want GNU source code. This must be defined before any
system headers are included. */
#define _GNU_SOURCE 1
/* Include libintl.h, if it was found: we don't even look for it unless we
want to use the system's gettext(). If not, use the included gettext.h. */
@ -77,7 +82,6 @@ Boston, MA 02111-1307, USA. */
# define __NO_STRING_INLINES
#endif
#define _GNU_SOURCE 1
#include <sys/types.h>
#include <sys/stat.h>
#include <signal.h>

View file

@ -1155,7 +1155,7 @@ f_mtime (file, search)
FILE_TIMESTAMP adjusted_mtime = mtime;
#if defined WINDOWS32 || defined _MSDOS__
#if defined(WINDOWS32) || defined(__MSDOS__)
FILE_TIMESTAMP adjustment;
#ifdef WINDOWS32
/* FAT filesystems round time to the nearest even second!

View file

@ -1,3 +1,19 @@
2000-06-19 Paul D. Smith <psmith@gnu.org>
* scripts/functions/addsuffix: Test for an empty final argument.
Actually this bug might have happened for any function, but this
one was handy.
2000-06-17 Eli Zaretskii <eliz@is.elta.co.il>
* scripts/options/general: If parallel jobs are not supported,
expect a warning message from Make.
2000-06-15 Eli Zaretskii <eliz@is.elta.co.il>
* scripts/options/general: Don't try -jN with N != 1 if parallel
jobs are not supported.
2000-05-24 Paul D. Smith <psmith@gnu.org>
* scripts/options/general: Test general option processing (PR/1716).

View file

@ -1,44 +1,36 @@
$description = "The following test creates a makefile to test the addsuffix "
."function.";
# -*-perl-*-
$description = "Test the addsuffix function.";
$details = "";
# IF YOU NEED >1 MAKEFILE FOR THIS TEST, USE &get_tmpfile; TO GET
# THE NAME OF THE MAKEFILE. THIS INSURES CONSISTENCY AND KEEPS TRACK OF
# HOW MANY MAKEFILES EXIST FOR EASY DELETION AT THE END.
# EXAMPLE: $makefile2 = &get_tmpfile;
open(MAKEFILE,"> $makefile");
# The Contents of the MAKEFILE ...
print MAKEFILE "string := \$(addsuffix .c,src${pathsep}a.b.z.foo hacks) \n"
."all: \n"
."\t\@echo \$(string) \n";
print MAKEFILE <<EOMAKE;
string := \$(addsuffix .c,src${pathsep}a.b.z.foo hacks)
one: ; \@echo \$(string)
# END of Contents of MAKEFILE
two: ; \@echo \$(addsuffix foo,)
EOMAKE
close(MAKEFILE);
&run_make_with_options($makefile,"",&get_logfile,0);
# Create the answer to what should be produced by this Makefile
# TEST 0
&run_make_with_options($makefile, "", &get_logfile);
$answer = "src${pathsep}a.b.z.foo.c hacks.c\n";
# COMPARE RESULTS
# In this call to compare output, you should use the call &get_logfile(1)
# to send the name of the last logfile created. You may also use
# the special call &get_logfile(1) which returns the same as &get_logfile(1).
&compare_output($answer,&get_logfile(1));
# TEST 1
&run_make_with_options($makefile, "two", &get_logfile);
$answer = "\n";
&compare_output($answer,&get_logfile(1));
# This tells the test driver that the perl test script executed properly.
1;

View file

@ -5,17 +5,21 @@ open(MAKEFILE, "> $makefile");
# The Contents of the MAKEFILE ...
print MAKEFILE "foo 5foo: ; \@echo \$\@\n";
print MAKEFILE "foo 1foo: ; \@echo \$\@\n";
close(MAKEFILE);
# TEST 0
&run_make_with_options($makefile, "-j 5foo", &get_logfile);
$answer = "5foo\n";
&compare_output($answer, &get_logfile(1));
&run_make_with_options($makefile, "-j 1foo", &get_logfile);
if (!$parallel_jobs) {
$answer = "$make_name: Parallel jobs (-j) are not supported on this platform.\n$make_name: Resetting to single job (-j1) mode.\n1foo\n";
}
else {
$answer = "1foo\n";
}
# TEST 0
# TEST 1
# This test prints the usage string; I don't really know a good way to
# test it. I guess I could invoke make with a known-bad option to see
@ -24,7 +28,7 @@ $answer = "5foo\n";
# If I were always on UNIX, I could invoke it with 2>/dev/null, then
# just check the error code.
&run_make_with_options($makefile, "-j5foo 2>/dev/null", &get_logfile, 512);
&run_make_with_options($makefile, "-j1foo 2>/dev/null", &get_logfile, 512);
$answer = "";
&compare_output($answer, &get_logfile(1));