* 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> 2000-06-14 Paul D. Smith <psmith@gnu.org>
* acinclude.m4 (pds_WITH_GETTEXT): rewrite fp_WITH_GETTEXT and * acinclude.m4 (pds_WITH_GETTEXT): rewrite fp_WITH_GETTEXT and

View File

@ -15,26 +15,25 @@ VPATH = $(srcdir)
prefix = /dev/env/DJDIR prefix = /dev/env/DJDIR
exec_prefix = ${prefix} exec_prefix = ${prefix}
bindir = ${exec_prefix}/bin bindir = /bin
datadir = ${prefix}/share datadir = /share
libdir = ${prefix}/lib libdir = /lib
infodir = ${prefix}/info infodir = /info
# DJGPP doesn't have separate man tree, use info instead. mandir = /man
mandir = ${prefix}/info includedir = /include
includedir = ${prefix}/include
oldincludedir = c:/djgpp/include oldincludedir = c:/djgpp/include
DESTDIR = DESTDIR = /dev/env/DJDIR
pkgdatadir = $(datadir)/make pkgdatadir = $(datadir)/make
pkglibdir = $(libdir)/make pkglibdir = $(libdir)/make
pkgincludedir = $(includedir)/make pkgincludedir = $(includedir)/make
localedir = $(prefix)/share/locale localedir = $(datadir)/locale
INSTALL = ${bindir}/ginstall -c INSTALL = ${exec_prefix}/bin/ginstall -c
INSTALL_PROGRAM = ${bindir}/ginstall -c INSTALL_PROGRAM = ${exec_prefix}/bin/ginstall -c
INSTALL_DATA = ${bindir}/ginstall -c -m 644 INSTALL_DATA = ${exec_prefix}/bin/ginstall -c -m 644
INSTALL_SCRIPT = ${bindir}/ginstall -c INSTALL_SCRIPT = ${exec_prefix}/bin/ginstall -c
transform = s,x,x, transform = s,x,x,
# This will fail even if they don't have a Unix-like shell (stock DOS # This will fail even if they don't have a Unix-like shell (stock DOS
@ -52,7 +51,7 @@ AR = ar
CC = gcc CC = gcc
CPP = gcc -E CPP = gcc -E
LIBOBJS = LIBOBJS =
MAKEINFO = ${bindir}/makeinfo MAKEINFO = ${exec_prefix}/bin/makeinfo
PACKAGE = make PACKAGE = make
PERL = perl PERL = perl
RANLIB = ranlib 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 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 SUBDIRS = glob
mkinstalldirs = ${bindir}/gmkdir -p mkinstalldirs = ${exec_prefix}/bin/gmkdir -p
CONFIG_HEADER = config.h CONFIG_HEADER = config.h
CONFIG_CLEAN_FILES = build.sh CONFIG_CLEAN_FILES = build.sh
PROGRAMS = $(bin_PROGRAMS) 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 will also need GNU Fileutils and GNU Sed for this (they should
be available from the DJGPP sites). 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 Without a Unix-style shell, you will have to install programs
and the docs manually. Copy make.exe to a directory on your and the docs manually. Copy make.exe to a directory on your
PATH, make.i* info files to your Info directory, and update the 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>.]) AC_DEFINE(HAVE_LIBINTL_H, 1, [Define if you have <libintl.h>.])
else else
with_included_gettext=yes with_included_gettext=yes
LIBS="$fp_keep_LIBS" LIBS="$pds_keep_LIBS"
fi fi
fi fi
]) ])

View File

