From 59d8576e4ff7e6467fab3ea894baa72c8400e22a Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sat, 5 Nov 2022 14:44:15 +0700 Subject: 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. --- sim/Makefile.am | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'sim/Makefile.am') 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 -- cgit v1.1