From patchwork Tue Jan 2 05:36:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Frysinger X-Patchwork-Id: 83109 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7769E38582A1 for ; Tue, 2 Jan 2024 06:38:56 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) by sourceware.org (Postfix) with ESMTP id 16C5F385840F for ; Tue, 2 Jan 2024 06:37:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 16C5F385840F Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gentoo.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gentoo.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 16C5F385840F Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2001:470:ea4a:1:5054:ff:fec7:86e4 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704177427; cv=none; b=W45JHKzfAbJmEgiSBEVPWodQu5++Hs13qXCBS7AXGkN/RlgLtEzbm45Cu6gu4jqbRoZrio7zOpdhYPOQYy9qNmvubFgsGmEQPDY8dLJNInaBPBm4ODU0928mcbBJE6rinBsQ+jzIMuleAqdG8vDDKLb5I88R33vqjfgMUj1jYuY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704177427; c=relaxed/simple; bh=8OiQ+J8S+H8gaXxueEYUH88BI6CaawxHqhQSJf2xTzw=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=gzozXmmVXOAHfHIhdVhjDXEwp+CauZc9RfBFJ1fwgoVliiEeXtALRHgxAcyEsw3sZYhAW/iiVhWHPifuLa+M1dpWl2GUTv4H/K8k4DXGFfEc7Xlk+Uax1DNaV9nLEMSOZuN9j3j2at/Cl0a530u9UUJuCErobg+iABl9tcUZH5U= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by smtp.gentoo.org (Postfix, from userid 559) id AEE49340813; Tue, 2 Jan 2024 06:37:00 +0000 (UTC) From: Mike Frysinger To: gdb-patches@sourceware.org Subject: [PATCH/submitted 10/10] sim: ppc: move defines.h generation to the top-level Date: Tue, 2 Jan 2024 00:36:38 -0500 Message-ID: <20240102053639.28290-10-vapier@gentoo.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240102053639.28290-1-vapier@gentoo.org> References: <20240102053639.28290-1-vapier@gentoo.org> MIME-Version: 1.0 X-Spam-Status: No, score=-11.3 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Since we rely on the top-level config.h now, the defines.h generation step should live here too. --- sim/Makefile.in | 19 +++++++++++++------ sim/ppc/Makefile.in | 10 ++-------- sim/ppc/local.mk | 9 +++++++++ 3 files changed, 24 insertions(+), 14 deletions(-) diff --git a/sim/ppc/Makefile.in b/sim/ppc/Makefile.in index 71199fc72ede..2f638b093939 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 8bcc7e7b9c39..e2d6197f5dd2 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