git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Uninstall rule for top level Makefile
@ 2006-12-11 22:14 Andy Parkins
  2006-12-12 12:25 ` Johannes Schindelin
  0 siblings, 1 reply; 5+ messages in thread
From: Andy Parkins @ 2006-12-11 22:14 UTC (permalink / raw)
  To: git

Signed-off-by: Andy Parkins <andyparkins@gmail.com>
---
 Makefile |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/Makefile b/Makefile
index a1861de..51c1747 100644
--- a/Makefile
+++ b/Makefile
@@ -821,6 +821,20 @@ install-doc:
 	$(MAKE) -C Documentation install
 
 
+### Uninstallation rules
+
+uninstall:
+	rm -f $(subst %,$(DESTDIR_SQ)$(gitexecdir_SQ)/%,$(ALL_PROGRAMS))
+	rm -f '$(DESTDIR_SQ)$(bindir_SQ)/git$X'
+	rm -f '$(DESTDIR_SQ)$(bindir_SQ)/gitk'
+	$(MAKE) -C templates DESTDIR='$(DESTDIR_SQ)' uninstall
+	$(MAKE) -C perl uninstall
+	if test 'z$(bindir_SQ)' != 'z$(gitexecdir_SQ)'; \
+	then \
+		rm -f '$(DESTDIR_SQ)$(gitexecdir_SQ)/git$X'
+		rm -f '$(DESTDIR_SQ)$(gitexecdir_SQ)/git$X'; \
+	fi
+	$(foreach p,$(BUILT_INS), rm -f '$(DESTDIR_SQ)$(gitexecdir_SQ)/$p';)
 
 
 ### Maintainer's dist rules
-- 
1.4.4.1.geeee8

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

* Re: [PATCH] Uninstall rule for top level Makefile
  2006-12-11 22:14 [PATCH] Uninstall rule for top level Makefile Andy Parkins
@ 2006-12-12 12:25 ` Johannes Schindelin
  2006-12-12 12:51   ` Andy Parkins
  0 siblings, 1 reply; 5+ messages in thread
From: Johannes Schindelin @ 2006-12-12 12:25 UTC (permalink / raw)
  To: Andy Parkins; +Cc: git

Hi,

see http://article.gmane.org/gmane.comp.version-control.git/8682 for a 
discussion about an uninstall target.

Ciao,
Dscho


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

* Re: [PATCH] Uninstall rule for top level Makefile
  2006-12-12 12:25 ` Johannes Schindelin
@ 2006-12-12 12:51   ` Andy Parkins
  2006-12-12 14:15     ` Johannes Schindelin
  0 siblings, 1 reply; 5+ messages in thread
From: Andy Parkins @ 2006-12-12 12:51 UTC (permalink / raw)
  To: git

On Tuesday 2006 December 12 12:25, Johannes Schindelin wrote:

> see http://article.gmane.org/gmane.comp.version-control.git/8682 for a
> discussion about an uninstall target.

I read that thread, but don't see its relevance.  Have I missed something?

In summary:

"uninstall" is not useful in lieu of a package manager, but for developer 
types (like those on this mailing list) it is useful when you install in the 
wrong place (as I did just before I felt the need for an uninstall recipe).

The thread you linked to seemed to want the uninstall to not have hard-coded 
filenames.  That's what I did.

I assume I've missed something in the linked thread - what was it you wanted 
me to pick up from it?


Andy

-- 
Dr Andy Parkins, M Eng (hons), MIEE

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

* Re: [PATCH] Uninstall rule for top level Makefile
  2006-12-12 12:51   ` Andy Parkins
@ 2006-12-12 14:15     ` Johannes Schindelin
  2006-12-12 15:42       ` Andy Parkins
  0 siblings, 1 reply; 5+ messages in thread
From: Johannes Schindelin @ 2006-12-12 14:15 UTC (permalink / raw)
  To: Andy Parkins; +Cc: git

Hi,

On Tue, 12 Dec 2006, Andy Parkins wrote:

> I assume I've missed something in the linked thread - what was it you 
> wanted me to pick up from it?

The uninstall target _only_ solves the case you mentioned: when you 
installed Git in the wrong place. But then it is fragile: if you put the 
new path into config.mak, or you provided the PREFIX on the command line, 
and possibly do not remember what it was, the uninstall goes wrong.

But then, I do not care at all about that target being in the Makefile or 
not. I'll just ignore it, just as almost everybody else.

Ciao,
Dscho

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

* Re: [PATCH] Uninstall rule for top level Makefile
  2006-12-12 14:15     ` Johannes Schindelin
@ 2006-12-12 15:42       ` Andy Parkins
  0 siblings, 0 replies; 5+ messages in thread
From: Andy Parkins @ 2006-12-12 15:42 UTC (permalink / raw)
  To: git

On Tuesday 2006 December 12 14:15, Johannes Schindelin wrote:

> The uninstall target _only_ solves the case you mentioned: when you
> installed Git in the wrong place. But then it is fragile: if you put the
> new path into config.mak, or you provided the PREFIX on the command line,
> and possibly do not remember what it was, the uninstall goes wrong.

Absolutely.  I agree entirely.  The only reason I raised it was because I had 
cause to need it.  The quickest way I found was just to write the missing 
recipe.  As I'd written it, I thought I'd share.  As you say, it has no other 
use than unpicking a stupid "install", done by a butterbrain like myself :-)

> But then, I do not care at all about that target being in the Makefile or
> not. I'll just ignore it, just as almost everybody else.

Until I needed it; I didn't care that it wasn't there.  Even then "need" is 
perhaps too strong a word.  It was handy.  That's it.  If there are strong 
moral objections to it; it doesn't bother me.



Andy
-- 
Dr Andy Parkins, M Eng (hons), MIEE

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

end of thread, other threads:[~2006-12-12 15:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-11 22:14 [PATCH] Uninstall rule for top level Makefile Andy Parkins
2006-12-12 12:25 ` Johannes Schindelin
2006-12-12 12:51   ` Andy Parkins
2006-12-12 14:15     ` Johannes Schindelin
2006-12-12 15:42       ` Andy Parkins

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).