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