summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common.mk2
-rw-r--r--defs/gmake.mk9
2 files changed, 11 insertions, 0 deletions
diff --git a/common.mk b/common.mk
index 28b6e5b..df6ab53 100644
--- a/common.mk
+++ b/common.mk
@@ -326,6 +326,8 @@ post-no-install-all:: post-no-install-local post-no-install-ext post-no-install-
uninstall: $(INSTALLED_LIST)
$(Q)$(SUDO) $(MINIRUBY) $(srcdir)/tool/rbuninstall.rb --destdir=$(DESTDIR) $(INSTALLED_LIST)
+reinstall: uninstall install
+
what-where-nodoc: no-install-nodoc
no-install-nodoc: pre-no-install-nodoc dont-install-nodoc post-no-install-nodoc
pre-no-install-nodoc:: pre-no-install-local pre-no-install-ext
diff --git a/defs/gmake.mk b/defs/gmake.mk
index 67dce0b..4e38f38 100644
--- a/defs/gmake.mk
+++ b/defs/gmake.mk
@@ -15,3 +15,12 @@ yes-test-all yes-test-ruby: $(filter-out %test-all %test-ruby check%,$(TEST_TARG
endif
$(TEST_TARGETS): $(TEST_DEPENDS)
+
+ifneq ($(if $(filter install,$(MAKECMDGOALS)),$(filter uninstall,$(MAKECMDGOALS))),)
+install-targets := $(filter install uninstall,$(MAKECMDGOALS))
+$(word 1,$(install-targets)): $(word 0,$(install-targets))
+endif
+
+ifneq ($(filter reinstall,$(MAKECMDGOALS)),)
+install: uninstall
+endif