Simplified cleanup of "mylispdir".
authorOleksandr Gavenko <gavenkoa@gmail.com>
Sat, 02 Jan 2021 20:09:51 +0200
changeset 1681 c3e2faa4f118
parent 1680 77bbb8dc0e0c
child 1682 32e95bb034b6
Simplified cleanup of "mylispdir".
Makefile
--- a/Makefile	Sat Jan 02 20:02:16 2021 +0200
+++ b/Makefile	Sat Jan 02 20:09:51 2021 +0200
@@ -135,15 +135,11 @@
 install-all: install
 	install -m 0644 -t $(emacsdir) .emacs-pre .emacs-post
 
-define cleanup_mylispdir
-  find $(mylispdir) -type f '(' -name '*.el' -o -name '*.elc' -o -name '*~' ')' -exec rm {} ';'
-endef
-
 .PHONY: install
 install: upgrade
+	rm -rf $(mylispdir)
 	mkdir -p $(mylispdir)
 	echo $(COMPAT_VER) >$(COMPAT_FILE)
-	$(cleanup_mylispdir)
 	for f in .emacs-pre .emacs-post; do \
 		[[ -f $(emacsdir)/$$f ]] || install -m 0644 $$f $(emacsdir)/$$f; \
 	done
@@ -159,7 +155,7 @@
 .PHONY: uninstall
 uninstall:
 	rm -f $(patsubst %,$(emacsdir)/%, init.el .emacs-defs .emacs-my .emacs-autogen)
-	$(cleanup_mylispdir)
+	rm -rf $(mylispdir)
 	rm -f -r $(emacsdir)/srecode
 
 .PHONY: tar