From: Stepan Kasal <kasal@ucw.cz>
To: Erik Faye-Lund <kusmabite@gmail.com>
Cc: GIT Mailing-list <git@vger.kernel.org>,
Pat Thoyts <patthoyts@users.sourceforge.net>
Subject: Re: [PATCH] wincred: add install target and avoid overwriting configured variables
Date: Wed, 30 Apr 2014 13:27:24 +0200 [thread overview]
Message-ID: <20140430112724.GA22929@camelia.ucw.cz> (raw)
In-Reply-To: <CABPQNSZsviaGqFeKZE4ofF6HoUQrPvNPuowar4YDjk_Mbu5iCQ@mail.gmail.com>
Hello,
> On Wed, Apr 30, 2014 at 8:46 AM, Stepan Kasal <kasal@ucw.cz> wrote:
> > Date: Wed, 24 Oct 2012 00:15:29 +0100
> >
> > Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
> > Signed-off-by: Stepan Kasal <kasal@ucw.cz>
> > ---
> > Another one from msysGit project.
> > Original subject by Pat; I would suggest:
> > wincred: improve Makefile
On Wed, Apr 30, 2014 at 11:21:17AM +0200, Erik Faye-Lund wrote:
> I'm a little bit unsure about this, because the makefile was basically
> just copied from contrib/credential/osxkeychain/Makefile (which was
> the first credential helper) and tweaked slightly.
>
> So, what makes wincred special compared to gnome-keyring, netrc and
> osxkeychain wrt installation? Shouldn't all helpers get the same
> treatment?
I can only guess that the hardwired CC and CFLAGS values can cause
problems.
It is probably much sane on Windows to use the compiler that the user
set up for the build.
I'm not sure if users of, say, OS X, have the same problems, so I
would hesitate to apply these changes to all helpers.
> > From: Pat Thoyts <patthoyts@users.sourceforge.net>
> > contrib/credential/wincred/Makefile | 22 ++++++++++++++--------
> > 1 file changed, 14 insertions(+), 8 deletions(-)
> >
> > diff --git a/contrib/credential/wincred/Makefile b/contrib/credential/wincred/Makefile
> > index bad45ca..3ce6aba 100644
> > --- a/contrib/credential/wincred/Makefile
> > +++ b/contrib/credential/wincred/Makefile
> > @@ -1,14 +1,20 @@
> > -all: git-credential-wincred.exe
> > -
> > -CC = gcc
> > -RM = rm -f
> > -CFLAGS = -O2 -Wall
> > -
> > -include ../../../config.mak.autogen
> > -include ../../../config.mak
> >
> > -git-credential-wincred.exe : git-credential-wincred.c
> > +prefix ?= /usr/local
> > +libexecdir ?= $(prefix)/libexec/git-core
> > +
> > +INSTALL ?= install
> > +
> > +GIT_CREDENTIAL_WINCRED := git-credential-wincred.exe
>
> Why this variable? IMO, it's just as "GIT_CREDENTIAL_WINCRED" easy to
> miss-spell as "git-credential-wincred.exe", and it doesn't seem to be
> possible to overload.
If you mis-spell a variable name, nothing is build. If you misspell
a binary name, that binary may get compiled using a default rule;
that is why I would generally prefer variables.
Moreover, if the cardinality of the set ever increases, the
indirection may get helpful.
No big deal.
> > +
> > +all: $(GIT_CREDENTIAL_WINCRED)
> > +
>
> Also, why move the all-target down from the top? Is it simply because
> of the definition above?
Again, I agree with Pat that it is nicer this way, but no big
deal.
Stepan Kasal
next prev parent reply other threads:[~2014-04-30 11:27 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-30 6:46 [PATCH] wincred: add install target and avoid overwriting configured variables Stepan Kasal
2014-04-30 9:21 ` Erik Faye-Lund
2014-04-30 11:27 ` Stepan Kasal [this message]
2014-04-30 11:56 ` Erik Faye-Lund
2014-05-13 5:59 ` [PATCH 0/2] wincred makefile changes Stepan Kasal
2014-05-13 6:01 ` [PATCH 1/2] wincred: add install target Stepan Kasal
2014-05-13 6:01 ` [PATCH 2/2] wincred: avoid overwriting configured variables Stepan Kasal
2014-05-13 6:34 ` Erik Faye-Lund
2014-05-13 6:53 ` Stepan Kasal
[not found] ` <CABPQNSbb-rdTjCDYoC7uApfcMH8Q0Y-w4Tm9UiN6PhEeD-Gv6Q@mail.gmail.com>
[not found] ` <20140514084509.GA3134@camelia.ucw.cz>
2014-05-14 8:49 ` Erik Faye-Lund
2014-05-13 13:18 ` Felipe Contreras
2014-05-13 13:53 ` Stepan Kasal
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=20140430112724.GA22929@camelia.ucw.cz \
--to=kasal@ucw.cz \
--cc=git@vger.kernel.org \
--cc=kusmabite@gmail.com \
--cc=patthoyts@users.sourceforge.net \
/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).