VirtualBox

Ignore:
Timestamp:
Sep 15, 2006 2:30:32 AM (18 years ago)
Author:
bird
Message:

Load make-3.81/ into vendor/gnumake/current.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vendor/gnumake/current/tests/scripts/features/reinvoke

    r53 r501  
    88file, then touch the temp file to make it newer than the makefile.";
    99
    10 $makefile2 = &get_tmpfile;
    11 $makefile_orig = &get_tmpfile;
     10$omkfile = $makefile;
    1211
    13 open(MAKEFILE,"> $makefile");
     12&utouch(-600, 'incl.mk');
     13# For some reason if we don't do this then the test fails for systems
     14# with sub-second timestamps, maybe + NFS?  Not sure.
     15&utouch(-1, 'incl-1.mk');
    1416
    15 print MAKEFILE <<EOM;
     17run_make_test('
     18all: ; @echo running rules.
    1619
    17 all: ; \@echo 'running rules.'
     20#MAKEFILE# incl.mk: incl-1.mk
     21        @echo rebuilding $@
     22        @echo >> $@
    1823
    19 $makefile $makefile2: $makefile_orig
    20         \@echo 'rebuilding \$\@.'
    21         \@echo >> \$\@
     24include incl.mk',
     25              '', "rebuilding incl.mk\nrunning rules.\n");
    2226
    23 include $makefile2
     27# Make sure updating the makefile itself also works
    2428
    25 EOM
     29&utouch(-600, $omkfile);
    2630
    27 close(MAKEFILE);
     31run_make_test(undef, '', "rebuilding #MAKEFILE#\nrunning rules.\n");
    2832
    29 &utouch(-10, $makefile, $makefile2);
    30 &touch($makefile_orig);
     33&rmfiles('incl.mk', 'incl-1.mk');
    3134
    32 &run_make_with_options($makefile, "", &get_logfile, 0);
    33 
    34 # Create the answer to what should be produced by this Makefile
    35 
    36 $answer = "rebuilding $makefile2.\nrebuilding $makefile.\nrunning rules.\n";
    37 
    38 &compare_output($answer,&get_logfile(1))
    39   && unlink "$makefile_orig";
    4035
    4136# In this test we create an included file that's out-of-date, but then
    4237# the rule doesn't update it.  Make shouldn't re-exec.
    4338
    44 $makefile3 = &get_tmpfile;
     39&utouch(-600, 'b','a');
     40#&utouch(-10, 'a');
     41&touch('c');
    4542
    46 open(MAKEFILE, "> $makefile3");
    47 print MAKEFILE <<'EOM';
     43run_make_test('
    4844SHELL = /bin/sh
    4945
     
    5652c: ; echo >> $@
    5753
    58 include $(F)
    59 EOM
    60 
    61 close(MAKEFILE);
    62 
    63 &utouch(-20, 'b','a');
    64 #&utouch(-10, 'a');
    65 &touch('c');
    66 
    67 # First try with the file that's not updated "once removed" from the
    68 # file we're including.
    69 
    70 &run_make_with_options($makefile3, "F=a", &get_logfile, 0);
    71 
    72 $answer = "[ -f b ] || echo >> b\nhello\n";
    73 &compare_output($answer,&get_logfile(1));
     54include $(F)',
     55              'F=a', "[ -f b ] || echo >> b\nhello\n");
    7456
    7557# Now try with the file we're not updating being the actual file we're
    7658# including: this and the previous one test different parts of the code.
    7759
    78 &run_make_with_options($makefile3, "F=b", &get_logfile, 0);
     60run_make_test(undef, "F=b", "[ -f b ] || echo >> b\nhello\n")
    7961
    80 $answer = "[ -f b ] || echo >> b\nhello\n";
    81 &compare_output($answer,&get_logfile(1));
    82 
    83 unlink('a','b','c');
     62&rmfiles('a','b','c');
    8463
    8564# This tells the test driver that the perl test script executed properly.
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette