{"thread":{"id":"1827","subject":"Add uninstall target to Makefile","startedAt":"2005-09-16T12:58:14Z","lastAt":"2005-09-18T10:03:00Z","messageCount":9,"participants":["Martin Atukunda","Junio C Hamano","John W. Linville","Chris Wright","Johannes Schindelin"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"8677","messageId":"20050916125814.GA8084@igloo.ds.co.ug","threadId":"1827","inReplyTo":null,"subject":"Add uninstall target to Makefile","fromName":"Martin Atukunda","fromEmail":"matlads@dsmagic.com","sentAt":"2005-09-16T12:58:14Z","receivedAt":"2005-09-16T12:58:14Z","isPatch":false,"sender":{"key":"matlads@dsmagic.com","avatar":null},"body":"\nAdd the uninstall target to the Makefile.\n\nSigned-off-by: Martin Atukunda <matlads@dsmagic.com>\n--- \n\ndiff --git a/Makefile b/Makefile\n--- a/Makefile\n+++ b/Makefile\n@@ -305,6 +305,15 @@ install-doc:\n \t$(MAKE) -C Documentation install\n \n \n+### Uninstallation rules\n+\n+uninstall:\n+\t-sh ./remove-cmd-rename.sh $(DESTDIR)$(bindir)\n+\tcd $(DESTDIR)$(bindir) && \\\n+\trm $(PROGRAMS) $(SCRIPTS) && \\\n+\trm git-cherry-pick && \\\n+\tcd $(DESTDIR)$(GIT_PYTHON_DIR) && \\\n+\trm $(PYMODULES)\n \n \n ### Maintainer's dist rules\ndiff --git a/remove-cmd-rename.sh b/remove-cmd-rename.sh\nnew file mode 100644\n--- /dev/null\n+++ b/remove-cmd-rename.sh\n@@ -0,0 +1,51 @@\n+#!/bin/sh\n+d=\"$1\"\n+test -d \"$d\" || exit\n+\n+while read name\n+do\n+\trm  -f \"$d/$name\"\n+done <<\\EOF\n+git-add-script\n+git-archimport-script\n+git-bisect-script\n+git-branch-script\n+git-checkout-script\n+git-cherry-pick-script\n+git-clone-script\n+git-commit-script\n+git-count-objects-script\n+git-cvsimport-script\n+git-diff-script\n+git-send-email-script\n+git-fetch-script\n+git-format-patch-script\n+git-log-script\n+git-ls-remote-script\n+git-merge-one-file-script\n+git-octopus-script\n+git-parse-remote-script\n+git-prune-script\n+git-pull-script\n+git-push-script\n+git-rebase-script\n+git-relink-script\n+git-rename-script\n+git-repack-script\n+git-request-pull-script\n+git-reset-script\n+git-resolve-script\n+git-revert-script\n+git-sh-setup-script\n+git-status-script\n+git-tag-script\n+git-verify-tag-script\n+git-http-pull\n+git-local-pull\n+git-checkout-cache\n+git-diff-cache\n+git-merge-cache\n+git-update-cache\n+git-convert-cache\n+git-fsck-cache\n+EOF\n"},{"id":"8690","messageId":"7vfys5ndor.fsf@assigned-by-dhcp.cox.net","threadId":"1827","inReplyTo":"20050916125814.GA8084@igloo.ds.co.ug","subject":"Re: Add uninstall target to Makefile","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-09-16T17:08:04Z","receivedAt":"2005-09-16T17:08:04Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Martin Atukunda <matlads@dsmagic.com> writes:\n\n> Add the uninstall target to the Makefile.\n\nSorry, I absolutely detest other peoples' Makefiles that has\nthis target.  Why would anybody want this?\n"},{"id":"8692","messageId":"20050916175402.GC22825@tuxdriver.com","threadId":"1827","inReplyTo":"7vfys5ndor.fsf@assigned-by-dhcp.cox.net","subject":"Re: Add uninstall target to Makefile","fromName":"John W. Linville","fromEmail":"linville@tuxdriver.com","sentAt":"2005-09-16T17:54:03Z","receivedAt":"2005-09-16T17:54:03Z","isPatch":false,"sender":{"key":"linville@tuxdriver.com","avatar":"https://gravatar.com/avatar/6d8306e6a14a7040d9197d96418fe97d4e6a76024ad7585f915c1170701aca01?d=mp&s=160"},"body":"On Fri, Sep 16, 2005 at 10:08:04AM -0700, Junio C Hamano wrote:\n> Martin Atukunda <matlads@dsmagic.com> writes:\n> \n> > Add the uninstall target to the Makefile.\n> \n> Sorry, I absolutely detest other peoples' Makefiles that has\n> this target.  Why would anybody want this?\n\nIs this a serious question?  To uninstall the binaries e.g. if you\ninstalled them in the wrong place?\n-- \nJohn W. Linville\nlinville@tuxdriver.com\n"},{"id":"8693","messageId":"7v1x3oopsg.fsf@assigned-by-dhcp.cox.net","threadId":"1827","inReplyTo":"12c511ca0509161021249c89a9@mail.gmail.com","subject":"Re: Add uninstall target to Makefile","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-09-16T18:01:19Z","receivedAt":"2005-09-16T18:01:19Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Tony Luck <tony.luck@gmail.com> writes:\n\n> Perhaps it would be easier[1] to support \"make obsolete-uninstall\"\n> that would remove\n> objects installed by previous generations of git?\n>\n> -Tony\n>\n> [1] easier, nicer, cleaner, less detestable, whatever.\n\nAnd how far back a release should we keep track of the name of\nobsolete versions?  /usr/bin/git-uninstall for each particular\nversion that knows what that version ships _might_ make some\nsense, but I do not see much point in having uninstall target in\nthe Makefile.  Should one be allowed to run make uninstall with\nbindir or DESTDIR set to different values from the ones used\nwhen 'make install' was run the last time?  What about things\nlike \"make WITH_SEND_MAIL=YesPlease install\"?\n\nGuys, packaged distributions know how to remove obsolete\nbinaries.  OTOH if you are building from the source and\ninstalling, you are the only one who knows what you are\ninstalling and where.\n"},{"id":"8696","messageId":"20050916180810.GK8041@shell0.pdx.osdl.net","threadId":"1827","inReplyTo":"20050916175402.GC22825@tuxdriver.com","subject":"Re: Add uninstall target to Makefile","fromName":"Chris Wright","fromEmail":"chrisw@osdl.org","sentAt":"2005-09-16T18:08:10Z","receivedAt":"2005-09-16T18:08:10Z","isPatch":false,"sender":{"key":"chrisw@sous-sol.org","avatar":null},"body":"* John W. Linville (linville@tuxdriver.com) wrote:\n> > Sorry, I absolutely detest other peoples' Makefiles that has\n> > this target.  Why would anybody want this?\n> \n> Is this a serious question?  To uninstall the binaries e.g. if you\n> installed them in the wrong place?\n\nOf course package manager will do better at this, but it is useful to be\nable to uninstall.  However, I don't think Martin's external script with\nall the filenames hardcoded is the right approach.  There are $(PROG)\nand $(SCRIPTS) which already know all these filenames.\n\nthanks,\n-chris\n"},{"id":"8704","messageId":"20050916191953.GD22825@tuxdriver.com","threadId":"1827","inReplyTo":"20050916180810.GK8041@shell0.pdx.osdl.net","subject":"Re: Add uninstall target to Makefile","fromName":"John W. Linville","fromEmail":"linville@tuxdriver.com","sentAt":"2005-09-16T19:19:55Z","receivedAt":"2005-09-16T19:19:55Z","isPatch":false,"sender":{"key":"linville@tuxdriver.com","avatar":"https://gravatar.com/avatar/6d8306e6a14a7040d9197d96418fe97d4e6a76024ad7585f915c1170701aca01?d=mp&s=160"},"body":"On Fri, Sep 16, 2005 at 11:08:10AM -0700, Chris Wright wrote:\n\n> Of course package manager will do better at this, but it is useful to be\n> able to uninstall.  However, I don't think Martin's external script with\n> all the filenames hardcoded is the right approach.  There are $(PROG)\n> and $(SCRIPTS) which already know all these filenames.\n\nI would agree with that.  Definitely better to use the same Makefile\nvars used for install to do the uninstall.\n\nJohn\n-- \nJohn W. Linville\nlinville@tuxdriver.com\n"},{"id":"8737","messageId":"7vu0gkfwak.fsf@assigned-by-dhcp.cox.net","threadId":"1827","inReplyTo":"20050916191953.GD22825@tuxdriver.com","subject":"Re: Add uninstall target to Makefile","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-09-16T23:05:39Z","receivedAt":"2005-09-16T23:05:39Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"John W. Linville\" <linville@tuxdriver.com> writes:\n\n> On Fri, Sep 16, 2005 at 11:08:10AM -0700, Chris Wright wrote:\n>\n>> Of course package manager will do better at this, but it is useful to be\n>> able to uninstall.  However, I don't think Martin's external script with\n>> all the filenames hardcoded is the right approach.  There are $(PROG)\n>> and $(SCRIPTS) which already know all these filenames.\n>\n> I would agree with that.  Definitely better to use the same Makefile\n> vars used for install to do the uninstall.\n\nTrue.  That is something I could live with.\n"},{"id":"8739","messageId":"Pine.LNX.4.63.0509170135110.13233@wgmdd8.biozentrum.uni-wuerzburg.de","threadId":"1827","inReplyTo":"7vu0gkfwak.fsf@assigned-by-dhcp.cox.net","subject":"Re: Add uninstall target to Makefile","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2005-09-16T23:37:03Z","receivedAt":"2005-09-16T23:37:03Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Fri, 16 Sep 2005, Junio C Hamano wrote:\n\n> \"John W. Linville\" <linville@tuxdriver.com> writes:\n> \n> > On Fri, Sep 16, 2005 at 11:08:10AM -0700, Chris Wright wrote:\n> >\n> >> Of course package manager will do better at this, but it is useful to be\n> >> able to uninstall.  However, I don't think Martin's external script with\n> >> all the filenames hardcoded is the right approach.  There are $(PROG)\n> >> and $(SCRIPTS) which already know all these filenames.\n> >\n> > I would agree with that.  Definitely better to use the same Makefile\n> > vars used for install to do the uninstall.\n> \n> True.  That is something I could live with.\n\nWell, IMHO a package manager beats an uninstall target any time of a \nsecond. I know that I chose to checkinstall all projects I compiled myself \nso that I can be sure that no old version keeps lying around taking space \nfor nothin'.\n\nCiao,\nDscho\n"},{"id":"8773","messageId":"20050918100300.GA9890@igloo.ds.co.ug","threadId":"1827","inReplyTo":"20050916180810.GK8041@shell0.pdx.osdl.net","subject":"Re: Add uninstall target to Makefile","fromName":"Martin Atukunda","fromEmail":"matlads@dsmagic.com","sentAt":"2005-09-18T10:03:00Z","receivedAt":"2005-09-18T10:03:00Z","isPatch":false,"sender":{"key":"matlads@dsmagic.com","avatar":null},"body":"\nOn Fri, Sep 16, 2005 at 11:08:10AM -0700, Chris Wright wrote:\n> * John W. Linville (linville@tuxdriver.com) wrote:\n> > > Sorry, I absolutely detest other peoples' Makefiles that has\n> > > this target.  Why would anybody want this?\n> > \n> > Is this a serious question?  To uninstall the binaries e.g. if you\n> > installed them in the wrong place?\n> \n> Of course package manager will do better at this, but it is useful to be\n> able to uninstall.  However, I don't think Martin's external script with\n> all the filenames hardcoded is the right approach.  There are $(PROG)\n> and $(SCRIPTS) which already know all these filenames.\n\nThe external script only removes the symlinks created by ./cmd-rename.sh\n\n- Martin -\n"}]}