From 80636a54bcfa2bca3dc8f7de4a7825f86585b1f1 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 2 Jan 2023 21:16:19 -0500 Subject: 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. --- sim/mips/local.mk | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sim/mips') diff --git a/sim/mips/local.mk b/sim/mips/local.mk index b7efc39..fa70edd 100644 --- a/sim/mips/local.mk +++ b/sim/mips/local.mk @@ -27,6 +27,8 @@ noinst_PROGRAMS += %D%/run %C%_SIM_EXTRA_HW_DEVICES = tx3904cpu tx3904irc tx3904tmr tx3904sio AM_MAKEFLAGS += %C%_SIM_EXTRA_HW_DEVICES="$(%C%_SIM_EXTRA_HW_DEVICES)" +## List all generated headers to help Automake dependency tracking. +BUILT_SOURCES += %D%/itable.h %C%_BUILT_SRC_FROM_IGEN_ITABLE = \ %D%/itable.h \ %D%/itable.c -- cgit v1.1