google / kati

An experimental GNU make clone
Apache License 2.0
941 stars 111 forks source link

Implicit rules cannot invoke other implicit rules #245

Open DelilahHoare opened 2 years ago

DelilahHoare commented 2 years ago

If an implicit rule has an input that does not yet exist but could be made by another implicit rule, it will be skipped.

all: test.a

%.a: %.b
    echo $< > $@

%.b:
    echo $* > $@

This test makefile will successfully create test.a when run by GNU make, but ckati will fail with No rule to make target 'test.a' due to the pattern being declined because test.b does not already exist.

lberki commented 2 years ago

Is this something required to build the Linux kernel?

DelilahHoare commented 2 years ago

Yes. Without this feature the build fails with No rule to make target 'arch/x86/entry/vdso/vdso-image-64.o'. The rule it should be using, $(obj)/vdso-image-%.c, takes $(obj)/vdso%.so as input, which should be built by the rule for $(obj)/%.so.