{"thread":{"id":"195","subject":"[PATCH] Add DEST Makefile variable","startedAt":"2005-04-21T12:39:04Z","lastAt":"2005-04-21T23:37:04Z","messageCount":4,"participants":["Matthias Urlichs","Junio C Hamano","Pavel Roskin"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"1120","messageId":"20050421123904.9F2EB7F8AD@smurf.noris.de","threadId":"195","inReplyTo":null,"subject":"[PATCH] Add DEST Makefile variable","fromName":"Matthias Urlichs","fromEmail":"smurf@smurf.noris.de","sentAt":"2005-04-21T12:39:04Z","receivedAt":"2005-04-21T12:39:04Z","isPatch":true,"sender":{"key":"matthias@urlichs.de","avatar":"https://gravatar.com/avatar/2708905af227313eba6f2b2ae0f7d0259b5ac5d71baef58fe5a13c699ce0bbf0?d=mp&s=160"},"body":"This patch changes the Makefile to add a DEST variable (still defaulting\nto ~/bin/) so that people (or scripts) can trivially install git\nSomewhere Else.\n\nSigned-Off-By: Matthias Urlichs <smurf@smurf.noris.de>\n\n--- 42a073eb6b5bb397a3e8768a032463a7fa02e6b9/Makefile  (mode:100644 sha1:1fef8e4ae93b2abae2ceb69c265c7c8176fe44c0)\n+++ 265515f9c4f089b1b61e9d2312c4b3babe189618/Makefile  (mode:100644 sha1:af90bd4e1d53fa3b930c77a240b4681a0b2a886e)\n@@ -8,6 +8,7 @@\n # break unless your underlying filesystem supports those sub-second times\n # (my ext3 doesn't).\n CFLAGS=-g -O3 -Wall\n+DEST=$(HOME)/bin\n \n CC=gcc\n AR=ar\n@@ -56,7 +57,7 @@\n \t@chmod +x $@\n \n install: $(PROG) $(GEN_SCRIPT)\n-\tinstall $(PROG) $(SCRIPT) $(GEN_SCRIPT) $(HOME)/bin/\n+\tinstall $(PROG) $(SCRIPT) $(GEN_SCRIPT) $(DEST)/\n \n clean:\n \trm -f *.o $(PROG) $(GEN_SCRIPT) $(LIB_FILE)\n"},{"id":"1214","messageId":"7vr7h3d9cu.fsf@assigned-by-dhcp.cox.net","threadId":"195","inReplyTo":"20050421123904.9F2EB7F8AD@smurf.noris.de","subject":"Re: [PATCH] Add DEST Makefile variable","fromName":"Junio C Hamano","fromEmail":"junio@siamese.dyndns.org","sentAt":"2005-04-21T22:59:45Z","receivedAt":"2005-04-21T22:59:45Z","isPatch":true,"sender":{"key":"junio@siamese.dyndns.org","avatar":null},"body":">>>>> \"MU\" == Matthias Urlichs <smurf@smurf.noris.de> writes:\n\nMU>  # (my ext3 doesn't).\nMU>  CFLAGS=-g -O3 -Wall\nMU> +DEST=$(HOME)/bin\n \nMU>  install: $(PROG) $(GEN_SCRIPT)\nMU> -\tinstall $(PROG) $(SCRIPT) $(GEN_SCRIPT) $(HOME)/bin/\nMU> +\tinstall $(PROG) $(SCRIPT) $(GEN_SCRIPT) $(DEST)/\n \nI sent essentially the same some time ago and got a comment to\nfollow established naming convention.\n\nMany people seem to call What you are calling DEST above BINDIR\nand DEST or DESTDIR usually means something completely\ndifferent.  It goes like this:\n\n    # DESTDIR=\n    BINDIR=$(HOME)/bin\n\n    install:\n            install foobar $(DESTDIR)$(BINDIR)/\n\n  $ su ;# personal machine install by local root\n  # make BINDIR=/usr/local/bin install\n\n  # binary package creation\n  $ make BINDIR=/usr/bin DESTDIR=/var/tmp/tmp-inst install\n  $ tar Ccf /var/tmp/tmp-inst tarball.tar.gz .\n\n"},{"id":"1217","messageId":"20050421230732.GA13311@kiste.smurf.noris.de","threadId":"195","inReplyTo":"7vr7h3d9cu.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] Add DEST Makefile variable","fromName":"Matthias Urlichs","fromEmail":"smurf@smurf.noris.de","sentAt":"2005-04-21T23:07:32Z","receivedAt":"2005-04-21T23:07:32Z","isPatch":true,"sender":{"key":"matthias@urlichs.de","avatar":"https://gravatar.com/avatar/2708905af227313eba6f2b2ae0f7d0259b5ac5d71baef58fe5a13c699ce0bbf0?d=mp&s=160"},"body":"Hi,\n\nJunio C Hamano:\n> I sent essentially the same some time ago and got a comment to\n> follow established naming convention.\n> \nWell, for a Makefile which installs in basically one directory, that\nseems to be overkill.\n\n>     # DESTDIR=\n>     BINDIR=$(HOME)/bin\n>             install foobar $(DESTDIR)$(BINDIR)/\n> \nThat doesn't make sense; if you set DESTDIR, you are not going to\ninstall in $HOME.\n\n-- \nMatthias Urlichs   |   {M:U} IT Design @ m-u-it.de   |  smurf@smurf.noris.de\n"},{"id":"1221","messageId":"1114126624.17161.19.camel@dv","threadId":"195","inReplyTo":"20050421230732.GA13311@kiste.smurf.noris.de","subject":"Re: [PATCH] Add DEST Makefile variable","fromName":"Pavel Roskin","fromEmail":"proski@gnu.org","sentAt":"2005-04-21T23:37:04Z","receivedAt":"2005-04-21T23:37:04Z","isPatch":true,"sender":{"key":"proski@gnu.org","avatar":null},"body":"Hello!\n\nOn Fri, 2005-04-22 at 01:07 +0200, Matthias Urlichs wrote:\n> Hi,\n> \n> Junio C Hamano:\n> > I sent essentially the same some time ago and got a comment to\n> > follow established naming convention.\n> > \n> Well, for a Makefile which installs in basically one directory, that\n> seems to be overkill.\n> \n> >     # DESTDIR=\n> >     BINDIR=$(HOME)/bin\n> >             install foobar $(DESTDIR)$(BINDIR)/\n> > \n> That doesn't make sense; if you set DESTDIR, you are not going to\n> install in $HOME.\n\nIt makes sense to stick with conventions.  DESTDIR is almost always set\nby a script for making a package, and that script will likely set prefix\nto /usr.\n\nprefix is set to $HOME temporarily.  It should be changed to /usr/local\nsome day.  It's not uncommon for $HOME to be shared between systems with\ndifferent architectures, so ideally no binaries should be installed\nthere.  I guess $HOME is used to save typing \"su\" or redefining prefix\nin a project that changes every 10 minutes or so.  But once git\nstabilizes, there will be no excuse.\n\nBy the way, we need to change prefix and bindir to be lowercase for\ncompatibility with GNU standards.  Also, ifdef is not needed - command\nline trumps even unconditional variable assignments.  Another thing to\nfix - DESTDIR is not used when bindir is created.\n\nSigned-off-by: Pavel Roskin <proski@gnu.org>\n\n--- a/Makefile\n+++ b/Makefile\n@@ -14,12 +14,10 @@\n # (my ext3 doesn't).\n CFLAGS=-g -O2 -Wall\n \n-ifndef PREFIX\n-PREFIX=$(HOME)\n-endif\n-ifndef BINDIR\n-BINDIR=$(PREFIX)/bin\n-endif\n+# Should be changed to /usr/local\n+prefix=$(HOME)\n+\n+bindir=$(prefix)/bin\n \n CC=gcc\n AR=ar\n@@ -81,8 +79,8 @@ gitversion.sh: $(VERSION)\n \n \n install: $(PROG) $(GEN_SCRIPT)\n-\tinstall -m755 -d $(BINDIR)\n-\tinstall $(PROG) $(SCRIPT) $(GEN_SCRIPT) $(DESTDIR)$(BINDIR)\n+\tinstall -m755 -d $(DESTDIR)$(bindir)\n+\tinstall $(PROG) $(SCRIPT) $(GEN_SCRIPT) $(DESTDIR)$(bindir)\n \n clean:\n \trm -f *.o mozilla-sha1/*.o $(PROG) $(GEN_SCRIPT) $(LIB_FILE)\n\n\n-- \nRegards,\nPavel Roskin\n\n"}]}