mirror of
https://salsa.debian.org/srivasta/make-dfsg.git
synced 2024-12-26 14:00:56 +00:00
Numerous updates to tests for issues found on Cygwin and Windows.
Revert a fix for $? including non-existent files as it shows a bug in the Linux kernel build. Give them a release to fix this. Add some changes from Eli Z. for Windows changes.
This commit is contained in:
parent
afc4906aca
commit
6d8d9b74d9
18 changed files with 140 additions and 100 deletions
25
ChangeLog
25
ChangeLog
|
@ -1,3 +1,17 @@
|
|||
2006-03-09 Paul Smith <psmith@gnu.org>
|
||||
|
||||
* remake.c (update_file_1): Revert the change of 3 Jan 2006 which
|
||||
listed non-existent files as changed. Turns out there's a bug in
|
||||
the Linux kernel builds which means that this change causes
|
||||
everything to rebuild every time. We will re-introduce this fix
|
||||
in the next release, to give them time to fix their build system.
|
||||
Fixes Savannah bug #16002.
|
||||
Introduces Savannah bug #16051.
|
||||
|
||||
* implicit.c (pattern_search) [DOS_PATHS]: Look for DOS paths if
|
||||
we *don't* find UNIX "/".
|
||||
Reported by David Ergo <david.ergo@alterface.com>
|
||||
|
||||
2006-03-04 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* variable.c (do_variable_definition) [WINDOWS32]: Call the shell
|
||||
|
@ -25,6 +39,17 @@
|
|||
(enter_file) [VMS]: Ditto.
|
||||
Patch provided by Hartmut Becker <Hartmut.Becker@hp.com>.
|
||||
|
||||
2006-02-24 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* job.c (construct_command_argv_internal): Fix last change.
|
||||
|
||||
* w32/subproc/sub_proc.c (process_pipe_io): Make dwStdin,
|
||||
dwStdout, and dwStderr unsigned int: avoids compiler warnings in
|
||||
the calls to _beginthreadex.
|
||||
|
||||
* expand.c (recursively_expand_for_file): Initialize `save' to
|
||||
prevent compiler warnings.
|
||||
|
||||
2006-02-18 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* job.c (construct_command_argv_internal): Don't create a temporary
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2006-03-09 Paul Smith <psmith@gnu.org>
|
||||
|
||||
* dospaths.m4: Add MSYS to the list of targets allowing DOS-style
|
||||
pathnames. Reported by David Ergo <david.ergo@alterface.com>.
|
||||
|
||||
2005-07-01 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* Makefile.am (EXTRA_DIST): Added more M4 files to EXTRA_DIST, so
|
||||
|
|
|
@ -22,7 +22,7 @@ AC_DEFUN([pds_AC_DOS_PATHS],
|
|||
AC_CACHE_CHECK([whether system uses MSDOS-style paths], [ac_cv_dos_paths],
|
||||
[
|
||||
AC_COMPILE_IFELSE([
|
||||
#if !defined _WIN32 && !defined __WIN32__ && !defined __MSDOS__ && !defined __EMX__
|
||||
#if !defined _WIN32 && !defined __WIN32__ && !defined __MSDOS__ && !defined __EMX__ && !defined __MSYS__
|
||||
neither MSDOS nor Windows nor OS2
|
||||
#endif
|
||||
],
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
# GNU Make; see the file COPYING. If not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
AC_INIT([GNU make],[3.81rc1],[bug-make@gnu.org])
|
||||
AC_INIT([GNU make],[3.81rc2],[bug-make@gnu.org])
|
||||
|
||||
AC_PREREQ(2.59)
|
||||
AC_REVISION([[$Id$]])
|
||||
|
|
2
expand.c
2
expand.c
|
@ -101,7 +101,7 @@ recursively_expand_for_file (struct variable *v, struct file *file)
|
|||
char *value;
|
||||
const struct floc *this_var;
|
||||
const struct floc **saved_varp;
|
||||
struct variable_set_list *save;
|
||||
struct variable_set_list *save = 0;
|
||||
int set_reading = 0;
|
||||
|
||||
/* Don't install a new location if this location is empty.
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2006-02-24 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* glob.c (my_malloc) [WINDOWS32]: Provide a full ISO C prototype,
|
||||
to avoid compiler warnings.
|
||||
|
||||
2005-06-25 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* fnmatch.h, glob.h [WINDOWS32]: Fix ifdefs in headers.
|
||||
|
|
|
@ -188,12 +188,13 @@ __inline
|
|||
# ifndef __SASC
|
||||
# ifdef WINDOWS32
|
||||
static void *
|
||||
my_realloc (void *p, unsigned int n)
|
||||
# else
|
||||
static char *
|
||||
# endif
|
||||
my_realloc (p, n)
|
||||
char *p;
|
||||
unsigned int n;
|
||||
# endif
|
||||
{
|
||||
/* These casts are the for sake of the broken Ultrix compiler,
|
||||
which warns of illegal pointer combinations otherwise. */
|
||||
|
|
|
@ -354,7 +354,7 @@ pattern_search (struct file *file, int archive,
|
|||
check_lastslash = strchr (target, '/') == 0;
|
||||
#ifdef HAVE_DOS_PATHS
|
||||
/* Didn't find it yet: check for DOS-type directories. */
|
||||
if (!check_lastslash)
|
||||
if (check_lastslash)
|
||||
{
|
||||
char *b = strrchr (target, '\\');
|
||||
check_lastslash = !(b ? b > lastslash
|
||||
|
|
10
job.c
10
job.c
|
@ -2770,9 +2770,13 @@ construct_command_argv_internal (char *line, char **restp, char *shell,
|
|||
/* Some shells do not work well when invoked as 'sh -c xxx' to run a
|
||||
command line (e.g. Cygnus GNUWIN32 sh.exe on WIN32 systems). In these
|
||||
cases, run commands via a script file. */
|
||||
if (just_print_flag)
|
||||
; /* Do nothing here. */
|
||||
if ((no_default_sh_exe || batch_mode_shell) && batch_filename_ptr) {
|
||||
if (just_print_flag) {
|
||||
/* Need to allocate new_argv, although it's unused, because
|
||||
start_job_command will want to free it and its 0'th element. */
|
||||
new_argv = (char **) xmalloc(2 * sizeof (char *));
|
||||
new_argv[0] = xstrdup ("");
|
||||
new_argv[1] = NULL;
|
||||
} else if ((no_default_sh_exe || batch_mode_shell) && batch_filename_ptr) {
|
||||
int temp_fd;
|
||||
FILE* batch = NULL;
|
||||
int id = GetCurrentProcessId();
|
||||
|
|
6
remake.c
6
remake.c
|
@ -530,9 +530,11 @@ update_file_1 (struct file *file, unsigned int depth)
|
|||
|
||||
if (!running)
|
||||
/* The prereq is considered changed if the timestamp has changed while
|
||||
it was built, OR it doesn't exist. */
|
||||
it was built, OR it doesn't exist.
|
||||
This causes the Linux kernel build to break. We'll defer this
|
||||
fix until GNU make 3.82 to give them time to update. */
|
||||
d->changed = ((file_mtime (d->file) != mtime)
|
||||
|| (mtime == NONEXISTENT_MTIME));
|
||||
/* || (mtime == NONEXISTENT_MTIME) */);
|
||||
|
||||
lastd = d;
|
||||
d = d->next;
|
||||
|
|
|
@ -1,3 +1,15 @@
|
|||
2006-03-09 Paul Smith <psmith@gnu.org>
|
||||
|
||||
* scripts/features/escape: Use "pre:" not "p:" to avoid conflicts
|
||||
with DOS drive letters. Fixes Savannah bug #15947.
|
||||
|
||||
* test_driver.pl (run_each_test): Set the status properly even
|
||||
when a test fails to execute. Fixes Savannah bug #15942.
|
||||
|
||||
* scripts/functions/foreach: Use a different environment variable
|
||||
other than PATH to avoid differences with Windows platforms.
|
||||
Fixes Savannah bug #15938.
|
||||
|
||||
2006-03-05 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* run_make_tests.pl (set_more_defaults): Add CYGWIN_NT as a port
|
||||
|
|
|
@ -6,55 +6,53 @@ Make sure that escaping of `:' works in target names.
|
|||
Make sure escaping of whitespace works in target names.
|
||||
Make sure that escaping of '#' works.";
|
||||
|
||||
open(MAKEFILE,"> $makefile");
|
||||
|
||||
print MAKEFILE <<'EOF';
|
||||
$(path)foo : ; @echo cp $^ $@
|
||||
|
||||
foo\ bar: ; @echo 'touch "$@"'
|
||||
|
||||
sharp: foo\#bar.ext
|
||||
foo\#bar.ext: ; @echo foo\#bar.ext = '$@'
|
||||
EOF
|
||||
|
||||
close(MAKEFILE);
|
||||
|
||||
|
||||
# TEST 1
|
||||
|
||||
&run_make_with_options($makefile, "", &get_logfile);
|
||||
$answer = "cp foo\n";
|
||||
&compare_output($answer,&get_logfile(1));
|
||||
run_make_test('
|
||||
$(path)foo : ; @echo "touch ($@)"
|
||||
|
||||
foo\ bar: ; @echo "touch ($@)"
|
||||
|
||||
sharp: foo\#bar.ext
|
||||
foo\#bar.ext: ; @echo "foo#bar.ext = ($@)"',
|
||||
'',
|
||||
'touch (foo)');
|
||||
|
||||
# TEST 2: This one should fail, since the ":" is unquoted.
|
||||
|
||||
&run_make_with_options($makefile, "path=p:", &get_logfile, 512);
|
||||
$answer = "$makefile:1: *** target pattern contains no `%'. Stop.\n";
|
||||
&compare_output($answer,&get_logfile(1));
|
||||
run_make_test(undef,
|
||||
'path=pre:',
|
||||
"#MAKEFILE#:2: *** target pattern contains no `%'. Stop.",
|
||||
512);
|
||||
|
||||
# TEST 3: This one should work, since we escape the ":".
|
||||
|
||||
&run_make_with_options($makefile, "'path=p\\:'", &get_logfile, 0);
|
||||
$answer = "cp p:foo\n";
|
||||
&compare_output($answer,&get_logfile(1));
|
||||
run_make_test(undef,
|
||||
"'path=pre\\:'",
|
||||
'touch (pre:foo)');
|
||||
|
||||
# TEST 4: This one should fail, since the escape char is escaped.
|
||||
|
||||
&run_make_with_options($makefile, "'path=p\\\\:'", &get_logfile, 512);
|
||||
$answer = "$makefile:1: *** target pattern contains no `%'. Stop.\n";
|
||||
&compare_output($answer,&get_logfile(1));
|
||||
run_make_test(undef,
|
||||
"'path=pre\\\\:'",
|
||||
"#MAKEFILE#:2: *** target pattern contains no `%'. Stop.",
|
||||
512);
|
||||
|
||||
# TEST 5: This one should work
|
||||
|
||||
&run_make_with_options($makefile, "'foo bar'", &get_logfile, 0);
|
||||
$answer = "touch \"foo bar\"\n";
|
||||
&compare_output($answer,&get_logfile(1));
|
||||
run_make_test(undef,
|
||||
"'foo bar'",
|
||||
'touch (foo bar)');
|
||||
|
||||
# TEST 6: Test escaped comments
|
||||
|
||||
&run_make_with_options($makefile, "sharp", &get_logfile, 0);
|
||||
$answer = "foo#bar.ext = foo#bar.ext\n";
|
||||
&compare_output($answer,&get_logfile(1));
|
||||
run_make_test(undef,
|
||||
'sharp',
|
||||
'foo#bar.ext = (foo#bar.ext)');
|
||||
|
||||
# This tells the test driver that the perl test script executed properly.
|
||||
1;
|
||||
|
|
|
@ -1,10 +1,7 @@
|
|||
# -*-perl-*-
|
||||
# $Id$
|
||||
|
||||
# Updated 16 June 1993 variable "MAKE" is default was environment override
|
||||
# For make 3.63 and above
|
||||
|
||||
$description = "The following test creates a makefile to verify
|
||||
test the foreach function.";
|
||||
$description = "Test the foreach function.";
|
||||
|
||||
$details = "This is a test of the foreach function in gnu make.
|
||||
This function starts with a space separated list of
|
||||
|
@ -16,14 +13,12 @@ types of foreach loops are tested\n";
|
|||
|
||||
# TEST 0
|
||||
|
||||
# On WIN32 systems, the user's path is found in %Path% ($Path)
|
||||
#
|
||||
$pathvar = (($port_type eq 'Windows') ? "Path" : "PATH");
|
||||
# Set an environment variable that we can test in the makefile.
|
||||
$extraENV{FOOFOO} = 'foo foo';
|
||||
|
||||
run_make_test("
|
||||
run_make_test("space = ' '".'
|
||||
null :=
|
||||
space = ' '
|
||||
auto_var = udef space CC null $pathvar".' MAKE foo CFLAGS WHITE @ <
|
||||
auto_var = udef space CC null FOOFOO MAKE foo CFLAGS WHITE @ <
|
||||
foo = bletch null @ garf
|
||||
av = $(foreach var, $(auto_var), $(origin $(var)) )
|
||||
override WHITE := BLACK
|
||||
|
@ -36,6 +31,7 @@ for2: ; @echo $(fe)',
|
|||
"undefined file default file environment default file command line override automatic automatic
|
||||
foo.o bletch.o null.o @.o garf.o .o .o undefined.o file.o default.o file.o environment.o default.o file.o command.o line.o override.o automatic.o automatic.o");
|
||||
|
||||
delete $extraENV{FOOFOO};
|
||||
|
||||
# TEST 1: Test that foreach variables take precedence over global
|
||||
# variables in a global scope (like inside an eval). Tests bug #11913
|
||||
|
|
|
@ -18,34 +18,24 @@ defined per the following list:
|
|||
# Set an environment variable
|
||||
$extraENV{MAKETEST} = 1;
|
||||
|
||||
open(MAKEFILE,"> $makefile");
|
||||
|
||||
print MAKEFILE <<EOF;
|
||||
run_make_test('
|
||||
foo := bletch garf
|
||||
auto_var = udef CC MAKETEST MAKE foo CFLAGS WHITE \@
|
||||
av = \$(foreach var, \$(auto_var), \$(origin \$(var)) )
|
||||
auto_var = undefined CC MAKETEST MAKE foo CFLAGS WHITE @
|
||||
av = $(foreach var, $(auto_var), $(origin $(var)) )
|
||||
override WHITE := BLACK
|
||||
all: auto
|
||||
\t\@echo \$(origin undefined)
|
||||
\t\@echo \$(origin CC)
|
||||
\t\@echo \$(origin MAKETEST)
|
||||
\t\@echo \$(origin MAKE)
|
||||
\t\@echo \$(origin foo)
|
||||
\t\@echo \$(origin CFLAGS)
|
||||
\t\@echo \$(origin WHITE)
|
||||
\t\@echo \$(origin \@)
|
||||
@echo $(origin undefined)
|
||||
@echo $(origin CC)
|
||||
@echo $(origin MAKETEST)
|
||||
@echo $(origin MAKE)
|
||||
@echo $(origin foo)
|
||||
@echo $(origin CFLAGS)
|
||||
@echo $(origin WHITE)
|
||||
@echo $(origin @)
|
||||
auto :
|
||||
\t\@echo \$(av)
|
||||
EOF
|
||||
|
||||
close(MAKEFILE);
|
||||
|
||||
&run_make_with_options($makefile,
|
||||
"-e WHITE=WHITE CFLAGS=",
|
||||
&get_logfile);
|
||||
|
||||
# Create the answer to what should be produced by this Makefile
|
||||
$answer = "undefined default environment default file command line override automatic
|
||||
@echo $(av)',
|
||||
'-e WHITE=WHITE CFLAGS=',
|
||||
'undefined default environment default file command line override automatic
|
||||
undefined
|
||||
default
|
||||
environment
|
||||
|
@ -53,9 +43,9 @@ default
|
|||
file
|
||||
command line
|
||||
override
|
||||
automatic\n";
|
||||
automatic');
|
||||
|
||||
|
||||
&compare_output($answer,&get_logfile(1));
|
||||
# Reset an environment variable
|
||||
delete $extraENV{MAKETEST};
|
||||
|
||||
1;
|
||||
|
|
|
@ -10,7 +10,10 @@ $details = "Verify that symlink handling with and without -L works properly.";
|
|||
# (in that the symlink() function doesn't fail) but it really doesn't, so
|
||||
# check for it explicitly.
|
||||
|
||||
if ($port_type ne 'W32' && eval { symlink("",""); 1 }) {
|
||||
if ($port_type eq 'W32' || !( eval { symlink("",""); 1 })) {
|
||||
# This test is N/A
|
||||
-1;
|
||||
} else {
|
||||
|
||||
# Set up a symlink sym -> dep
|
||||
# We'll make both dep and targ older than sym
|
||||
|
@ -60,6 +63,6 @@ if ($port_type ne 'W32' && eval { symlink("",""); 1 }) {
|
|||
|
||||
|
||||
rmfiles('targ', 'sym');
|
||||
}
|
||||
|
||||
1;
|
||||
1;
|
||||
}
|
||||
|
|
|
@ -95,14 +95,17 @@ mbr.src: ; @:',
|
|||
# Make sure that nonexistent prerequisites are listed in $?, since they are
|
||||
# considered reasons for the target to be rebuilt.
|
||||
#
|
||||
touch('foo');
|
||||
# This was undone due to Savannah bug #16002. We'll re-do it in the next
|
||||
# release. See Savannah bug #16051.
|
||||
|
||||
run_make_test('
|
||||
foo: bar ; @echo "\$$? = $?"
|
||||
bar: ;',
|
||||
'',
|
||||
'$? = bar');
|
||||
|
||||
unlink('foo');
|
||||
#touch('foo');
|
||||
#
|
||||
#run_make_test('
|
||||
#foo: bar ; @echo "\$$? = $?"
|
||||
#bar: ;',
|
||||
# '',
|
||||
# '$? = bar');
|
||||
#
|
||||
#unlink('foo');
|
||||
|
||||
1;
|
||||
|
|
|
@ -427,8 +427,7 @@ sub run_each_test
|
|||
$diffext = 'd';
|
||||
$baseext = 'b';
|
||||
$extext = '';
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$logext = 'log';
|
||||
$diffext = 'diff';
|
||||
$baseext = 'base';
|
||||
|
@ -459,12 +458,9 @@ sub run_each_test
|
|||
if (!defined($code))
|
||||
{
|
||||
$suite_passed = 0;
|
||||
if (length ($@))
|
||||
{
|
||||
if (length ($@)) {
|
||||
warn "\n*** Test died ($testname): $@\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
warn "\n*** Couldn't run $perl_testname\n";
|
||||
}
|
||||
}
|
||||
|
@ -490,7 +486,7 @@ sub run_each_test
|
|||
&rmfiles ($base_filename . &num_suffix ($i) );
|
||||
}
|
||||
}
|
||||
elsif ($code > 0) {
|
||||
elsif (!defined $code || $code > 0) {
|
||||
$status = "FAILED ($tests_passed/$tests_run passed)";
|
||||
}
|
||||
elsif ($code < 0) {
|
||||
|
|
|
@ -685,7 +685,7 @@ process_pipe_io(
|
|||
bool_t stdin_eof = FALSE, stdout_eof = FALSE, stderr_eof = FALSE;
|
||||
HANDLE childhand = (HANDLE) pproc->pid;
|
||||
HANDLE tStdin = NULL, tStdout = NULL, tStderr = NULL;
|
||||
DWORD dwStdin, dwStdout, dwStderr;
|
||||
unsigned int dwStdin, dwStdout, dwStderr;
|
||||
HANDLE wait_list[4];
|
||||
DWORD wait_count;
|
||||
DWORD wait_return;
|
||||
|
@ -704,8 +704,8 @@ process_pipe_io(
|
|||
pproc->sv_stdin[0] = 0;
|
||||
} else {
|
||||
tStdin = (HANDLE) _beginthreadex( 0, 1024,
|
||||
(unsigned (__stdcall *) (void *))proc_stdin_thread, pproc, 0,
|
||||
(unsigned int *) &dwStdin);
|
||||
(unsigned (__stdcall *) (void *))proc_stdin_thread,
|
||||
pproc, 0, &dwStdin);
|
||||
if (tStdin == 0) {
|
||||
pproc->last_err = GetLastError();
|
||||
pproc->lerrno = E_SCALL;
|
||||
|
@ -718,10 +718,10 @@ process_pipe_io(
|
|||
*/
|
||||
tStdout = (HANDLE) _beginthreadex( 0, 1024,
|
||||
(unsigned (__stdcall *) (void *))proc_stdout_thread, pproc, 0,
|
||||
(unsigned int *) &dwStdout);
|
||||
&dwStdout);
|
||||
tStderr = (HANDLE) _beginthreadex( 0, 1024,
|
||||
(unsigned (__stdcall *) (void *))proc_stderr_thread, pproc, 0,
|
||||
(unsigned int *) &dwStderr);
|
||||
&dwStderr);
|
||||
|
||||
if (tStdout == 0 || tStderr == 0) {
|
||||
|
||||
|
|
Loading…
Reference in a new issue