On Tue, Dec 21, 2021 at 03:16:25PM +0100, Jan Beulich wrote:
> On 25.11.2021 14:39, Anthony PERARD wrote:
> > When doing an out-of-tree build, and thus setting VPATH,
> > GNU Make 3.81 on Ubuntu Trusty complains about Circular dependency of
> > include/Makefile and include/xlat.lst and drop them. The build fails
> > later due to headers malformed.
>
> A circular dependency would mean that besides the expected dependency
> there is also one of include/Makefile on include/xlat.lst. Where is
> that? I'm not aware of anything include/Makefile depends on. Is there
> any dependency being introduced in this series, perhaps by way of new
> (generated) dependency files? It would be good to have a clear
> understanding of the issue - as you describe it, it could as well be
> a make flaw.
I've got a bunch of:
make[2]: Circular include/compat/arch-x86_32.i <- include/Makefile dependency
dropped.
Maybe the issue is with:
make[2]: Circular include/compat/.xlat/arch-x86/pmu.lst <- include/xlat.lst
dependency dropped.
make[2]: Circular include/compat/.xlat/arch-x86/pmu.lst <- include/Makefile
dependency dropped.
with rule
$(obj)/compat/.xlat/%.lst: $(src)/xlat.lst $(src)/Makefile
at that mean %.lst have no prerequisite left, so $< is empty in
"grep pattern $<" so there's nothing to grep.
But that doesn't happen every time.
I can't think of anything or find anything which would introduce a
prerequisite for "xlat.lst".
The build seems to work if I only change this rule, to avoid make
looking into VPATH to find $(src)/xlat.lst. Changing this to
"$(srcdir)/xlat.lst" works. But of course, make still complain about
circular dependencies on include/Makefile.
I think I've look for this issue online at the time, but I probably
found the workaround rather than a bug report.
Cheers,
--
Anthony PERARD