@ -23,6 +23,9 @@
#endif #endif
/* Define if you have the fdopen function. */
#define HAVE_FDOPEN 1
/* Define if you have sigsetmask. */ /* Define if you have sigsetmask. */
#define HAVE_SIGSETMASK 1 #define HAVE_SIGSETMASK 1
@ -32,6 +35,9 @@
/* Define if you have the memmove function. */ /* Define if you have the memmove function. */
#define HAVE_MEMMOVE 1 #define HAVE_MEMMOVE 1
/* Define if you have the mkstemp function. */
#define HAVE_MKSTEMP 1
#define SCCS_GET "get" #define SCCS_GET "get"
/* Define to `unsigned long' or `unsigned long long' /* 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_PREREQ(2.13)dnl dnl Minimum Autoconf version required.
AC_INIT(vpath.c)dnl dnl A distinctive file to look for in srcdir. 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) AM_CONFIG_HEADER(config.h)
dnl Regular configure stuff 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 2.5.1 needs -lposix4 to get the clock_gettime function.
# Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4. # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
AC_SEARCH_LIBS(clock_gettime, [rt posix4]) 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, AC_DEFINE(HAVE_CLOCK_GETTIME, 1,
[Define if you have the clock_gettime function.]) [Define if you have the clock_gettime function.])
fi 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, the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */ Boston, MA 02111-1307, USA. */
#include "make.h"
#include <assert.h> #include <assert.h>
#include "make.h"
#include "filedef.h" #include "filedef.h"
#include "job.h" #include "job.h"
#include "commands.h" #include "commands.h"
@ -426,6 +427,9 @@ expand_argument (str, end)
{ {
char *tmp; char *tmp;
if (str == end)
return xstrdup("");
if (!end || *end == '\0') if (!end || *end == '\0')
tmp = str; tmp = str;
else 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, the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */ Boston, MA 02111-1307, USA. */
#include "make.h"
#include <assert.h> #include <assert.h>
#include "make.h"
#include "dep.h" #include "dep.h"
#include "filedef.h" #include "filedef.h"
#include "job.h" #include "job.h"

View File

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

View File

@ -1,5 +1,5 @@
/* Implicit rule searching for GNU Make. /* 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. This file is part of GNU Make.
GNU Make is free software; you can redistribute it and/or modify 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. */ /* The start and length of the stem of FILENAME for the current rule. */
register char *stem = 0; register char *stem = 0;
register unsigned int stemlen = 0; register unsigned int stemlen = 0;
register unsigned int fullstemlen = 0;
/* Buffer in which we store all the rules that are possibly applicable. */ /* Buffer in which we store all the rules that are possibly applicable. */
struct rule **tryrules struct rule **tryrules
@ -582,18 +583,23 @@ pattern_search (file, archive, depth, recursions)
} }
if (!checked_lastslash[foundrule]) if (!checked_lastslash[foundrule])
/* Always allocate new storage, since STEM might be {
on the stack for an intermediate file. */ /* Always allocate new storage, since STEM might be
file->stem = savestring (stem, stemlen); on the stack for an intermediate file. */
file->stem = savestring (stem, stemlen);
fullstemlen = stemlen;
}
else else
{ {
int dirlen = (lastslash + 1) - filename;
/* We want to prepend the directory from /* We want to prepend the directory from
the original FILENAME onto the stem. */ the original FILENAME onto the stem. */
file->stem = (char *) xmalloc (((lastslash + 1) - filename) fullstemlen = dirlen + stemlen;
+ stemlen + 1); file->stem = (char *) xmalloc (fullstemlen + 1);
bcopy (filename, file->stem, (lastslash + 1) - filename); bcopy (filename, file->stem, dirlen);
bcopy (stem, file->stem + ((lastslash + 1) - filename), stemlen); bcopy (stem, file->stem + dirlen, stemlen);
file->stem[((lastslash + 1) - filename) + stemlen] = '\0'; file->stem[fullstemlen] = '\0';
} }
file->cmds = rule->cmds; file->cmds = rule->cmds;
@ -606,12 +612,12 @@ pattern_search (file, archive, depth, recursions)
if (i != matches[foundrule]) if (i != matches[foundrule])
{ {
struct dep *new = (struct dep *) xmalloc (sizeof (struct dep)); 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, bcopy (rule->targets[i], p,
rule->suffixes[i] - rule->targets[i] - 1); rule->suffixes[i] - rule->targets[i] - 1);
p += rule->suffixes[i] - rule->targets[i] - 1; p += rule->suffixes[i] - rule->targets[i] - 1;
bcopy (stem, p, stemlen); bcopy (file->stem, p, fullstemlen);
p += stemlen; p += fullstemlen;
bcopy (rule->suffixes[i], p, bcopy (rule->suffixes[i], p,
rule->lens[i] - (rule->suffixes[i] - rule->targets[i]) + 1); rule->lens[i] - (rule->suffixes[i] - rule->targets[i]) + 1);
new->file = enter_file (new->name); 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, the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */ Boston, MA 02111-1307, USA. */
#include "make.h"
#include <assert.h> #include <assert.h>
#include "make.h"
#include "job.h" #include "job.h"
#include "debug.h" #include "debug.h"
#include "filedef.h" #include "filedef.h"

6
make.h
View File

@ -39,6 +39,11 @@ Boston, MA 02111-1307, USA. */
# define PARAMS(protos) () # define PARAMS(protos) ()
#endif /* C++ or ANSI C. */ #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 /* 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. */ 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 # define __NO_STRING_INLINES
#endif #endif
#define _GNU_SOURCE 1
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <signal.h> #include <signal.h>

View File

@ -1155,7 +1155,7 @@ f_mtime (file, search)
FILE_TIMESTAMP adjusted_mtime = mtime; FILE_TIMESTAMP adjusted_mtime = mtime;
#if defined WINDOWS32 || defined _MSDOS__ #if defined(WINDOWS32) || defined(__MSDOS__)
FILE_TIMESTAMP adjustment; FILE_TIMESTAMP adjustment;
#ifdef WINDOWS32 #ifdef WINDOWS32
/* FAT filesystems round time to the nearest even second! /* 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> 2000-05-24 Paul D. Smith <psmith@gnu.org>
* scripts/options/general: Test general option processing (PR/1716). * 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 " # -*-perl-*-
."function."; $description = "Test the addsuffix function.";
$details = ""; $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"); open(MAKEFILE,"> $makefile");
# The Contents of the MAKEFILE ... # The Contents of the MAKEFILE ...
print MAKEFILE "string := \$(addsuffix .c,src${pathsep}a.b.z.foo hacks) \n" print MAKEFILE <<EOMAKE;
."all: \n" string := \$(addsuffix .c,src${pathsep}a.b.z.foo hacks)
."\t\@echo \$(string) \n"; one: ; \@echo \$(string)
# END of Contents of MAKEFILE two: ; \@echo \$(addsuffix foo,)
EOMAKE
close(MAKEFILE); 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"; $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)); &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. # This tells the test driver that the perl test script executed properly.
1; 1;

View File

@ -5,17 +5,21 @@ open(MAKEFILE, "> $makefile");
# The Contents of the MAKEFILE ... # The Contents of the MAKEFILE ...
print MAKEFILE "foo 5foo: ; \@echo \$\@\n"; print MAKEFILE "foo 1foo: ; \@echo \$\@\n";
close(MAKEFILE); close(MAKEFILE);
# TEST 0 # TEST 0
&run_make_with_options($makefile, "-j 5foo", &get_logfile); &run_make_with_options($makefile, "-j 1foo", &get_logfile);
$answer = "5foo\n"; if (!$parallel_jobs) {
&compare_output($answer, &get_logfile(1)); $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 # 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 # 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 # If I were always on UNIX, I could invoke it with 2>/dev/null, then
# just check the error code. # 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 = ""; $answer = "";
&compare_output($answer, &get_logfile(1)); &compare_output($answer, &get_logfile(1));