1 # $NetBSD: suffixes.mk,v 1.3 2014/08/30 22:21:08 sjg Exp $
5 # Issue 3: single suffix rules remain active after .SUFFIXES is cleared
7 # There's a rule for issue3.a, but .a is no longer a known suffix when
8 # targets are being made, so issue3 should not get made.
11 # Issue 4: suffix rules do not become regular rules when .SUFFIXES is cleared
13 # When the rules were encountered, .a and .b were known suffices, but later
14 # on they were forgotten. These should get created as regular targets.
17 # Issue 5: adding more suffixes does not make existing rules into suffix rules
19 # When the targets .c.d, .d.c, .d, .d.e, and .e.d were encountered, only .a,
20 # .b and .c were known suffixes, so all of them were regular rules. Later
21 # rest of the suffixes were made known, so they should all be suffix
22 # transformation rules.
23 all: issue5a.d issue5b.c issue5c issue5d.e issue5e.d
25 # Issue 6: transformation search can end up in an infinite loop
27 # There is no file or target from which issue6.f could be made from so
28 # this should fail. The bug was that because rules .e.f, .d.e and .e.d
29 # exist, make would try to make .f from .e and then infinitely try
30 # to do .e from .d and vice versa.
33 # Issue 10: explicit dependencies affect transformation rule selection
35 # If issue10.e is wanted and both issue10.d and issue10.f are available,
36 # make should choose the .d.e rule, because .d is before .f in .SUFFIXES.
37 # The bug was that if issue10.d had an explicit dependency on issue10.f,
38 # it would choose .f.e instead.
41 # Issue 11: sources from transformation rules are expanded incorrectly
43 # issue11.j should depend on issue11.i and issue11.second and issue11.i
44 # should depend on issue11.h and issue11.first. The bug was that
45 # the dynamic sources were expanded before ${.PREFIX} and ${.TARGET} were
46 # available, so they would have expanded to a null string.
49 # we need to clean for repeatable results
57 @echo
'There should be no text after the colon: ${.IMPSRC}'
60 .c.d .d.c .d .d.e .e.d
:
62 cp
${.IMPSRC
} ${.TARGET
}
65 .SUFFIXES
: .c .d .e .f .g
69 cp
${.IMPSRC
} ${.TARGET
}
72 @echo
'There is a bug if you see this.'
75 issue5a.c issue5b.d issue5c.d issue5d.d issue5e.e issue10.d issue10.f
:
80 .h.i
: ${.PREFIX
}.first
81 @echo
'.ALLSRC: ${.ALLSRC}'
82 cp
${.IMPSRC
} ${.TARGET
}
84 .i.j
: ${.PREFIX
}.second
85 @echo
'.ALLSRC: ${.ALLSRC}'
86 cp
${.IMPSRC
} ${.TARGET
}
88 issue11.h issue11.first issue11.second
: