On Fri, 2005-04-22 at 01:07 +0200, Matthias Urlichs wrote:
> Junio C Hamano:
> > I sent essentially the same some time ago and got a comment to
> > follow established naming convention.
> Well, for a Makefile which installs in basically one directory, that
> seems to be overkill.
> > # DESTDIR=
> > BINDIR=$(HOME)/bin
> > install foobar $(DESTDIR)$(BINDIR)/
> That doesn't make sense; if you set DESTDIR, you are not going to
> install in $HOME.
It makes sense to stick with conventions. DESTDIR is almost always set
by a script for making a package, and that script will likely set prefix
prefix is set to $HOME temporarily. It should be changed to /usr/local
some day. It's not uncommon for $HOME to be shared between systems with
different architectures, so ideally no binaries should be installed
there. I guess $HOME is used to save typing "su" or redefining prefix
in a project that changes every 10 minutes or so. But once git
stabilizes, there will be no excuse.
By the way, we need to change prefix and bindir to be lowercase for
compatibility with GNU standards. Also, ifdef is not needed - command
line trumps even unconditional variable assignments. Another thing to
fix - DESTDIR is not used when bindir is created.
Signed-off-by: Pavel Roskin <[EMAIL PROTECTED]>
@@ -14,12 +14,10 @@
# (my ext3 doesn't).
CFLAGS=-g -O2 -Wall
+# Should be changed to /usr/local
@@ -81,8 +79,8 @@ gitversion.sh: $(VERSION)
install: $(PROG) $(GEN_SCRIPT)
- install -m755 -d $(BINDIR)
- install $(PROG) $(SCRIPT) $(GEN_SCRIPT) $(DESTDIR)$(BINDIR)
+ install -m755 -d $(DESTDIR)$(bindir)
+ install $(PROG) $(SCRIPT) $(GEN_SCRIPT) $(DESTDIR)$(bindir)
rm -f *.o mozilla-sha1/*.o $(PROG) $(GEN_SCRIPT) $(LIB_FILE)
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html