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

* Re: Add uninstall target to Makefile
  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
       [not found]   ` <12c511ca0509161021249c89a9@mail.gmail.com>
  0 siblings, 2 replies; 9+ messages in thread
From: Junio C Hamano @ 2005-09-16 17:08 UTC (permalink / raw)
  To: Martin Atukunda; +Cc: git

Martin Atukunda <matlads@dsmagic.com> writes:

> Add the uninstall target to the Makefile.

Sorry, I absolutely detest other peoples' Makefiles that has
this target.  Why would anybody want this?

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

* Re: Add uninstall target to Makefile
  2005-09-16 17:08 ` Junio C Hamano
@ 2005-09-16 17:54   ` John W. Linville
  2005-09-16 18:08     ` Chris Wright
       [not found]   ` <12c511ca0509161021249c89a9@mail.gmail.com>
  1 sibling, 1 reply; 9+ messages in thread
From: John W. Linville @ 2005-09-16 17:54 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Martin Atukunda, git

On Fri, Sep 16, 2005 at 10:08:04AM -0700, Junio C Hamano wrote:
> Martin Atukunda <matlads@dsmagic.com> writes:
> 
> > Add the uninstall target to the Makefile.
> 
> Sorry, I absolutely detest other peoples' Makefiles that has
> this target.  Why would anybody want this?

Is this a serious question?  To uninstall the binaries e.g. if you
installed them in the wrong place?
-- 
John W. Linville
linville@tuxdriver.com

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

* Re: Add uninstall target to Makefile
       [not found]   ` <12c511ca0509161021249c89a9@mail.gmail.com>
@ 2005-09-16 18:01     ` Junio C Hamano
  0 siblings, 0 replies; 9+ messages in thread
From: Junio C Hamano @ 2005-09-16 18:01 UTC (permalink / raw)
  To: tony.luck; +Cc: git

Tony Luck <tony.luck@gmail.com> writes:

> Perhaps it would be easier[1] to support "make obsolete-uninstall"
> that would remove
> objects installed by previous generations of git?
>
> -Tony
>
> [1] easier, nicer, cleaner, less detestable, whatever.

And how far back a release should we keep track of the name of
obsolete versions?  /usr/bin/git-uninstall for each particular
version that knows what that version ships _might_ make some
sense, but I do not see much point in having uninstall target in
the Makefile.  Should one be allowed to run make uninstall with
bindir or DESTDIR set to different values from the ones used
when 'make install' was run the last time?  What about things
like "make WITH_SEND_MAIL=YesPlease install"?

Guys, packaged distributions know how to remove obsolete
binaries.  OTOH if you are building from the source and
installing, you are the only one who knows what you are
installing and where.

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

* Re: Add uninstall target to Makefile
  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-18 10:03       ` Martin Atukunda
  0 siblings, 2 replies; 9+ messages in thread
From: Chris Wright @ 2005-09-16 18:08 UTC (permalink / raw)
  To: Junio C Hamano, Martin Atukunda, git

* John W. Linville (linville@tuxdriver.com) wrote:
> > Sorry, I absolutely detest other peoples' Makefiles that has
> > this target.  Why would anybody want this?
> 
> Is this a serious question?  To uninstall the binaries e.g. if you
> installed them in the wrong place?

Of course package manager will do better at this, but it is useful to be
able to uninstall.  However, I don't think Martin's external script with
all the filenames hardcoded is the right approach.  There are $(PROG)
and $(SCRIPTS) which already know all these filenames.

thanks,
-chris

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

* Re: Add uninstall target to Makefile
  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-18 10:03       ` Martin Atukunda
  1 sibling, 1 reply; 9+ messages in thread
From: John W. Linville @ 2005-09-16 19:19 UTC (permalink / raw)
  To: Chris Wright; +Cc: Junio C Hamano, Martin Atukunda, git

On Fri, Sep 16, 2005 at 11:08:10AM -0700, Chris Wright wrote:

> Of course package manager will do better at this, but it is useful to be
> able to uninstall.  However, I don't think Martin's external script with
> all the filenames hardcoded is the right approach.  There are $(PROG)
> and $(SCRIPTS) which already know all these filenames.

I would agree with that.  Definitely better to use the same Makefile
vars used for install to do the uninstall.

John
-- 
John W. Linville
linville@tuxdriver.com

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

* Re: Add uninstall target to Makefile
  2005-09-16 19:19       ` John W. Linville
@ 2005-09-16 23:05         ` Junio C Hamano
  2005-09-16 23:37           ` Johannes Schindelin
  0 siblings, 1 reply; 9+ messages in thread
From: Junio C Hamano @ 2005-09-16 23:05 UTC (permalink / raw)
  To: John W. Linville; +Cc: Martin Atukunda, Chris Wright, git

"John W. Linville" <linville@tuxdriver.com> writes:

> On Fri, Sep 16, 2005 at 11:08:10AM -0700, Chris Wright wrote:
>
>> Of course package manager will do better at this, but it is useful to be
>> able to uninstall.  However, I don't think Martin's external script with
>> all the filenames hardcoded is the right approach.  There are $(PROG)
>> and $(SCRIPTS) which already know all these filenames.
>
> I would agree with that.  Definitely better to use the same Makefile
> vars used for install to do the uninstall.

True.  That is something I could live with.

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

* Re: Add uninstall target to Makefile
  2005-09-16 23:05         ` Junio C Hamano
@ 2005-09-16 23:37           ` Johannes Schindelin
  0 siblings, 0 replies; 9+ messages in thread
From: Johannes Schindelin @ 2005-09-16 23:37 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: John W. Linville, Martin Atukunda, Chris Wright, git

Hi,

On Fri, 16 Sep 2005, Junio C Hamano wrote:

> "John W. Linville" <linville@tuxdriver.com> writes:
> 
> > On Fri, Sep 16, 2005 at 11:08:10AM -0700, Chris Wright wrote:
> >
> >> Of course package manager will do better at this, but it is useful to be
> >> able to uninstall.  However, I don't think Martin's external script with
> >> all the filenames hardcoded is the right approach.  There are $(PROG)
> >> and $(SCRIPTS) which already know all these filenames.
> >
> > I would agree with that.  Definitely better to use the same Makefile
> > vars used for install to do the uninstall.
> 
> True.  That is something I could live with.

Well, IMHO a package manager beats an uninstall target any time of a 
second. I know that I chose to checkinstall all projects I compiled myself 
so that I can be sure that no old version keeps lying around taking space 
for nothin'.

Ciao,
Dscho

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

* Re: Add uninstall target to Makefile
  2005-09-16 18:08     ` Chris Wright
  2005-09-16 19:19       ` John W. Linville
@ 2005-09-18 10:03       ` Martin Atukunda
  1 sibling, 0 replies; 9+ messages in thread
From: Martin Atukunda @ 2005-09-18 10:03 UTC (permalink / raw)
  To: git


On Fri, Sep 16, 2005 at 11:08:10AM -0700, Chris Wright wrote:
> * John W. Linville (linville@tuxdriver.com) wrote:
> > > Sorry, I absolutely detest other peoples' Makefiles that has
> > > this target.  Why would anybody want this?
> > 
> > Is this a serious question?  To uninstall the binaries e.g. if you
> > installed them in the wrong place?
> 
> Of course package manager will do better at this, but it is useful to be
> able to uninstall.  However, I don't think Martin's external script with
> all the filenames hardcoded is the right approach.  There are $(PROG)
> and $(SCRIPTS) which already know all these filenames.

The external script only removes the symlinks created by ./cmd-rename.sh

- Martin -

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