xref: /freebsd/contrib/bmake/unit-tests/suff-lookup.mk (revision 956e45f6fb3e18b8e89b1341708db60c30bb9f27)
1*956e45f6SSimon J. Gerraty# $NetBSD: suff-lookup.mk,v 1.2 2020/10/24 03:18:22 rillig Exp $
2*956e45f6SSimon J. Gerraty#
3*956e45f6SSimon J. Gerraty# Demonstrate name resolution for suffixes.
4*956e45f6SSimon J. Gerraty#
5*956e45f6SSimon J. Gerraty# See also:
6*956e45f6SSimon J. Gerraty#	FindSuffByName
7*956e45f6SSimon J. Gerraty
8*956e45f6SSimon J. Gerraty.MAKEFLAGS: -ds
9*956e45f6SSimon J. Gerraty
10*956e45f6SSimon J. Gerratyall: suff-lookup.cc
11*956e45f6SSimon J. Gerraty
12*956e45f6SSimon J. Gerraty.SUFFIXES: .c .cc .ccc
13*956e45f6SSimon J. Gerraty
14*956e45f6SSimon J. Gerraty# Register '.short' before '.sho'.  When searching for the transformation
15*956e45f6SSimon J. Gerraty# '.sho.c', the suffix '.short' must not be found even though it starts with
16*956e45f6SSimon J. Gerraty# the correct characters.
17*956e45f6SSimon J. Gerraty.SUFFIXES: .short .sho .dead-end
18*956e45f6SSimon J. Gerraty
19*956e45f6SSimon J. Gerraty# From long to short suffix.
20*956e45f6SSimon J. Gerraty.ccc.cc:
21*956e45f6SSimon J. Gerraty	: 'Making ${.TARGET} from ${.IMPSRC}.'
22*956e45f6SSimon J. Gerraty
23*956e45f6SSimon J. Gerraty# From short to long suffix.
24*956e45f6SSimon J. Gerraty.c.ccc:
25*956e45f6SSimon J. Gerraty	: 'Making ${.TARGET} from ${.IMPSRC}.'
26*956e45f6SSimon J. Gerraty
27*956e45f6SSimon J. Gerraty.short.c:
28*956e45f6SSimon J. Gerraty	: 'Making ${.TARGET} from ${.IMPSRC}.'
29*956e45f6SSimon J. Gerraty.sho.c:
30*956e45f6SSimon J. Gerraty	: 'Making ${.TARGET} from ${.IMPSRC}.'
31*956e45f6SSimon J. Gerraty.dead-end.short:
32*956e45f6SSimon J. Gerraty	: 'Making ${.TARGET} from ${.IMPSRC}.'
33*956e45f6SSimon J. Gerraty
34*956e45f6SSimon J. Gerratysuff-lookup.sho:
35*956e45f6SSimon J. Gerraty	: 'Making ${.TARGET} out of nothing.'
36*956e45f6SSimon J. Gerraty
37*956e45f6SSimon J. Gerraty# Deleting all suffixes and adding them again rebuilds all of the above
38*956e45f6SSimon J. Gerraty# transformation rules.
39*956e45f6SSimon J. Gerraty.SUFFIXES:
40*956e45f6SSimon J. Gerraty.SUFFIXES: .c .cc .ccc .short .sho .dead-end
41