git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Add uninstall target to Makefile
@ 2005-09-16 12:58 Martin Atukunda
  2005-09-16 17:08 ` Junio C Hamano
  0 siblings, 1 reply; 9+ messages in thread
From: Martin Atukunda @ 2005-09-16 12:58 UTC (permalink / raw)
  To: git


Add the uninstall target to the Makefile.

Signed-off-by: Martin Atukunda <matlads@dsmagic.com>
--- 

diff --git a/Makefile b/Makefile
--- a/Makefile
+++ b/Makefile
@@ -305,6 +305,15 @@ install-doc:
 	$(MAKE) -C Documentation install
 
 
+### Uninstallation rules
+
+uninstall:
+	-sh ./remove-cmd-rename.sh $(DESTDIR)$(bindir)
+	cd $(DESTDIR)$(bindir) && \
+	rm $(PROGRAMS) $(SCRIPTS) && \
+	rm git-cherry-pick && \
+	cd $(DESTDIR)$(GIT_PYTHON_DIR) && \
+	rm $(PYMODULES)
 
 
 ### Maintainer's dist rules
diff --git a/remove-cmd-rename.sh b/remove-cmd-rename.sh
new file mode 100644
--- /dev/null
+++ b/remove-cmd-rename.sh
@@ -0,0 +1,51 @@
+#!/bin/sh
+d="$1"
+test -d "$d" || exit
+
+while read name
+do
+	rm  -f "$d/$name"
+done <<\EOF
+git-add-script
+git-archimport-script
+git-bisect-script
+git-branch-script
+git-checkout-script
+git-cherry-pick-script
+git-clone-script
+git-commit-script
+git-count-objects-script
+git-cvsimport-script
+git-diff-script
+git-send-email-script
+git-fetch-script
+git-format-patch-script
+git-log-script
+git-ls-remote-script
+git-merge-one-file-script
+git-octopus-script
+git-parse-remote-script
+git-prune-script
+git-pull-script
+git-push-script
+git-rebase-script
+git-relink-script
+git-rename-script
+git-repack-script
+git-request-pull-script
+git-reset-script
+git-resolve-script
+git-revert-script
+git-sh-setup-script
+git-status-script
+git-tag-script
+git-verify-tag-script
+git-http-pull
+git-local-pull
+git-checkout-cache
+git-diff-cache
+git-merge-cache
+git-update-cache
+git-convert-cache
+git-fsck-cache
+EOF

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2005-09-18 10:05 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-16 12:58 Add uninstall target to Makefile Martin Atukunda
2005-09-16 17:08 ` Junio C Hamano
2005-09-16 17:54   ` John W. Linville
2005-09-16 18:08     ` Chris Wright
2005-09-16 19:19       ` John W. Linville
2005-09-16 23:05         ` Junio C Hamano
2005-09-16 23:37           ` Johannes Schindelin
2005-09-18 10:03       ` Martin Atukunda
     [not found]   ` <12c511ca0509161021249c89a9@mail.gmail.com>
2005-09-16 18:01     ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).