sim: build: move generated headers to built sources
authorMike Frysinger <vapier@gentoo.org>
Tue, 3 Jan 2023 02:16:19 +0000 (21:16 -0500)
committerMike Frysinger <vapier@gentoo.org>
Tue, 3 Jan 2023 02:16:19 +0000 (21:16 -0500)
commit80636a54bcfa2bca3dc8f7de4a7825f86585b1f1
tree8ce9098ef414b136eda2416a8155d70dd9db6279
parent3b89a7b8ce97e7e3773bbd1ebcf23b269b2d6669
sim: build: move generated headers to built sources

Automake's automatic header deptracking has a bootstrap problem where
it can't detect generated headers when compiling.  We've been handling
that by adding a custom SIM_ALL_RECURSIVE_DEPS variable, but that only
works when building objects recursively in subdirs.  As we move those
out to the top-level, we don't have any recursive steps anymore.  The
Automake approach is to declare those headers in BUILT_SOURCES.

This isn't completely foolproof as the Automake manual documents: it
only activates for `make all`, not `make foo.o`, but that shouldn't be
a huge limitation as it only affects the initial compile.  After that,
rebuilds should work fine.
14 files changed:
sim/Makefile.am
sim/Makefile.in
sim/bpf/local.mk
sim/cr16/local.mk
sim/cris/local.mk
sim/d10v/local.mk
sim/frv/local.mk
sim/iq2000/local.mk
sim/lm32/local.mk
sim/m32r/local.mk
sim/mips/local.mk
sim/mn10300/local.mk
sim/or1k/local.mk
sim/v850/local.mk