diff options
author | Mike Frysinger <vapier@gentoo.org> | 2023-01-02 21:16:19 -0500 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2023-01-02 21:16:19 -0500 |
commit | 80636a54bcfa2bca3dc8f7de4a7825f86585b1f1 (patch) | |
tree | 8ce9098ef414b136eda2416a8155d70dd9db6279 /sim/m32r/local.mk | |
parent | 3b89a7b8ce97e7e3773bbd1ebcf23b269b2d6669 (diff) | |
download | binutils-80636a54bcfa2bca3dc8f7de4a7825f86585b1f1.zip binutils-80636a54bcfa2bca3dc8f7de4a7825f86585b1f1.tar.gz binutils-80636a54bcfa2bca3dc8f7de4a7825f86585b1f1.tar.bz2 |
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.
Diffstat (limited to 'sim/m32r/local.mk')
-rw-r--r-- | sim/m32r/local.mk | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sim/m32r/local.mk b/sim/m32r/local.mk index a5e5d88..4f9f2bc 100644 --- a/sim/m32r/local.mk +++ b/sim/m32r/local.mk @@ -27,14 +27,16 @@ noinst_PROGRAMS += %D%/run %C%_SIM_EXTRA_HW_DEVICES = m32r_cache m32r_uart AM_MAKEFLAGS += %C%_SIM_EXTRA_HW_DEVICES="$(%C%_SIM_EXTRA_HW_DEVICES)" -%C%_BUILD_OUTPUTS = \ +## List all generated headers to help Automake dependency tracking. +BUILT_SOURCES += \ %D%/eng.h \ + %D%/engx.h \ + %D%/eng2.h +%C%_BUILD_OUTPUTS = \ %D%/mloop.c \ %D%/stamp-mloop \ - %D%/engx.h \ %D%/mloopx.c \ %D%/stamp-mloop-x \ - %D%/eng2.h \ %D%/mloop2.c \ %D%/stamp-mloop-2 |