]> CyberLeo.Net >> Repos - FreeBSD/releng/10.3.git/blob - contrib/bmake/unit-tests/impsrc.mk
- Copy stable/10@296371 to releng/10.3 in preparation for 10.3-RC1
[FreeBSD/releng/10.3.git] / contrib / bmake / unit-tests / impsrc.mk
1 # $NetBSD: impsrc.mk,v 1.2 2014/08/30 22:21:07 sjg Exp $
2
3 # Does ${.IMPSRC} work properly?
4 # It should be set, in order of precedence, to ${.TARGET} of:
5 #  1) the implied source of a transformation rule,
6 #  2) the first prerequisite from the dependency line of an explicit rule, or
7 #  3) the first prerequisite of an explicit rule.
8 #
9
10 all: target1.z target2 target3 target4
11
12 .SUFFIXES: .x .y .z
13
14 .x.y: source1
15         @echo 'expected: target1.x'
16         @echo 'actual:   $<'
17
18 .y.z: source2
19         @echo 'expected: target1.y'
20         @echo 'actual:   $<'
21
22 target1.y: source3
23
24 target1.x: source4
25         @echo 'expected: source4'
26         @echo 'actual:   $<'
27
28 target2: source1 source2
29         @echo 'expected: source1'
30         @echo 'actual:   $<'
31
32 target3: source1
33 target3: source2 source3
34         @echo 'expected: source2'
35         @echo 'actual:   $<'
36
37 target4: source1
38 target4:
39         @echo 'expected: source1'
40         @echo 'actual:   $<'
41
42 source1 source2 source3 source4:
43