|
Last change
on this file since 282 was 282, checked in by bird, 19 years ago |
|
Initial revision
|
-
Property svn:eol-style
set to
native
-
Property svn:keywords
set to
Author Date Id Revision
|
|
File size:
1002 bytes
|
| Line | |
|---|
| 1 | # -*-perl-*-
|
|---|
| 2 | $description = "Test second expansion in ordinary rules.";
|
|---|
| 3 |
|
|---|
| 4 | $details = "";
|
|---|
| 5 |
|
|---|
| 6 | # Test #1: automatic variables.
|
|---|
| 7 | #
|
|---|
| 8 | run_make_test('
|
|---|
| 9 | .DEFAULT: ; @echo $@
|
|---|
| 10 |
|
|---|
| 11 | foo: bar baz
|
|---|
| 12 |
|
|---|
| 13 | foo: biz | buz
|
|---|
| 14 |
|
|---|
| 15 | foo: $$@.1 \
|
|---|
| 16 | $$<.2 \
|
|---|
| 17 | $$(addsuffix .3,$$^) \
|
|---|
| 18 | $$(addsuffix .4,$$+) \
|
|---|
| 19 | $$|.5 \
|
|---|
| 20 | $$*.6
|
|---|
| 21 |
|
|---|
| 22 | ',
|
|---|
| 23 | '',
|
|---|
| 24 | 'bar
|
|---|
| 25 | baz
|
|---|
| 26 | biz
|
|---|
| 27 | buz
|
|---|
| 28 | foo.1
|
|---|
| 29 | bar.2
|
|---|
| 30 | bar.3
|
|---|
| 31 | baz.3
|
|---|
| 32 | biz.3
|
|---|
| 33 | bar.4
|
|---|
| 34 | baz.4
|
|---|
| 35 | biz.4
|
|---|
| 36 | buz.5
|
|---|
| 37 | .6
|
|---|
| 38 | ');
|
|---|
| 39 |
|
|---|
| 40 |
|
|---|
| 41 | # Test #2: target/pattern -specific variables.
|
|---|
| 42 | #
|
|---|
| 43 | run_make_test('
|
|---|
| 44 | .DEFAULT: ; @echo $@
|
|---|
| 45 |
|
|---|
| 46 | foo.x: $$a $$b
|
|---|
| 47 |
|
|---|
| 48 | foo.x: a := bar
|
|---|
| 49 |
|
|---|
| 50 | %.x: b := baz
|
|---|
| 51 |
|
|---|
| 52 | ',
|
|---|
| 53 | '',
|
|---|
| 54 | 'bar
|
|---|
| 55 | baz
|
|---|
| 56 | ');
|
|---|
| 57 |
|
|---|
| 58 |
|
|---|
| 59 | # Test #3: order of prerequisites.
|
|---|
| 60 | #
|
|---|
| 61 | run_make_test('
|
|---|
| 62 | .DEFAULT: ; @echo $@
|
|---|
| 63 |
|
|---|
| 64 | all: foo bar baz
|
|---|
| 65 |
|
|---|
| 66 | # Subtest #1
|
|---|
| 67 | #
|
|---|
| 68 | foo: foo.1; @:
|
|---|
| 69 |
|
|---|
| 70 | foo: foo.2
|
|---|
| 71 |
|
|---|
| 72 | foo: foo.3
|
|---|
| 73 |
|
|---|
| 74 |
|
|---|
| 75 | # Subtest #2
|
|---|
| 76 | #
|
|---|
| 77 | bar: bar.2
|
|---|
| 78 |
|
|---|
| 79 | bar: bar.1; @:
|
|---|
| 80 |
|
|---|
| 81 | bar: bar.3
|
|---|
| 82 |
|
|---|
| 83 |
|
|---|
| 84 | # Subtest #3
|
|---|
| 85 | #
|
|---|
| 86 | baz: baz.1
|
|---|
| 87 |
|
|---|
| 88 | baz: baz.2
|
|---|
| 89 |
|
|---|
| 90 | baz: ; @:
|
|---|
| 91 |
|
|---|
| 92 | ',
|
|---|
| 93 | '',
|
|---|
| 94 | 'foo.1
|
|---|
| 95 | foo.2
|
|---|
| 96 | foo.3
|
|---|
| 97 | bar.1
|
|---|
| 98 | bar.2
|
|---|
| 99 | bar.3
|
|---|
| 100 | baz.1
|
|---|
| 101 | baz.2
|
|---|
| 102 | ');
|
|---|
| 103 |
|
|---|
| 104 | # This tells the test driver that the perl test script executed properly.
|
|---|
| 105 | 1;
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.