diff options
| author | Graydon Hoare <graydon@mozilla.com> | 2012-01-30 15:32:04 -0800 |
|---|---|---|
| committer | Graydon Hoare <graydon@mozilla.com> | 2012-01-30 16:29:20 -0800 |
| commit | 9db1d16f610cae5611dc07a0b65daef69f435274 (patch) | |
| tree | 9d8c3afb3bafaafc44078aa32f0db3b527f3b6c0 | |
| parent | 3a5c75eff9c948df1863e3ff19e3e86169af4243 (diff) | |
| download | rust-9db1d16f610cae5611dc07a0b65daef69f435274.tar.gz rust-9db1d16f610cae5611dc07a0b65daef69f435274.zip | |
Add a 'make uninstall' target. Close #1668.
| -rw-r--r-- | mk/install.mk | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/mk/install.mk b/mk/install.mk index 15a2665b0af..47e75d439d7 100644 --- a/mk/install.mk +++ b/mk/install.mk @@ -44,6 +44,7 @@ install-target-$(1)-host-$(2): $$(SREQ$$(ISTAGE)_T_$(1)_H_$(2)) $$(TL$(1)$(2)),$$(PTL$(1)$(2)),$$(LIBRUSTC_GLOB)) $$(Q)$$(call INSTALL,$$(TL$(1)$(2)),$$(PTL$(1)$(2)),intrinsics.bc) $$(Q)$$(call INSTALL,$$(TL$(1)$(2)),$$(PTL$(1)$(2)),libmorestack.a) + endef $(foreach target,$(CFG_TARGET_TRIPLES), \ @@ -80,3 +81,23 @@ install-host: $(SREQ$(ISTAGE)_T_$(CFG_HOST_TRIPLE)_H_$(CFG_HOST_TRIPLE)) $(PREFIX_ROOT)/share/man/man1,rustc.1) install-targets: $(INSTALL_TARGET_RULES) + + +HOST_LIB_FROM_HL_GLOB = \ + $(patsubst $(HL)/%,$(PHL)/%,$(wildcard $(HL)/$(1))) + +uninstall: + $(Q)rm -f $(PHB)/rustc$(X) + $(Q)rm -f $(PHB)/cargo$(X) + $(Q)rm -f $(PHB)/rustdoc$(X) + $(Q)rm -f $(PHL)/$(CFG_RUSTLLVM) + $(Q)rm -f $(PHL)/$(CFG_RUNTIME) + $(Q)for i in \ + $(call HOST_LIB_FROM_HL_GLOB,$(CORELIB_GLOB)) \ + $(call HOST_LIB_FROM_HL_GLOB,$(STDLIB_GLOB)) \ + $(call HOST_LIB_FROM_HL_GLOB,$(LIBRUSTC_GLOB)) \ + ; \ + do rm -f $$i ; \ + done + $(Q)rm -Rf $(PHL)/rustc + $(Q)rm -f $(PREFIX_ROOT)/share/man/man1/rustc.1 |
