1*0a6a1f1dSLionel Sambuc# $NetBSD: impsrc.mk,v 1.2 2014/08/30 22:21:07 sjg Exp $ 2*0a6a1f1dSLionel Sambuc 3*0a6a1f1dSLionel Sambuc# Does ${.IMPSRC} work properly? 4*0a6a1f1dSLionel Sambuc# It should be set, in order of precedence, to ${.TARGET} of: 5*0a6a1f1dSLionel Sambuc# 1) the implied source of a transformation rule, 6*0a6a1f1dSLionel Sambuc# 2) the first prerequisite from the dependency line of an explicit rule, or 7*0a6a1f1dSLionel Sambuc# 3) the first prerequisite of an explicit rule. 8*0a6a1f1dSLionel Sambuc# 9*0a6a1f1dSLionel Sambuc 10*0a6a1f1dSLionel Sambucall: target1.z target2 target3 target4 11*0a6a1f1dSLionel Sambuc 12*0a6a1f1dSLionel Sambuc.SUFFIXES: .x .y .z 13*0a6a1f1dSLionel Sambuc 14*0a6a1f1dSLionel Sambuc.x.y: source1 15*0a6a1f1dSLionel Sambuc @echo 'expected: target1.x' 16*0a6a1f1dSLionel Sambuc @echo 'actual: $<' 17*0a6a1f1dSLionel Sambuc 18*0a6a1f1dSLionel Sambuc.y.z: source2 19*0a6a1f1dSLionel Sambuc @echo 'expected: target1.y' 20*0a6a1f1dSLionel Sambuc @echo 'actual: $<' 21*0a6a1f1dSLionel Sambuc 22*0a6a1f1dSLionel Sambuctarget1.y: source3 23*0a6a1f1dSLionel Sambuc 24*0a6a1f1dSLionel Sambuctarget1.x: source4 25*0a6a1f1dSLionel Sambuc @echo 'expected: source4' 26*0a6a1f1dSLionel Sambuc @echo 'actual: $<' 27*0a6a1f1dSLionel Sambuc 28*0a6a1f1dSLionel Sambuctarget2: source1 source2 29*0a6a1f1dSLionel Sambuc @echo 'expected: source1' 30*0a6a1f1dSLionel Sambuc @echo 'actual: $<' 31*0a6a1f1dSLionel Sambuc 32*0a6a1f1dSLionel Sambuctarget3: source1 33*0a6a1f1dSLionel Sambuctarget3: source2 source3 34*0a6a1f1dSLionel Sambuc @echo 'expected: source2' 35*0a6a1f1dSLionel Sambuc @echo 'actual: $<' 36*0a6a1f1dSLionel Sambuc 37*0a6a1f1dSLionel Sambuctarget4: source1 38*0a6a1f1dSLionel Sambuctarget4: 39*0a6a1f1dSLionel Sambuc @echo 'expected: source1' 40*0a6a1f1dSLionel Sambuc @echo 'actual: $<' 41*0a6a1f1dSLionel Sambuc 42*0a6a1f1dSLionel Sambucsource1 source2 source3 source4: 43*0a6a1f1dSLionel Sambuc 44