diff options
author | Mike Frysinger <vapier@gentoo.org> | 2024-01-02 00:24:22 -0500 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2024-01-02 00:35:59 -0500 |
commit | 93c0f1cf94b4fc70a02567018477d75b8771ab27 (patch) | |
tree | 30cb39e9c904dbf4af853f9cbc33c5512a0fbd9a | |
parent | 82931068f4d6e82e686e384fde89c3b2eb3e349a (diff) | |
download | binutils-93c0f1cf94b4fc70a02567018477d75b8771ab27.zip binutils-93c0f1cf94b4fc70a02567018477d75b8771ab27.tar.gz binutils-93c0f1cf94b4fc70a02567018477d75b8771ab27.tar.bz2 |
sim: ppc: move defines.h generation to the top-level
Since we rely on the top-level config.h now, the defines.h generation
step should live here too.
-rw-r--r-- | sim/Makefile.in | 19 | ||||
-rw-r--r-- | sim/ppc/Makefile.in | 10 | ||||
-rw-r--r-- | sim/ppc/local.mk | 9 |
3 files changed, 24 insertions, 14 deletions
diff --git a/sim/Makefile.in b/sim/Makefile.in index cc6ee92..321506e 100644 --- a/sim/Makefile.in +++ b/sim/Makefile.in @@ -280,11 +280,13 @@ TESTS = testsuite/common/bits32m0$(EXEEXT) \ @SIM_ENABLE_ARCH_or1k_TRUE@am__append_87 = or1k/eng.h @SIM_ENABLE_ARCH_or1k_TRUE@am__append_88 = $(or1k_BUILD_OUTPUTS) @SIM_ENABLE_ARCH_ppc_TRUE@am__append_89 = common/libcommon.a \ -@SIM_ENABLE_ARCH_ppc_TRUE@ $(PPC_IGEN) +@SIM_ENABLE_ARCH_ppc_TRUE@ ppc/defines.h $(PPC_IGEN) @SIM_ENABLE_ARCH_ppc_TRUE@am__append_90 = ppc/run -@SIM_ENABLE_ARCH_ppc_TRUE@am__append_91 = ppc/libigen.a -@SIM_ENABLE_ARCH_ppc_TRUE@am__append_92 = $(ppc_IGEN_TOOLS) -@SIM_ENABLE_ARCH_ppc_TRUE@am__append_93 = $(ppc_IGEN_TOOLS) ppc/libigen.a +@SIM_ENABLE_ARCH_ppc_TRUE@am__append_91 = ppc/defines.h \ +@SIM_ENABLE_ARCH_ppc_TRUE@ ppc/stamp-defines $(ppc_IGEN_TOOLS) \ +@SIM_ENABLE_ARCH_ppc_TRUE@ ppc/libigen.a +@SIM_ENABLE_ARCH_ppc_TRUE@am__append_92 = ppc/libigen.a +@SIM_ENABLE_ARCH_ppc_TRUE@am__append_93 = $(ppc_IGEN_TOOLS) @SIM_ENABLE_ARCH_pru_TRUE@am__append_94 = pru/libsim.a @SIM_ENABLE_ARCH_pru_TRUE@am__append_95 = pru/run @SIM_ENABLE_ARCH_riscv_TRUE@am__append_96 = riscv/libsim.a @@ -1817,7 +1819,7 @@ srccom = $(srcdir)/common srcroot = $(srcdir)/.. SUBDIRS = @subdirs@ pkginclude_HEADERS = $(am__append_1) -EXTRA_LIBRARIES = igen/libigen.a $(am__append_91) +EXTRA_LIBRARIES = igen/libigen.a $(am__append_92) noinst_LIBRARIES = common/libcommon.a $(am__append_3) $(am__append_5) \ $(am__append_7) $(am__append_9) $(am__append_11) \ $(am__append_13) $(am__append_18) $(am__append_23) \ @@ -1848,7 +1850,7 @@ MOSTLYCLEANFILES = core $(SIM_ENABLED_ARCHES:%=%/*.o) \ $(am__append_37) $(am__append_45) $(am__append_49) \ $(am__append_53) $(am__append_57) $(am__append_61) \ $(am__append_75) $(am__append_80) $(am__append_88) \ - $(am__append_93) $(am__append_106) $(am__append_110) + $(am__append_91) $(am__append_106) $(am__append_110) CONFIG_STATUS_DEPENDENCIES = $(srcroot)/bfd/development.sh AM_CFLAGS = \ $(WERROR_CFLAGS) \ @@ -5741,6 +5743,11 @@ testsuite/common/bits64m63.c: testsuite/common/bits-gen$(EXEEXT) testsuite/commo @SIM_ENABLE_ARCH_ppc_TRUE@ppc/main.o: ppc/%.o: ppc/%.c | ppc/libsim.a $(SIM_ALL_RECURSIVE_DEPS) @SIM_ENABLE_ARCH_ppc_TRUE@ $(MAKE) $(AM_MAKEFLAGS) -C $(@D) $(@F) +@SIM_ENABLE_ARCH_ppc_TRUE@ppc/defines.h: ppc/stamp-defines ; @true +@SIM_ENABLE_ARCH_ppc_TRUE@ppc/stamp-defines: config.h Makefile +@SIM_ENABLE_ARCH_ppc_TRUE@ $(AM_V_GEN)sed -n -e '/^#define HAVE_/s/ 1$$/",/' -e '/^#define HAVE_/s//"HAVE_/p' < config.h > ppc/defines.hin +@SIM_ENABLE_ARCH_ppc_TRUE@ $(AM_V_at)$(SHELL) $(srcroot)/move-if-change ppc/defines.hin ppc/defines.h +@SIM_ENABLE_ARCH_ppc_TRUE@ $(AM_V_at)touch $@ @SIM_ENABLE_ARCH_ppc_TRUE@ppc/spreg.c: @MAINT@ ppc/ppc-spr-table ppc/spreg-gen.py ppc/$(am__dirstamp) @SIM_ENABLE_ARCH_ppc_TRUE@ $(AM_V_GEN)$(srcdir)/ppc/spreg-gen.py --source $@.tmp diff --git a/sim/ppc/Makefile.in b/sim/ppc/Makefile.in index 71199fc..2f638b0 100644 --- a/sim/ppc/Makefile.in +++ b/sim/ppc/Makefile.in @@ -489,7 +489,7 @@ PACKAGE_SRC = pk_disklabel.c PACKAGE_OBJ = $(PACKAGE_SRC:.c=.o) -$(TARGETLIB): tmp-igen tmp-hw tmp-defines $(LIB_OBJ) $(GDB_OBJ) +$(TARGETLIB): tmp-igen tmp-hw defines.h $(LIB_OBJ) $(GDB_OBJ) $(ECHO_AR) $(AR) $(AR_FLAGS) $(TARGETLIB) $(LIB_OBJ) $(GDB_OBJ) $(ECHO_RANLIB) $(RANLIB) $(TARGETLIB) @@ -562,12 +562,6 @@ sim-fpu.o: $(srcdir)/../common/sim-fpu.c options.o: options.c $(CPU_H) $(OPTIONS_H) $(DEFINES_H) $(BASICS_H) $(IDECODE_H) $(INLINE) $(LIB_SRC) $(BUILT_SRC) config.status Makefile $(ECHO_CC) $(CC) -c $(STD_CFLAGS) '-DOPCODE_RULES="@sim_opcode@"' '-DIGEN_FLAGS="$(IGEN_FLAGS)"' $(srcdir)/options.c -defines.h: tmp-defines; @true -tmp-defines: Makefile - $(ECHO_GEN) sed -n -e '/^#define HAVE_/s/ 1$$/",/' -e '/^#define HAVE_/s//"HAVE_/p' < ../config.h > tmp-defines.h - $(SILENCE) $(SHELL) $(srcroot)/move-if-change tmp-defines.h defines.h - $(SILENCE) touch $@ - # # Rules to create the built c source code files # @@ -685,7 +679,7 @@ clean mostlyclean: rm -f tmp-* *.[oasi] core $(BUILT_SRC_WO_CONFIG) distclean realclean: clean - rm -f TAGS Makefile config.cache config.status defines.h stamp-h config.log + rm -f TAGS Makefile config.cache config.status stamp-h config.log maintainer-clean: distclean rm -f *~ *.log core *.core diff --git a/sim/ppc/local.mk b/sim/ppc/local.mk index 8bcc7e7..e2d6197 100644 --- a/sim/ppc/local.mk +++ b/sim/ppc/local.mk @@ -33,6 +33,15 @@ SIM_ALL_RECURSIVE_DEPS += common/libcommon.a noinst_PROGRAMS += %D%/run +SIM_ALL_RECURSIVE_DEPS += %D%/defines.h +%D%/defines.h: %D%/stamp-defines ; @true +%D%/stamp-defines: config.h Makefile + $(AM_V_GEN)sed -n -e '/^#define HAVE_/s/ 1$$/",/' -e '/^#define HAVE_/s//"HAVE_/p' < config.h > %D%/defines.hin + $(AM_V_at)$(SHELL) $(srcroot)/move-if-change %D%/defines.hin %D%/defines.h + $(AM_V_at)touch $@ + +MOSTLYCLEANFILES += %D%/defines.h %D%/stamp-defines + %D%/spreg.c: @MAINT@ %D%/ppc-spr-table %D%/spreg-gen.py %D%/$(am__dirstamp) $(AM_V_GEN)$(srcdir)/%D%/spreg-gen.py --source $@.tmp $(AM_V_at)$(SHELL) $(srcroot)/move-if-change $@.tmp $(srcdir)/%D%/spreg.c |