threads / patch / 36550

patchwincred: add install target and avoid overwriting configured variables

Subject: [PATCH] wincred: add install target and avoid overwriting configured variables

## tl;dr

12 messages between Apr 30, 2014 and May 14, 2014. Diffs are folded; open one to read it.

replies: 11people: 3as markdown or json

Stepan Kasal· Apr 30, 2014, 06:46 UTC · lore
From: Pat Thoyts <patthoyts@users.sourceforge.net>
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
 contrib/credential/wincred/Makefile | 22 ++++++++++++++--------
 1 file changed, 14 insertions(+), 8 deletions(-)
Show changes to contrib/credential/wincred/Makefile +14 −8
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
+
+all: $(GIT_CREDENTIAL_WINCRED)
+
+$(GIT_CREDENTIAL_WINCRED): git-credential-wincred.c
 	$(LINK.c) $^ $(LOADLIBES) $(LDLIBS) -o $@
 
+install: $(GIT_CREDENTIAL_WINCRED)
+	$(INSTALL) -m 755 $(GIT_CREDENTIAL_WINCRED) $(libexecdir)
+
 clean:
-	$(RM) git-credential-wincred.exe
+	$(RM) $(GIT_CREDENTIAL_WINCRED)
-- 
1.9.2.msysgit.0.158.g6070cee
Erik Faye-Lund· Apr 30, 2014, 09:21 UTC · re: Stepan Kasal · lore

Re: [PATCH] wincred: add install target and avoid overwriting configured variables

On Wed, Apr 30, 2014 at 8:46 AM, Stepan Kasal <kasal@ucw.cz> wrote:
Show 9 quoted lines
> From: Pat Thoyts <patthoyts@users.sourceforge.net>
> 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

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?

Show 24 quoted lines
>  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.

> +
> +all: $(GIT_CREDENTIAL_WINCRED)
> +

Also, why move the all-target down from the top? Is it simply because of the definition above?

Stepan Kasal· Apr 30, 2014, 11:27 UTC · re: Erik Faye-Lund · lore

Re: [PATCH] wincred: add install target and avoid overwriting configured variables

Hello,
Show 9 quoted lines
> 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:
Show 7 quoted lines
> 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.

Show 29 quoted lines
> > 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.

Show 6 quoted lines
> > +
> > +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
Erik Faye-Lund· Apr 30, 2014, 11:56 UTC · re: Stepan Kasal · lore

Re: [PATCH] wincred: add install target and avoid overwriting configured variables

On Wed, Apr 30, 2014 at 1:27 PM, Stepan Kasal <kasal@ucw.cz> wrote:
Show 23 quoted lines
> 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.

I doubt that a patch that doesn't describe exactly what kind of issues will get merged. And it certainly won't get my ack unless I understand why.

> It is probably much sane on Windows to use the compiler that the user
> set up for the build.

But you can already do that, the same way as for the rest of git, by overloading these in config.mak in the root of the git repo.

> 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.

Even if I bought that it's needed (which I'm currently skeptical to), I think the "dunno about OSX" is a bit of a cop-out.

Show 33 quoted lines
>> > 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.

Following that logic, you should be submitting similar patches to the main git Makefile as well. Somehow I doubt that'll happen.

> Moreover, if the cardinality of the set ever increases, the
> indirection may get helpful.

I don't think there's any reason to expect the number of binaries to increase, so that's moot. And if I'm wrong, let's deal with that when the time comes. It's not like this version is prepared for the variable being a list either - neither should there IMO.

Show 9 quoted lines
>> > +
>> > +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.

We don't usually do "this is subjectively better"-patches in Git. Instead we try to follow the current style.

Stepan Kasal· May 13, 2014, 05:59 UTC · re: Erik Faye-Lund · lore

[PATCH 0/2] wincred makefile changes

Hello again,
  I revisited a patch that is present in msysgit since Oct 2012.
Dropping the cosmetic changes, there are two separate parts:
Pat Thoyts (2):
  wincred: add install target
  wincred: avoid overwriting configured variables
wincred: add install target
   Git for Windows does contain git-credential-wincred
wincred: avoid overwriting configured variables
   Generally, overriding these variables this deep is evil.
   (We could use ?= if really necessary.)
Erik, does this iteration look better?
Stepan
 contrib/credential/wincred/Makefile | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
-- 
1.9.2.msysgit.0.161.g83227c1

-- 
-- 
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups "msysGit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Stepan Kasal· May 13, 2014, 06:01 UTC · re: Stepan Kasal · lore

