[BACK]Return to impsrc.mk CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / usr.bin / make / unit-tests

File: [cvs.NetBSD.org] / src / usr.bin / make / unit-tests / impsrc.mk (download)

Revision 1.2, Sat Aug 30 22:21:07 2014 UTC (3 years, 4 months ago) by sjg
Branch: MAIN
CVS Tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, pgoyette-localcount-base, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, pgoyette-localcount, perseant-stdc-iso10646-base, perseant-stdc-iso10646, netbsd-8-base, netbsd-8, matt-nb8-mediatek-base, matt-nb8-mediatek, localcount-20160914, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan, HEAD
Changes since 1.1: +3 -3 lines

Replace use of $() with ${}
$() means something special to the shell, so ${} reduces confusion
and is used almost exclusively in the rest of the makefiles.

Discussed with: christos

# $NetBSD: impsrc.mk,v 1.2 2014/08/30 22:21:07 sjg Exp $

# Does ${.IMPSRC} work properly?
# It should be set, in order of precedence, to ${.TARGET} of:
#  1) the implied source of a transformation rule,
#  2) the first prerequisite from the dependency line of an explicit rule, or
#  3) the first prerequisite of an explicit rule.
#

all: target1.z target2 target3 target4

.SUFFIXES: .x .y .z

.x.y: source1
	@echo 'expected: target1.x'
	@echo 'actual:   $<'

.y.z: source2
	@echo 'expected: target1.y'
	@echo 'actual:   $<'

target1.y: source3

target1.x: source4
	@echo 'expected: source4'
	@echo 'actual:   $<'

target2: source1 source2
	@echo 'expected: source1'
	@echo 'actual:   $<'

target3: source1
target3: source2 source3
	@echo 'expected: source2'
	@echo 'actual:   $<'

target4: source1
target4:
	@echo 'expected: source1'
	@echo 'actual:   $<'

source1 source2 source3 source4: