mirror of
https://git.savannah.gnu.org/git/make.git
synced 2024-11-25 04:35:44 +00:00
Fix build and test issues on Windows
* src/dep.h (DEP): Remove extraneous semicolon. * src/dir.c (find_directory) [W32]: Replace removed variable. * tests/scripts/features/include: Allow the extra default makefile searched for on Windows. * tests/scripts/functions/file: Use $(info ...) to avoid "command too long" errors on Windows.
This commit is contained in:
parent
0fb6f2d985
commit
1ae90c030d
4 changed files with 15 additions and 7 deletions
|
@ -53,7 +53,7 @@ struct nameseq
|
|||
unsigned int staticpattern : 1; \
|
||||
unsigned int need_2nd_expansion : 1; \
|
||||
unsigned int ignore_automatic_vars : 1; \
|
||||
unsigned int is_explicit : 1;
|
||||
unsigned int is_explicit : 1
|
||||
|
||||
struct dep
|
||||
{
|
||||
|
|
|
@ -522,14 +522,15 @@ find_directory (const char *name)
|
|||
#if defined(WINDOWS32)
|
||||
{
|
||||
char tem[MAXPATHLEN], *tstart, *tend;
|
||||
size_t len = strlen (name);
|
||||
|
||||
/* Remove any trailing slashes. Windows32 stat fails even on
|
||||
valid directories if they end in a slash. */
|
||||
memcpy (tem, name, p - name + 1);
|
||||
memcpy (tem, name, len + 1);
|
||||
tstart = tem;
|
||||
if (tstart[1] == ':')
|
||||
tstart += 2;
|
||||
for (tend = tem + (p - name - 1);
|
||||
for (tend = tem + (len - 1);
|
||||
tend > tstart && (*tend == '/' || *tend == '\\');
|
||||
tend--)
|
||||
*tend = '\0';
|
||||
|
|
|
@ -288,9 +288,15 @@ unlink('hello.mk');
|
|||
# Check the default makefiles... this requires us to invoke make with no
|
||||
# arguments. Also check MAKEFILES
|
||||
|
||||
if ($port_type eq 'W32') {
|
||||
$defaults = "GNUmakefile\nmakefile\nMakefile\nmakefile.mak";
|
||||
} else {
|
||||
$defaults = "GNUmakefile\nmakefile\nMakefile";
|
||||
}
|
||||
|
||||
$ENV{MAKEFILES} = 'foobar barfoo';
|
||||
run_make_with_options(undef, q!-E '%:;@echo $@' -E 'all:;' -E '-include bizbaz' -E '-include bazbiz'!, get_logfile(0));
|
||||
$answer = "bizbaz\nbazbiz\nfoobar\nbarfoo\nGNUmakefile\nmakefile\nMakefile\n#MAKE#: 'all' is up to date.\n";
|
||||
run_make_with_options(undef, ['-E', '%:;@echo $@', '-E', 'all:;', '-E', '-include bizbaz', '-E', '-include bazbiz'], get_logfile(0));
|
||||
$answer = "bizbaz\nbazbiz\nfoobar\nbarfoo\n$defaults\n#MAKE#: 'all' is up to date.\n";
|
||||
&compare_output(subst_make_string($answer), &get_logfile(1));
|
||||
|
||||
1;
|
||||
|
|
|
@ -176,15 +176,16 @@ unlink('file.out');
|
|||
# 200 is the initial size of variable_buffer.
|
||||
# File bigger than 200 bytes causes a realloc.
|
||||
# The size of the file in this test not only exceeds 200 bytes, it exceeds 65k.
|
||||
# Use $(info ...) here to avoid command line limitations
|
||||
|
||||
my $s = "hello world, hello world, hello world, hello world, hello world";
|
||||
my $answer = $s x 2000;
|
||||
create_file('file.out', $answer);
|
||||
run_make_test(q!# <hugestring>
|
||||
X1 := x$(file <file.out)y
|
||||
x:;@echo '$(X1)'
|
||||
x:;@$(info $(X1))
|
||||
!,
|
||||
'', "x${answer}y\n");
|
||||
'', "x${answer}y\n#MAKE#: 'x' is up to date.\n");
|
||||
|
||||
unlink('file.out');
|
||||
|
||||
|
|
Loading…
Reference in a new issue