[PATCH 1/2] wincred: add install target

From: Pat Thoyts <patthoyts@users.sourceforge.net>
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>
---
 contrib/credential/wincred/Makefile | 8 ++++++++
 1 file changed, 8 insertions(+)
Show changes to contrib/credential/wincred/Makefile +8 −0
diff --git a/contrib/credential/wincred/Makefile b/contrib/credential/wincred/Makefile
index bad45ca..39fa5e0 100644
--- a/contrib/credential/wincred/Makefile
+++ b/contrib/credential/wincred/Makefile
@@ -7,8 +7,16 @@ CFLAGS = -O2 -Wall
 -include ../../../config.mak.autogen
 -include ../../../config.mak
 
+prefix ?= /usr/local
+libexecdir ?= $(prefix)/libexec/git-core
+
+INSTALL ?= install
+
 git-credential-wincred.exe : git-credential-wincred.c
 	$(LINK.c) $^ $(LOADLIBES) $(LDLIBS) -o $@
 
+install: git-credential-wincred.exe
+	$(INSTALL) -m 755 $^ $(libexecdir)
+
 clean:
 	$(RM) git-credential-wincred.exe
-- 
1.9.2.msysgit.0.161.g83227c1

-- 
-- 
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups "msysGit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Stepan Kasal· May 13, 2014, 06:01 UTC · re: Stepan Kasal · lore

[PATCH 2/2] wincred: avoid overwriting configured variables

From: Pat Thoyts <patthoyts@users.sourceforge.net>
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>
---
 contrib/credential/wincred/Makefile | 4 ----
 1 file changed, 4 deletions(-)
Show changes to contrib/credential/wincred/Makefile +0 −4
diff --git a/contrib/credential/wincred/Makefile b/contrib/credential/wincred/Makefile
index 39fa5e0..e64cd9a 100644
--- a/contrib/credential/wincred/Makefile
+++ b/contrib/credential/wincred/Makefile
@@ -1,9 +1,5 @@
 all: git-credential-wincred.exe
 
-CC = gcc
-RM = rm -f
-CFLAGS = -O2 -Wall
-
 -include ../../../config.mak.autogen
 -include ../../../config.mak
 
-- 
1.9.2.msysgit.0.161.g83227c1

-- 
-- 
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups "msysGit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Erik Faye-Lund· May 13, 2014, 06:34 UTC · re: Stepan Kasal · lore

Re: [PATCH 2/2] wincred: avoid overwriting configured variables

On Tue, May 13, 2014 at 8:01 AM, Stepan Kasal <kasal@ucw.cz> wrote:
Show 20 quoted lines
> From: Pat Thoyts <patthoyts@users.sourceforge.net>
> 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>
> ---
>  contrib/credential/wincred/Makefile | 4 ----
>  1 file changed, 4 deletions(-)
>
> diff --git a/contrib/credential/wincred/Makefile b/contrib/credential/wincred/Makefile
> index 39fa5e0..e64cd9a 100644
> --- a/contrib/credential/wincred/Makefile
> +++ b/contrib/credential/wincred/Makefile
> @@ -1,9 +1,5 @@
>  all: git-credential-wincred.exe
>
> -CC = gcc
> -RM = rm -f
> -CFLAGS = -O2 -Wall
> -
Would it be better to set these if not already set, i.e:

-CC = gcc -RM = rm -f -CFLAGS = -O2 -Wall +CC ?= gcc +RM ?= rm -f +CFLAGS ?= -O2 -Wall

instead?
-- 
-- 
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups "msysGit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Stepan Kasal· May 13, 2014, 06:53 UTC · re: Erik Faye-Lund · lore

[PATCH 2/2] wincred: avoid overwriting configured variables

From: Pat Thoyts <patthoyts@users.sourceforge.net>
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>
---
Hi kusma,
On Tue, May 13, 2014 at 08:34:36AM +0200, Erik Faye-Lund wrote:
Show 10 quoted lines
> Would it be better to set these if not already set, i.e:
> 
> -CC = gcc
> -RM = rm -f
> -CFLAGS = -O2 -Wall
> +CC ?= gcc
> +RM ?= rm -f
> +CFLAGS ?= -O2 -Wall
> 
> instead?

... and moving it after the two includes, so that it does not override the values set there?

Can you ack this?
 contrib/credential/wincred/Makefile | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
