1 # $NetBSD: use-inference.mk,v 1.2 2020/11/05 00:41:04 rillig Exp $
3 # Demonstrate that .USE rules do not have an effect on inference rules.
4 # At least not in the special case where the inference rule does not
5 # have any associated commands.
13 @echo 'Verbosely making $@ out of $>'
16 # Since this inference rule does not have any associated commands, it
19 # @echo 'Building $@ from $<'
21 use-inference.from: # assume it exists
22 @echo 'Building $@ from nothing'
24 # Possible but unproven explanation:
26 # The main target is "all", which depends on "use-inference.to".
27 # The inference connects the .from to the .to file, otherwise make
28 # would not know that the .from file would need to be built.
30 # The .from file is then built.
32 # After this, make stops since it doesn't know how to make the .to file.
33 # This is strange since make definitely knows about the .from.to suffix
34 # inference rule. But it seems to ignore it, maybe because it doesn't
35 # have any associated commands.
37 # XXX: Despite the error message "don't know how to make", the exit status
38 # is 0. This is inconsistent.