From: Jan Nieuwenhuizen <janneke-list@xs4all.nl>
To: Tomas Carnecky <tom@dbservice.com>
Cc: git@vger.kernel.org
Subject: [PATCH] Makefile: add uninstall target. Fixes elementary good cleaning manners.
Date: Wed, 18 Nov 2009 13:29:49 +0100 [thread overview]
Message-ID: <1258547389.25909.101.camel@heerbeest> (raw)
In-Reply-To: <48B54636-1825-48B3-BECD-4150A55B013F@dbservice.com>
Op woensdag 11-11-2009 om 15:08 uur [tijdzone +0100], schreef Tomas
Carnecky:
> > Greetings,
> > Jan. -- who just finds out the uninstall target is missing?!?
> > See attached.
>
> Next time please send patches inline, it's easier to review them that
> way.
Sorry. Let me retry that. See below.
Greetings,
Jan.
--
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond - The music typesetter
Avatar®: http://AvatarAcademy.nl | http://lilypond.org
>From f260a4dcf0b42088eb1da74aee49f49ac4b0c55b Mon Sep 17 00:00:00 2001
From: Jan Nieuwenhuizen <janneke@gnu.org>
Date: Wed, 11 Nov 2009 14:19:00 +0100
Subject: [PATCH] Makefile: add uninstall target. Fixes elementary good cleaning manners.
* Modified Makefile
* Modified gitk-git/Makefile
* Modified perl/Makefile
* Modified templates/Makefile
Signed-off-by: Jan Nieuwenhuizen <janneke@gnu.org>
---
Makefile | 18 +++++++++++++++++-
gitk-git/Makefile | 2 ++
perl/Makefile | 2 +-
templates/Makefile | 5 +++++
4 files changed, 25 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index 5d5976f..135c3ac 100644
--- a/Makefile
+++ b/Makefile
@@ -1781,7 +1781,23 @@ quick-install-man:
quick-install-html:
$(MAKE) -C Documentation quick-install-html
+bindir_PROGRAMS = git$X git-upload-pack$X git-receive-pack$X git-upload-archive$X git-shell$X git-cvsserver
+uninstall:
+ifndef NO_TCLTK
+ $(MAKE) -C gitk-git uninstall
+ $(MAKE) -C git-gui gitexecdir='$(gitexec_instdir_SQ)' uninstall
+endif
+ifndef NO_PERL
+ $(MAKE) -C perl prefix='$(prefix_SQ)' DESTDIR='$(DESTDIR_SQ)' uninstall
+endif
+ $(MAKE) -C templates DESTDIR='$(DESTDIR_SQ)' uninstall
+ $(RM) $(ALL_PROGRAMS:%='$(DESTDIR_SQ)$(gitexec_instdir_SQ)'/%)
+ $(RM) $(BUILT_INS:%='$(DESTDIR_SQ)$(gitexec_instdir_SQ)'/%)
+ $(RM) $(OTHER_PROGRAMS:%='$(DESTDIR_SQ)$(gitexec_instdir_SQ)'/%)
+ -rmdir -p '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
+ $(RM) $(bindir_PROGRAMS:%='$(DESTDIR_SQ)$(bindir_SQ)'/%)
+ -rmdir -p '$(DESTDIR_SQ)$(bindir_SQ)'
### Maintainer's dist rules
@@ -1857,7 +1873,7 @@ ifndef NO_TCLTK
endif
$(RM) GIT-VERSION-FILE GIT-CFLAGS GIT-GUI-VARS GIT-BUILD-OPTIONS
-.PHONY: all install clean strip
+.PHONY: all install uninstall clean strip
.PHONY: shell_compatibility_test please_set_SHELL_PATH_to_a_more_modern_shell
.PHONY: .FORCE-GIT-VERSION-FILE TAGS tags cscope .FORCE-GIT-CFLAGS
.PHONY: .FORCE-GIT-BUILD-OPTIONS
diff --git a/gitk-git/Makefile b/gitk-git/Makefile
index e1b6045..d68f19a 100644
--- a/gitk-git/Makefile
+++ b/gitk-git/Makefile
@@ -47,6 +47,8 @@ install:: all
uninstall::
$(foreach p,$(ALL_MSGFILES), $(RM) '$(DESTDIR_SQ)$(msgsdir_SQ)'/$(notdir $p) &&) true
$(RM) '$(DESTDIR_SQ)$(bindir_SQ)'/gitk
+ -rmdir -p '$(DESTDIR_SQ)$(bindir_SQ)'/gitk
+ -rmdir -p '$(DESTDIR_SQ)$(msgsdir_SQ)'
clean::
$(RM) gitk-wish po/*.msg
diff --git a/perl/Makefile b/perl/Makefile
index 4ab21d6..25fc304 100644
--- a/perl/Makefile
+++ b/perl/Makefile
@@ -10,7 +10,7 @@ ifndef V
QUIET = @
endif
-all install instlibdir: $(makfile)
+all install instlibdir uninstall: $(makfile)
$(QUIET)$(MAKE) -f $(makfile) $@
clean:
diff --git a/templates/Makefile b/templates/Makefile
index 408f013..f4048d9 100644
--- a/templates/Makefile
+++ b/templates/Makefile
@@ -51,3 +51,8 @@ install: all
$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(template_instdir_SQ)'
(cd blt && $(TAR) cf - .) | \
(cd '$(DESTDIR_SQ)$(template_instdir_SQ)' && umask 022 && $(TAR) xof -)
+
+uninstall:
+ -(cd blt && find . -type f) | (cd '$(DESTDIR_SQ)$(template_instdir_SQ)' && xargs $(RM))
+ -(cd blt && find . -mindepth 1 -type d) | (cd '$(DESTDIR_SQ)$(template_instdir_SQ)' && xargs rmdir)
+ -rmdir -p '$(DESTDIR_SQ)$(template_instdir_SQ)'
--
1.6.3.3
next prev parent reply other threads:[~2009-11-18 12:30 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-11 13:22 Unhelpful "branch.master.remote = <nickname>" advice? Jan Nieuwenhuizen
2009-11-11 14:08 ` Tomas Carnecky
[not found] ` <1257965806.26362.132.camel@heerbeest>
2009-11-11 19:10 ` Tomas Carnecky
2009-11-11 19:34 ` Jan Nieuwenhuizen
2009-11-11 20:32 ` Tomas Carnecky
2009-11-12 14:17 ` Jan Nieuwenhuizen
2009-11-12 14:53 ` [PATCH] git-pull.sh: overhaul error handling when no candidates are found Jan Krüger
2009-11-12 15:06 ` Jeff King
2009-11-12 15:25 ` Jan Krüger
2009-11-12 15:28 ` Jeff King
2009-11-12 16:08 ` [PATCH v2] git-pull.sh --rebase: " Jan Krüger
2009-11-13 4:07 ` Jonathan Nieder
2009-11-27 14:17 ` [PATCH] pull: clarify advice for the unconfigured error case Jonathan Nieder
2009-12-02 23:08 ` Junio C Hamano
2009-12-03 1:26 ` Jonathan Nieder
2009-12-03 1:43 ` Jeff King
2009-12-03 8:49 ` Jan Nieuwenhuizen
2009-12-03 10:51 ` Jan Krüger
2009-12-07 0:29 ` Junio C Hamano
2009-11-15 9:08 ` [PATCH v2] git-pull.sh --rebase: overhaul error handling when no candidates are found Junio C Hamano
2009-11-12 14:56 ` Unhelpful "branch.master.remote = <nickname>" advice? Björn Steinbrink
2009-11-12 15:03 ` Tomas Carnecky
2009-11-18 12:29 ` Jan Nieuwenhuizen [this message]
2009-11-18 13:28 ` [PATCH] Makefile: add uninstall target. Fixes elementary good cleaning manners Matthieu Moy
2009-11-11 14:13 ` Unhelpful "branch.master.remote = <nickname>" advice? Jan Krüger
2009-11-11 19:54 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1258547389.25909.101.camel@heerbeest \
--to=janneke-list@xs4all.nl \
--cc=git@vger.kernel.org \
--cc=tom@dbservice.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).