Show changes to contrib/credential/wincred/Makefile +4 −4
diff --git a/contrib/credential/wincred/Makefile b/contrib/credential/wincred/Makefile
index 39fa5e0..6e992c0 100644
--- a/contrib/credential/wincred/Makefile
+++ b/contrib/credential/wincred/Makefile
@@ -1,12 +1,12 @@
 all: git-credential-wincred.exe
 
-CC = gcc
-RM = rm -f
-CFLAGS = -O2 -Wall
-
 -include ../../../config.mak.autogen
 -include ../../../config.mak
 
+CC ?= gcc
+RM ?= rm -f
+CFLAGS ?= -O2 -Wall
+
 prefix ?= /usr/local
 libexecdir ?= $(prefix)/libexec/git-core
 
-- 
1.9.2.msysgit.0.161.g83227c1

-- 
-- 
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups "msysGit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Felipe Contreras· May 13, 2014, 13:18 UTC · re: Erik Faye-Lund · lore

Re: [PATCH 2/2] wincred: avoid overwriting configured variables

On Tue, May 13, 2014 at 1:34 AM, Erik Faye-Lund <kusmabite@gmail.com> wrote:
Show 32 quoted lines
> On Tue, May 13, 2014 at 8:01 AM, Stepan Kasal <kasal@ucw.cz> wrote:
>> From: Pat Thoyts <patthoyts@users.sourceforge.net>
>> 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>
>> ---
>>  contrib/credential/wincred/Makefile | 4 ----
>>  1 file changed, 4 deletions(-)
>>
>> diff --git a/contrib/credential/wincred/Makefile b/contrib/credential/wincred/Makefile
>> index 39fa5e0..e64cd9a 100644
>> --- a/contrib/credential/wincred/Makefile
>> +++ b/contrib/credential/wincred/Makefile
>> @@ -1,9 +1,5 @@
>>  all: git-credential-wincred.exe
>>
>> -CC = gcc
>> -RM = rm -f
>> -CFLAGS = -O2 -Wall
>> -
>
> Would it be better to set these if not already set, i.e:
>
> -CC = gcc
> -RM = rm -f
> -CFLAGS = -O2 -Wall
> +CC ?= gcc
> +RM ?= rm -f
> +CFLAGS ?= -O2 -Wall
>
> instead?
Set by whom? If it's by the environment you should be running 'make -e'.
-- 
Felipe Contreras

-- 
-- 
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups "msysGit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Stepan Kasal· May 13, 2014, 13:53 UTC · re: Felipe Contreras · lore

Re: [PATCH 2/2] wincred: avoid overwriting configured variables

Hello,
On Tue, May 13, 2014 at 08:18:26AM -0500, Felipe Contreras wrote:
> Set by whom? If it's by the environment you should be running 'make -e'.

... or on command line (through recursive make, prehaps). But these both take precedence over makefile assignments.

Another issue is the interaction with included makefile fragments.
Actually, both
	CC = gcc
	-include ../../../config.mak
and
	-include ../../../config.mak
	CC ?= gcc
are very close.  (They would differ if config.mak contained "?=".)
I was confused by the former, but perhaps it's only me.
Stepan
-- 
-- 
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups "msysGit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Erik Faye-Lund· May 14, 2014, 08:49 UTC · lore

Re: [PATCH 2/2] wincred: avoid overwriting configured variables

On Wed, May 14, 2014 at 10:45 AM, Stepan Kasal <kasal@ucw.cz> wrote:
Show 27 quoted lines
> Hello kusma,
>
> On Tue, May 13, 2014 at 08:56:54AM +0200, Erik Faye-Lund wrote:
>> > --- a/contrib/credential/wincred/Makefile
>> > +++ b/contrib/credential/wincred/Makefile
>> > @@ -1,12 +1,12 @@
>> >  all: git-credential-wincred.exe
>> >
>> > -CC = gcc
>> > -RM = rm -f
>> > -CFLAGS = -O2 -Wall
>> > -
>> >  -include ../../../config.mak.autogen
>> >  -include ../../../config.mak
>> >
>> > +CC ?= gcc
>> > +RM ?= rm -f
>> > +CFLAGS ?= -O2 -Wall
>> > +
>> >  prefix ?= /usr/local
>> >  libexecdir ?= $(prefix)/libexec/git-core
>> >
>>
>> Yeah, looks good to me.
>
> thanks, but it looks you replied only to my personal mail.  Was it
> intentional?
No, sorry about that.
Consider the patches
Acked-by: Erik Faye-Lund <kusmabite@gmail.com>
-- 
-- 
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups "msysGit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

← back to recent threads