1 # $NetBSD: suff-main-several.mk,v 1.1 2020/11/22 20:36:17 rillig Exp $
3 # Demonstrate that an inference rule is considered the main target if its
4 # suffixes are not known at the point of declaration.
9 : Making ${.TARGET} from ${.IMPSRC}.
11 # At this point, the above targets are normal targets.
12 # The target '.1.2' is now the default main target.
17 # At this point, 'next-main' is just a regular target.
19 .SUFFIXES: .1 .2 .3 .4
21 # Since the targets '.1.2', '.1.3' and '.1.4' have now been turned into
22 # transformation rules, 'next-main' is the default main target now.
24 .SUFFIXES: # clear all
26 # At this point, 'next-main' is still the default main target, even though
27 # it is not the first regular target anymore.
29 # Define and undefine the suffixes, changing their order.
30 # XXX: This should have no effect, but as of 2020-11-22, it does.
31 # For some reason, mentioning the suffixes in reverse order disables them.
32 .SUFFIXES: .4 .3 .2 .1
34 .SUFFIXES: .1 .2 .3 .4
36 .SUFFIXES: .4 .3 .2 .1
39 : Making ${.TARGET} out of nothing.
40 next-main: suff-main-several.{2,3,4}