summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Tom Willemse2013-04-14 01:05:42 +0200
committerGravatar Tom Willemse2013-04-14 01:05:42 +0200
commit50c3f9ade9879e6dd0131a2efddcb14f46d920c5 (patch)
tree6fc4d801ac79f2db00f575ff964b7062d4e110b8
parentd8aa1d0ed1cc726ea3d7cd6a39e0f57379d2142d (diff)
downloaddotfiles-50c3f9ade9879e6dd0131a2efddcb14f46d920c5.tar.gz
dotfiles-50c3f9ade9879e6dd0131a2efddcb14f46d920c5.zip
Rename uninstall* to cleanup*
Since cleanup only removes that which will not be restored it makes no sense to call it uninstall. Uninstall should remove everything unconditionally.
-rw-r--r--dotfiles.mk30
1 files changed, 15 insertions, 15 deletions
diff --git a/dotfiles.mk b/dotfiles.mk
index b7bd5c6..8ca45fc 100644
--- a/dotfiles.mk
+++ b/dotfiles.mk
@@ -19,30 +19,30 @@ endef
check-objects=$(addprefix check-,$(objects))
install-objects=$(addprefix install-,$(objects))
reverse-objects=$(addprefix reverse-,$(objects))
-uninstall-objects=$(addprefix uninstall-,$(objects))
+cleanup-objects=$(addprefix cleanup-,$(objects))
check-modules=$(addprefix check-,$(modules))
install-modules=$(addprefix install-,$(modules))
reverse-modules=$(addprefix reverse-,$(modules))
-uninstall-modules=$(addprefix uninstall-,$(modules))
+cleanup-modules=$(addprefix cleanup-,$(modules))
-.PHONY: all install uninstall check uninstall $(modules) \
- $(install-objects) $(uninstall-objects) $(check-objects) \
- $(install-modules) $(uninstall-modules) $(check-modules) \
+.PHONY: all install cleanup check cleanup $(modules) \
+ $(install-objects) $(cleanup-objects) $(check-objects) \
+ $(install-modules) $(cleanup-modules) $(check-modules) \
$(reverse) $(reverse-objects) $(reverse-modules)
all: $(modules) $(objects)
ifeq ($(MAKEROOT),y)
check: $(check-modules) $(check-objects)
-install: uninstall $(install-modules) $(install-objects) Makefile.old
+install: cleanup $(install-modules) $(install-objects) Makefile.old
reverse: $(reverse-modules) $(reverse-objects)
ifeq ($(firstword $(MAKEFILE_LIST)),Makefile.old)
-uninstall: $(uninstall-modules) $(uninstall-objects)
+cleanup: $(cleanup-modules) $(cleanup-objects)
@rmdir --ignore-fail-on-non-empty $(DESTDIR) 2> /dev/null || true
else
-uninstall: export NEWLIST = $(objects)
-uninstall:
- @$(MAKE) -s -f Makefile.old uninstall
+cleanup: export NEWLIST = $(objects)
+cleanup:
+ @$(MAKE) -s -f Makefile.old cleanup
Makefile.old: $(firstword $(MAKEFILE_LIST))
@cp "$^" "$@"
@@ -58,8 +58,8 @@ install:
@$(MAKE) -s -C ../ install
reverse:
@$(MAKE) -s -C ../ reverse
-uninstall:
- @$(MAKE) -s -C ../ uninstall
+cleanup:
+ @$(MAKE) -s -C ../ cleanup
endif
$(modules): %:
@@ -84,15 +84,15 @@ $(reverse-objects): reverse-%:
$(reverse-modules): reverse-%:
@$(MAKE) -s -C $* reverse MKDPREFIX=$(MKDPREFIX)$*/
-$(uninstall-objects): uninstall-%:
+$(cleanup-objects): cleanup-%:
@$(if $(findstring $*,$(NEWLIST)),, \
@$(if $(call older,$*), \
echo -e "$(FG_RED)+ $(FG_YEL)$(MKDPREFIX)$*$(CLR_RE)", \
echo -e "$(FG_GRE)- $(FG_YEL)$(MKDPREFIX)$*$(CLR_RE)"; \
unlink "$(DESTDIR)/$*" || true))
-$(uninstall-modules): uninstall-%:
- @$(MAKE) -C $* uninstall MKDPREFIX=$(MKDPREFIX)$*/
+$(cleanup-modules): cleanup-%:
+ @$(MAKE) -C $* cleanup MKDPREFIX=$(MKDPREFIX)$*/
$(check-objects): check-%:
@$(if $(call newer,$*), \