From patchwork Sat Nov 5 08:27:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Frysinger X-Patchwork-Id: 59988 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 A36BE3858C39 for ; Sat, 5 Nov 2022 08:28:41 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A36BE3858C39 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1667636921; bh=ysK7LOxAwi6mDgysxgsnDxbK6bYrAq7j6/bdpHCvJE0=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=I2Guhi4KklzEXIlERfolBBMZ83j6ATNH7CcKvV/7O7y3xbElGBokMKwH18Sr6Bqom VA9un6zLKHDikFdWhUNaRFWhowdOZ6fW/SxZKrq/01G4H6xv6xeSUBRytcSyExV/wY ddPsmdsuAzSevl7R7SsA2G2v8q8B+AXqfVnRV6tY= X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) by sourceware.org (Postfix) with ESMTP id AD2223858C2B for ; Sat, 5 Nov 2022 08:27:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org AD2223858C2B Received: by smtp.gentoo.org (Postfix, from userid 559) id C684534128D; Sat, 5 Nov 2022 08:27:31 +0000 (UTC) To: gdb-patches@sourceware.org Subject: [PATCH 2/3] sim: build: add uninstall support Date: Sat, 5 Nov 2022 15:27:26 +0700 Message-Id: <20221105082727.32094-2-vapier@gentoo.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221105082727.32094-1-vapier@gentoo.org> References: <20221105082727.32094-1-vapier@gentoo.org> MIME-Version: 1.0 X-Spam-Status: No, score=-11.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP 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.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Mike Frysinger via Gdb-patches From: Mike Frysinger Reply-To: Mike Frysinger Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Sender: "Gdb-patches" This never worked before, but adding it to the common top-level dir is pretty easy to do now that we're unified. --- sim/Makefile.am | 8 +++++ sim/Makefile.in | 66 ++++++++++++++++++++++----------------- sim/common/Make-common.in | 1 + sim/erc32/local.mk | 4 +++ sim/ppc/Makefile.in | 1 + 5 files changed, 52 insertions(+), 28 deletions(-) diff --git a/sim/Makefile.am b/sim/Makefile.am index 523d8f8dec96..4e4068a3539f 100644 --- a/sim/Makefile.am +++ b/sim/Makefile.am @@ -63,6 +63,8 @@ SIM_ALL_RECURSIVE_DEPS = SIM_INSTALL_DATA_LOCAL_DEPS = ## Deps to add to the install-exec-local target. SIM_INSTALL_EXEC_LOCAL_DEPS = +## Deps to add to the uninstall-local target. +SIM_UNINSTALL_LOCAL_DEPS = # Generate target constants for newlib/libgloss from its source tree. # This file is shipped with distributions so we build in the source dir. @@ -165,3 +167,9 @@ install-exec-local: installdirs $(SIM_INSTALL_EXEC_LOCAL_DEPS) $(INSTALL_PROGRAM) $$d/run$(EXEEXT) $(DESTDIR)$(bindir)/$$n$(EXEEXT) || exit 1; \ fi; \ done + +uninstall-local: $(SIM_UNINSTALL_LOCAL_DEPS) + rm -f $(DESTDIR)$(bindir)/run $(DESTDIR)$(libdir)/libsim.a + for d in $(SUBDIRS); do \ + rm -f $(DESTDIR)$(bindir)/run-$$d $(DESTDIR)$(libdir)/libsim-$$d.a; \ + done diff --git a/sim/common/Make-common.in b/sim/common/Make-common.in index bd50f052dae9..290fa2c171d9 100644 --- a/sim/common/Make-common.in +++ b/sim/common/Make-common.in @@ -322,6 +322,7 @@ stamp-modules: Makefile $(SIM_OBJS:.o=.c) install: installdirs: +uninstall: check: diff --git a/sim/erc32/local.mk b/sim/erc32/local.mk index 3b858a671d80..36baeb96614c 100644 --- a/sim/erc32/local.mk +++ b/sim/erc32/local.mk @@ -23,3 +23,7 @@ sim-%D-install-exec-local: installdirs $(AM_V_at)$(MKDIR_P) $(DESTDIR)$(bindir) n=`echo sis | sed '$(program_transform_name)'`; \ $(INSTALL_PROGRAM) %D%/sis$(EXEEXT) $(DESTDIR)$(bindir)/$$n$(EXEEXT) + +SIM_UNINSTALL_LOCAL_DEPS += sim-%D%-uninstall-local +sim-%D%-uninstall-local: + rm -f $(DESTDIR)$(bindir)/sis diff --git a/sim/ppc/Makefile.in b/sim/ppc/Makefile.in index 4fe4fd9597c0..d7b9df0819f4 100644 --- a/sim/ppc/Makefile.in +++ b/sim/ppc/Makefile.in @@ -845,3 +845,4 @@ install-pdf: install: installdirs: +uninstall: