From: Pavel Roskin <proski@gnu.org>
To: Matthias Urlichs <smurf@smurf.noris.de>
Cc: Junio C Hamano <junio@siamese.dyndns.org>, git@vger.kernel.org
Subject: Re: [PATCH] Add DEST Makefile variable
Date: Thu, 21 Apr 2005 19:37:04 -0400 [thread overview]
Message-ID: <1114126624.17161.19.camel@dv> (raw)
In-Reply-To: <20050421230732.GA13311@kiste.smurf.noris.de>
Hello!
On Fri, 2005-04-22 at 01:07 +0200, Matthias Urlichs wrote:
> Hi,
>
> 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
to /usr.
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 <proski@gnu.org>
--- a/Makefile
+++ b/Makefile
@@ -14,12 +14,10 @@
# (my ext3 doesn't).
CFLAGS=-g -O2 -Wall
-ifndef PREFIX
-PREFIX=$(HOME)
-endif
-ifndef BINDIR
-BINDIR=$(PREFIX)/bin
-endif
+# Should be changed to /usr/local
+prefix=$(HOME)
+
+bindir=$(prefix)/bin
CC=gcc
AR=ar
@@ -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)
clean:
rm -f *.o mozilla-sha1/*.o $(PROG) $(GEN_SCRIPT) $(LIB_FILE)
--
Regards,
Pavel Roskin
prev parent reply other threads:[~2005-04-21 23:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-21 12:39 [PATCH] Add DEST Makefile variable Matthias Urlichs
2005-04-21 22:59 ` Junio C Hamano
2005-04-21 23:07 ` Matthias Urlichs
2005-04-21 23:37 ` Pavel Roskin [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1114126624.17161.19.camel@dv \
--to=proski@gnu.org \
--cc=git@vger.kernel.org \
--cc=junio@siamese.dyndns.org \
--cc=smurf@smurf.noris.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).