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/statipattrules

    r284 r501  
    1010to emacs a .el file";
    1111
    12 open(MAKEFILE,"> $makefile");
    13 print MAKEFILE <<'EOF';
     12&touch('bar.c', 'lose.c');
     13
     14#   TEST #0
     15#   -------
     16
     17run_make_test('
    1418files = foo.elc bar.o lose.o
    1519
     
    1721
    1822$(filter %.elc,$(files)): %.elc: %.el ; @echo emacs $<
    19 EOF
    20 close(MAKEFILE);
     23',
     24              '',
     25              'CC -c bar.c -o bar.o');
     26
     27#  TEST #1
     28#  -------
     29
     30run_make_test(undef, 'lose.o', 'CC -c lose.c -o lose.o');
    2131
    2232
    23 &touch('bar.c', 'lose.c');
    24 
    25 #   TEST #1
    26 #   -------
    27 
    28 &run_make_with_options($makefile, '', &get_logfile);
    29 $answer = "CC -c bar.c -o bar.o\n";
    30 &compare_output($answer, &get_logfile(1));
    31 
    32 
    33 #  TEST #2
    34 #  -------
    35 
    36 &run_make_with_options($makefile, 'lose.o', &get_logfile);
    37 $answer = "CC -c lose.c -o lose.o\n";
    38 &compare_output($answer, &get_logfile(1));
    39 
    40 
    41 #   TEST #3
     33#   TEST #2
    4234#   -------
    4335&touch("foo.el");
    4436
    45 &run_make_with_options($makefile, 'foo.elc', &get_logfile);
    46 $answer = "emacs foo.el\n";
    47 &compare_output($answer, &get_logfile(1));
     37run_make_test(undef, 'foo.elc', 'emacs foo.el');
    4838
    49 
     39# Clean up after the first tests.
    5040unlink('foo.el', 'bar.c', 'lose.c');
    5141
    5242
    53 # TEST #4 -- PR/1670: don't core dump on invalid static pattern rules
     43# TEST #3 -- PR/1670: don't core dump on invalid static pattern rules
    5444# -------
    5545
    56 $makefile2 = &get_tmpfile;
    57 open(MAKEFILE, "> $makefile2");
    58 print MAKEFILE "foo: foo%: % ; \@echo \$@\n";
    59 close(MAKEFILE);
     46run_make_test('
     47.DEFAULT: ; @echo $@
     48foo: foo%: % %.x % % % y.% % ; @echo $@
     49',
     50              '', ".x\ny.\nfoo");
    6051
    61 &run_make_with_options($makefile2, '', &get_logfile);
    62 $answer = "foo\n";
    63 &compare_output($answer, &get_logfile(1));
    6452
    65 # TEST #5 -- bug #12180: core dump on a stat pattern rule with an empty
     53# TEST #4 -- bug #12180: core dump on a stat pattern rule with an empty
    6654#                        prerequisite list.
    67 #
    6855run_make_test('
    6956foo.x bar.x: %.x : ; @echo $@
    7057
    7158',
     59              '', 'foo.x');
     60
     61
     62# TEST #5 -- bug #13881: double colon static pattern rule does not
     63#                        substitute %.
     64run_make_test('
     65foo.bar:: %.bar: %.baz
     66foo.baz: ;@:
     67',
     68              '', '');
     69
     70
     71# TEST #6: make sure the second stem does not overwrite the first
     72#          perprerequisite's stem (Savannah bug #16053).
     73#
     74run_make_test('
     75all.foo.bar: %.foo.bar: %.one
     76
     77all.foo.bar: %.bar: %.two
     78
     79all.foo.bar:
     80        @echo $*
     81        @echo $^
     82
     83.DEFAULT:;@:
     84',
    7285'',
    73 'foo.x
    74 ');
     86'all.foo
     87all.one all.foo.two');
     88
     89
     90# TEST #7: make sure the second stem does not overwrite the first
     91#          perprerequisite's stem when second expansion is enabled
     92#          (Savannah bug #16053).
     93#
     94run_make_test('
     95.SECONDEXPANSION:
     96
     97all.foo.bar: %.foo.bar: %.one $$*-one
     98
     99all.foo.bar: %.bar: %.two $$*-two
     100
     101all.foo.bar:
     102        @echo $*
     103        @echo $^
     104
     105.DEFAULT:;@:
     106',
     107'',
     108'all.foo
     109all.one all-one all.foo.two all.foo-two');
    75110
    761111;
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