aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2022-11-05 14:44:15 +0700
committerMike Frysinger <vapier@gentoo.org>2022-11-05 16:26:15 +0700
commit59d8576e4ff7e6467fab3ea894baa72c8400e22a (patch)
tree7d4c766b4c8eb7349f23c87a435615914c463393
parent63bf33ff90b1bf1e2278259648173bfebaac2e9c (diff)
downloadgdb-59d8576e4ff7e6467fab3ea894baa72c8400e22a.zip
gdb-59d8576e4ff7e6467fab3ea894baa72c8400e22a.tar.gz
gdb-59d8576e4ff7e6467fab3ea894baa72c8400e22a.tar.bz2
sim: build: add uninstall support
This never worked before, but adding it to the common top-level dir is pretty easy to do now that we're unified.
-rw-r--r--sim/Makefile.am8
-rw-r--r--sim/Makefile.in66
-rw-r--r--sim/common/Make-common.in1
-rw-r--r--sim/erc32/local.mk4
-rw-r--r--sim/ppc/Makefile.in1
5 files changed, 52 insertions, 28 deletions
diff --git a/sim/Makefile.am b/sim/Makefile.am
index 523d8f8..4e4068a 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/Makefile.in b/sim/Makefile.in
index 7591aaa..e9ba210 100644
--- a/sim/Makefile.in
+++ b/sim/Makefile.in
@@ -136,34 +136,35 @@ TESTS = testsuite/common/bits32m0$(EXEEXT) \
@SIM_ENABLE_ARCH_d10v_TRUE@am__append_15 = d10v/gencode
@SIM_ENABLE_ARCH_d10v_TRUE@am__append_16 = $(d10v_BUILD_OUTPUTS)
@SIM_ENABLE_ARCH_erc32_TRUE@am__append_17 = sim-%D-install-exec-local
-@SIM_ENABLE_ARCH_frv_TRUE@am__append_18 = $(frv_BUILD_OUTPUTS)
+@SIM_ENABLE_ARCH_erc32_TRUE@am__append_18 = sim-erc32-uninstall-local
@SIM_ENABLE_ARCH_frv_TRUE@am__append_19 = $(frv_BUILD_OUTPUTS)
-@SIM_ENABLE_ARCH_iq2000_TRUE@am__append_20 = $(iq2000_BUILD_OUTPUTS)
+@SIM_ENABLE_ARCH_frv_TRUE@am__append_20 = $(frv_BUILD_OUTPUTS)
@SIM_ENABLE_ARCH_iq2000_TRUE@am__append_21 = $(iq2000_BUILD_OUTPUTS)
-@SIM_ENABLE_ARCH_lm32_TRUE@am__append_22 = $(lm32_BUILD_OUTPUTS)
+@SIM_ENABLE_ARCH_iq2000_TRUE@am__append_22 = $(iq2000_BUILD_OUTPUTS)
@SIM_ENABLE_ARCH_lm32_TRUE@am__append_23 = $(lm32_BUILD_OUTPUTS)
-@SIM_ENABLE_ARCH_m32c_TRUE@am__append_24 = $(m32c_BUILD_OUTPUTS)
-@SIM_ENABLE_ARCH_m32c_TRUE@am__append_25 = m32c/opc2c
-@SIM_ENABLE_ARCH_m32c_TRUE@am__append_26 = \
+@SIM_ENABLE_ARCH_lm32_TRUE@am__append_24 = $(lm32_BUILD_OUTPUTS)
+@SIM_ENABLE_ARCH_m32c_TRUE@am__append_25 = $(m32c_BUILD_OUTPUTS)
+@SIM_ENABLE_ARCH_m32c_TRUE@am__append_26 = m32c/opc2c
+@SIM_ENABLE_ARCH_m32c_TRUE@am__append_27 = \
@SIM_ENABLE_ARCH_m32c_TRUE@ $(m32c_BUILD_OUTPUTS) \
@SIM_ENABLE_ARCH_m32c_TRUE@ m32c/m32c.c.log \
@SIM_ENABLE_ARCH_m32c_TRUE@ m32c/r8c.c.log
-@SIM_ENABLE_ARCH_m32r_TRUE@am__append_27 = $(m32r_BUILD_OUTPUTS)
@SIM_ENABLE_ARCH_m32r_TRUE@am__append_28 = $(m32r_BUILD_OUTPUTS)
-@SIM_ENABLE_ARCH_m68hc11_TRUE@am__append_29 = $(m68hc11_BUILD_OUTPUTS)
-@SIM_ENABLE_ARCH_m68hc11_TRUE@am__append_30 = m68hc11/gencode
-@SIM_ENABLE_ARCH_m68hc11_TRUE@am__append_31 = $(m68hc11_BUILD_OUTPUTS)
-@SIM_ENABLE_ARCH_mn10300_TRUE@am__append_32 = $(mn10300_BUILD_OUTPUTS)
+@SIM_ENABLE_ARCH_m32r_TRUE@am__append_29 = $(m32r_BUILD_OUTPUTS)
+@SIM_ENABLE_ARCH_m68hc11_TRUE@am__append_30 = $(m68hc11_BUILD_OUTPUTS)
+@SIM_ENABLE_ARCH_m68hc11_TRUE@am__append_31 = m68hc11/gencode
+@SIM_ENABLE_ARCH_m68hc11_TRUE@am__append_32 = $(m68hc11_BUILD_OUTPUTS)
@SIM_ENABLE_ARCH_mn10300_TRUE@am__append_33 = $(mn10300_BUILD_OUTPUTS)
-@SIM_ENABLE_ARCH_moxie_TRUE@am__append_34 = moxie/$(am__dirstamp)
-@SIM_ENABLE_ARCH_or1k_TRUE@am__append_35 = $(or1k_BUILD_OUTPUTS)
+@SIM_ENABLE_ARCH_mn10300_TRUE@am__append_34 = $(mn10300_BUILD_OUTPUTS)
+@SIM_ENABLE_ARCH_moxie_TRUE@am__append_35 = moxie/$(am__dirstamp)
@SIM_ENABLE_ARCH_or1k_TRUE@am__append_36 = $(or1k_BUILD_OUTPUTS)
-@SIM_ENABLE_ARCH_sh_TRUE@am__append_37 = $(sh_BUILD_OUTPUTS)
-@SIM_ENABLE_ARCH_sh_TRUE@am__append_38 = sh/gencode
-@SIM_ENABLE_ARCH_sh_TRUE@am__append_39 = $(sh_BUILD_OUTPUTS)
-@SIM_ENABLE_ARCH_v850_TRUE@am__append_40 = $(v850_BUILD_OUTPUTS)
+@SIM_ENABLE_ARCH_or1k_TRUE@am__append_37 = $(or1k_BUILD_OUTPUTS)
+@SIM_ENABLE_ARCH_sh_TRUE@am__append_38 = $(sh_BUILD_OUTPUTS)
+@SIM_ENABLE_ARCH_sh_TRUE@am__append_39 = sh/gencode
+@SIM_ENABLE_ARCH_sh_TRUE@am__append_40 = $(sh_BUILD_OUTPUTS)
@SIM_ENABLE_ARCH_v850_TRUE@am__append_41 = $(v850_BUILD_OUTPUTS)
+@SIM_ENABLE_ARCH_v850_TRUE@am__append_42 = $(v850_BUILD_OUTPUTS)
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \
@@ -922,13 +923,13 @@ CLEANFILES = common/version.c common/version.c-stamp \
testsuite/common/bits-gen testsuite/common/bits32m0.c \
testsuite/common/bits32m31.c testsuite/common/bits64m0.c \
testsuite/common/bits64m63.c
-DISTCLEANFILES = $(am__append_34)
+DISTCLEANFILES = $(am__append_35)
MOSTLYCLEANFILES = core $(am__append_5) site-sim-config.exp \
testrun.log testrun.sum $(am__append_7) $(am__append_10) \
- $(am__append_13) $(am__append_16) $(am__append_19) \
- $(am__append_21) $(am__append_23) $(am__append_26) \
- $(am__append_28) $(am__append_31) $(am__append_33) \
- $(am__append_36) $(am__append_39) $(am__append_41)
+ $(am__append_13) $(am__append_16) $(am__append_20) \
+ $(am__append_22) $(am__append_24) $(am__append_27) \
+ $(am__append_29) $(am__append_32) $(am__append_34) \
+ $(am__append_37) $(am__append_40) $(am__append_42)
AM_CFLAGS = $(WERROR_CFLAGS) $(WARN_CFLAGS)
AM_CPPFLAGS = $(INCGNU) -I$(srcroot)/include -I../bfd -I.. \
$(SIM_HW_CFLAGS) $(SIM_INLINE) -I$(srcdir)/common \
@@ -939,12 +940,13 @@ COMPILE_FOR_BUILD = $(CC_FOR_BUILD) $(AM_CPPFLAGS_FOR_BUILD) $(CPPFLAGS_FOR_BUIL
LINK_FOR_BUILD = $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) -o $@
SIM_ALL_RECURSIVE_DEPS = common/libcommon.a $(am__append_2) \
$(am__append_6) $(am__append_8) $(am__append_12) \
- $(am__append_14) $(am__append_18) $(am__append_20) \
- $(am__append_22) $(am__append_24) $(am__append_27) \
- $(am__append_29) $(am__append_32) $(am__append_35) \
- $(am__append_37) $(am__append_40)
+ $(am__append_14) $(am__append_19) $(am__append_21) \
+ $(am__append_23) $(am__append_25) $(am__append_28) \
+ $(am__append_30) $(am__append_33) $(am__append_36) \
+ $(am__append_38) $(am__append_41)
SIM_INSTALL_DATA_LOCAL_DEPS =
SIM_INSTALL_EXEC_LOCAL_DEPS = $(am__append_17)
+SIM_UNINSTALL_LOCAL_DEPS = $(am__append_18)
common_libcommon_a_SOURCES = \
common/callback.c \
common/portability.c \
@@ -2268,7 +2270,7 @@ ps: ps-recursive
ps-am:
uninstall-am: uninstall-armdocDATA uninstall-dtbDATA \
- uninstall-erc32docDATA uninstall-frvdocDATA \
+ uninstall-erc32docDATA uninstall-frvdocDATA uninstall-local \
uninstall-or1kdocDATA uninstall-pkgincludeHEADERS \
uninstall-ppcdocDATA uninstall-rxdocDATA
@@ -2294,7 +2296,7 @@ uninstall-am: uninstall-armdocDATA uninstall-dtbDATA \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
recheck tags tags-am uninstall uninstall-am \
uninstall-armdocDATA uninstall-dtbDATA uninstall-erc32docDATA \
- uninstall-frvdocDATA uninstall-or1kdocDATA \
+ uninstall-frvdocDATA uninstall-local uninstall-or1kdocDATA \
uninstall-pkgincludeHEADERS uninstall-ppcdocDATA \
uninstall-rxdocDATA
@@ -2504,6 +2506,8 @@ testsuite/common/bits64m63.c: testsuite/common/bits-gen$(EXEEXT) testsuite/commo
@SIM_ENABLE_ARCH_erc32_TRUE@ $(AM_V_at)$(MKDIR_P) $(DESTDIR)$(bindir)
@SIM_ENABLE_ARCH_erc32_TRUE@ n=`echo sis | sed '$(program_transform_name)'`; \
@SIM_ENABLE_ARCH_erc32_TRUE@ $(INSTALL_PROGRAM) erc32/sis$(EXEEXT) $(DESTDIR)$(bindir)/$$n$(EXEEXT)
+@SIM_ENABLE_ARCH_erc32_TRUE@sim-erc32-uninstall-local:
+@SIM_ENABLE_ARCH_erc32_TRUE@ rm -f $(DESTDIR)$(bindir)/sis
@SIM_ENABLE_ARCH_frv_TRUE@frv/mloop.c frv/eng.h: frv/stamp-mloop ; @true
@SIM_ENABLE_ARCH_frv_TRUE@frv/stamp-mloop: $(srccom)/genmloop.sh frv/mloop.in
@@ -2749,6 +2753,12 @@ install-exec-local: installdirs $(SIM_INSTALL_EXEC_LOCAL_DEPS)
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
+
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
diff --git a/sim/common/Make-common.in b/sim/common/Make-common.in
index c424fe7..2cdf357 100644
--- a/sim/common/Make-common.in
+++ b/sim/common/Make-common.in
@@ -307,6 +307,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 3b858a6..36baeb9 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 4fe4fd9..d7b9df0 100644
--- a/sim/ppc/Makefile.in
+++ b/sim/ppc/Makefile.in
@@ -845,3 +845,4 @@ install-pdf:
install:
installdirs:
+uninstall: