freebsd-dev/contrib/bmake/unit-tests/suff-lookup.mk
Simon J. Gerraty 956e45f6fb Update to bmake-20201101
Lots of new unit-tests increase code coverage.

Lots of refactoring, cleanup and simlpification to reduce
code size.

Fixes for Bug 223564 and 245807

Updates to dirdeps.mk and meta2deps.py
2020-11-07 21:46:27 +00:00

41 lines
938 B
Makefile

# $NetBSD: suff-lookup.mk,v 1.2 2020/10/24 03:18:22 rillig Exp $
#
# Demonstrate name resolution for suffixes.
#
# See also:
# FindSuffByName
.MAKEFLAGS: -ds
all: suff-lookup.cc
.SUFFIXES: .c .cc .ccc
# Register '.short' before '.sho'. When searching for the transformation
# '.sho.c', the suffix '.short' must not be found even though it starts with
# the correct characters.
.SUFFIXES: .short .sho .dead-end
# From long to short suffix.
.ccc.cc:
: 'Making ${.TARGET} from ${.IMPSRC}.'
# From short to long suffix.
.c.ccc:
: 'Making ${.TARGET} from ${.IMPSRC}.'
.short.c:
: 'Making ${.TARGET} from ${.IMPSRC}.'
.sho.c:
: 'Making ${.TARGET} from ${.IMPSRC}.'
.dead-end.short:
: 'Making ${.TARGET} from ${.IMPSRC}.'
suff-lookup.sho:
: 'Making ${.TARGET} out of nothing.'
# Deleting all suffixes and adding them again rebuilds all of the above
# transformation rules.
.SUFFIXES:
.SUFFIXES: .c .cc .ccc .short .sho .dead-end