Ignore:
Timestamp:
Mar 14, 2018, 10:28:10 PM (7 years ago)
Author:
bird
Message:

kmk: Merged in changes from GNU make 4.2.1 (2e55f5e4abdc0e38c1d64be703b446695e70b3b6 / https://git.savannah.gnu.org/git/make.git).

Location:
trunk/src/kmk
Files:
6 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/src/kmk

  • trunk/src/kmk/tests/scripts/targets/DEFAULT

    r969 r3140  
    3636
    3737# Create the answer to what should be produced by this Makefile
    38 $answer = "${make_name}[1]: Entering directory `$pwd'\n"
     38$answer = "${make_name}[1]: Entering directory '$pwd'\n"
    3939        . "Executing rule BAR\n"
    40         . "${make_name}[1]: Leaving directory `$pwd'\n";
     40        . "${make_name}[1]: Leaving directory '$pwd'\n";
    4141
    4242# COMPARE RESULTS
  • trunk/src/kmk/tests/scripts/targets/INTERMEDIATE

    r1994 r3140  
    4343
    4444&run_make_with_options($makefile,'foo.d',&get_logfile);
    45 $answer = "$make_name: `foo.d' is up to date.\n";
     45$answer = "$make_name: 'foo.d' is up to date.\n";
    4646&compare_output($answer, &get_logfile(1));
    4747
     
    6666
    6767&run_make_with_options($makefile,'foo.c',&get_logfile);
    68 $answer = "$make_name: `foo.c' is up to date.\n";
     68$answer = "$make_name: 'foo.c' is up to date.\n";
    6969&compare_output($answer, &get_logfile(1));
    7070
  • trunk/src/kmk/tests/scripts/targets/ONESHELL

    r2591 r3140  
    55$details = "";
    66
     7# Some shells (*shakes fist at Solaris*) cannot handle multiple flags in
     8# separate arguments.
     9my $t = `/bin/sh -e -c true 2>/dev/null`;
     10my $multi_ok = $? == 0;
    711
    812# Simple
     
    1721[ 0"$a" -eq "$$" ] || echo fail
    1822');
     23
     24# Simple but use multi-word SHELLFLAGS
     25
     26if ($multi_ok) {
     27    run_make_test(q!
     28.ONESHELL:
     29.SHELLFLAGS = -e -c
     30all:
     31        a=$$$$
     32        [ 0"$$a" -eq "$$$$" ] || echo fail
     33!,
     34              '', 'a=$$
     35[ 0"$a" -eq "$$" ] || echo fail
     36');
     37}
    1938
    2039# Again, but this time with inner prefix chars
  • trunk/src/kmk/tests/scripts/targets/POSIX

    r2591 r3140  
    11#                                                                    -*-perl-*-
    22
    3 $description = "Test the behaviour of the .PHONY target.";
     3$description = "Test the behaviour of the .POSIX target.";
    44
    55$details = "";
     
    1818all: ; \@$script
    1919!,
    20               '', "#MAKE#: *** [all] Error $err\n", 512);
     20              '', "#MAKE#: *** [#MAKEFILE#:3: all] Error $err\n", 512);
    2121
    2222# User settings must override .POSIX
     
    3030              '', $out);
    3131
     32# Test the default value of various POSIX-specific variables
     33my %POSIX = (AR => 'ar', ARFLAGS => '-rv',
     34             YACC => 'yacc', YFLAGS => '',
     35             LEX => 'lex', LFLAGS => '',
     36             LDFLAGS => '',
     37             CC => 'c99', CFLAGS => '-O',
     38             FC => 'fort77', FFLAGS => '-O 1',
     39             GET => 'get', GFLAGS => '',
     40             SCCSFLAGS => '', SCCSGETFLAGS => '-s');
     41my $make = join('', map { "\t\@echo '$_=\$($_)'\n" } sort keys %POSIX);
     42my $r = join('', map { "$_=$POSIX{$_}\n"} sort keys %POSIX);
     43run_make_test(qq!
     44.POSIX:
     45all:
     46$make
     47!,
     48              '', $r);
     49
     50# Make sure that local settings take precedence
     51%extraENV = map { $_ => "xx-$_" } keys %POSIX;
     52$r = join('', map { "$_=xx-$_\n"} sort keys %POSIX);
     53run_make_test(undef, '', $r);
     54
    3255# This tells the test driver that the perl test script executed properly.
    33561;
  • trunk/src/kmk/tests/scripts/targets/SECONDARY

    r1994 r3140  
    4545
    4646&run_make_with_options($makefile,'foo.d',&get_logfile);
    47 $answer = "$make_name: `foo.d' is up to date.\n";
     47$answer = "$make_name: 'foo.d' is up to date.\n";
    4848&compare_output($answer, &get_logfile(1));
    4949
     
    6868
    6969&run_make_with_options($makefile,'foo.c',&get_logfile);
    70 $answer = "$make_name: `foo.c' is up to date.\n";
     70$answer = "$make_name: 'foo.c' is up to date.\n";
    7171&compare_output($answer, &get_logfile(1));
    7272
     
    104104
    105105&run_make_with_options($makefile2, '', &get_logfile);
    106 $answer = "$make_name: `final' is up to date.\n";
     106$answer = "$make_name: 'final' is up to date.\n";
    107107&compare_output($answer, &get_logfile(1));
    108108
     
    130130%.c : %.b ; cp $< $@
    131131%.b : %.a ; cp $< $@
    132 all : 1.c 2.c', '-rR -j',
     132all : 1.c 2.c
     1332.a: 1.c', '-rR -j',
    133134'cp 1.a 1.b
     135cp 1.b 1.c
    134136cp 2.a 2.b
    135 cp 1.b 1.c
    136137cp 2.b 2.c
    137138rm 1.b 2.b');
Note: See TracChangeset for help on using the changeset viewer.