{"thread":{"id":"36550","subject":"[PATCH] wincred: add install target and avoid overwriting configured variables","startedAt":"2014-04-30T06:46:10Z","lastAt":"2014-05-14T08:49:27Z","messageCount":12,"participants":["Stepan Kasal","Erik Faye-Lund","Felipe Contreras"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"240271","messageId":"20140430064610.GA22094@camelia.ucw.cz","threadId":"36550","inReplyTo":null,"subject":"[PATCH] wincred: add install target and avoid overwriting configured variables","fromName":"Stepan Kasal","fromEmail":"kasal@ucw.cz","sentAt":"2014-04-30T06:46:10Z","receivedAt":"2014-04-30T06:46:10Z","isPatch":true,"sender":{"key":"kasal@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/1481596?v=4"},"body":"From: Pat Thoyts <patthoyts@users.sourceforge.net>\nDate: Wed, 24 Oct 2012 00:15:29 +0100\n\nSigned-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>\nSigned-off-by: Stepan Kasal <kasal@ucw.cz>\n---\nAnother one from msysGit project.\nOriginal subject by Pat; I would suggest:\n    wincred: improve Makefile\n contrib/credential/wincred/Makefile | 22 ++++++++++++++--------\n 1 file changed, 14 insertions(+), 8 deletions(-)\n\ndiff --git a/contrib/credential/wincred/Makefile b/contrib/credential/wincred/Makefile\nindex bad45ca..3ce6aba 100644\n--- a/contrib/credential/wincred/Makefile\n+++ b/contrib/credential/wincred/Makefile\n@@ -1,14 +1,20 @@\n-all: git-credential-wincred.exe\n-\n-CC = gcc\n-RM = rm -f\n-CFLAGS = -O2 -Wall\n-\n -include ../../../config.mak.autogen\n -include ../../../config.mak\n \n-git-credential-wincred.exe : git-credential-wincred.c\n+prefix ?= /usr/local\n+libexecdir ?= $(prefix)/libexec/git-core\n+\n+INSTALL ?= install\n+\n+GIT_CREDENTIAL_WINCRED := git-credential-wincred.exe\n+\n+all: $(GIT_CREDENTIAL_WINCRED)\n+\n+$(GIT_CREDENTIAL_WINCRED): git-credential-wincred.c\n \t$(LINK.c) $^ $(LOADLIBES) $(LDLIBS) -o $@\n \n+install: $(GIT_CREDENTIAL_WINCRED)\n+\t$(INSTALL) -m 755 $(GIT_CREDENTIAL_WINCRED) $(libexecdir)\n+\n clean:\n-\t$(RM) git-credential-wincred.exe\n+\t$(RM) $(GIT_CREDENTIAL_WINCRED)\n-- \n1.9.2.msysgit.0.158.g6070cee\n"},{"id":"240279","messageId":"CABPQNSZsviaGqFeKZE4ofF6HoUQrPvNPuowar4YDjk_Mbu5iCQ@mail.gmail.com","threadId":"36550","inReplyTo":"20140430064610.GA22094@camelia.ucw.cz","subject":"Re: [PATCH] wincred: add install target and avoid overwriting configured variables","fromName":"Erik Faye-Lund","fromEmail":"kusmabite@gmail.com","sentAt":"2014-04-30T09:21:17Z","receivedAt":"2014-04-30T09:21:17Z","isPatch":true,"sender":{"key":"kusmabite@gmail.com","avatar":"https://avatars.githubusercontent.com/u/47073?v=4"},"body":"On Wed, Apr 30, 2014 at 8:46 AM, Stepan Kasal <kasal@ucw.cz> wrote:\n> From: Pat Thoyts <patthoyts@users.sourceforge.net>\n> Date: Wed, 24 Oct 2012 00:15:29 +0100\n>\n> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>\n> Signed-off-by: Stepan Kasal <kasal@ucw.cz>\n> ---\n> Another one from msysGit project.\n> Original subject by Pat; I would suggest:\n>     wincred: improve Makefile\n\nI'm a little bit unsure about this, because the makefile was basically\njust copied from contrib/credential/osxkeychain/Makefile (which was\nthe first credential helper) and tweaked slightly.\n\nSo, what makes wincred special compared to gnome-keyring, netrc and\nosxkeychain wrt installation? Shouldn't all helpers get the same\ntreatment?\n\n>  contrib/credential/wincred/Makefile | 22 ++++++++++++++--------\n>  1 file changed, 14 insertions(+), 8 deletions(-)\n>\n> diff --git a/contrib/credential/wincred/Makefile b/contrib/credential/wincred/Makefile\n> index bad45ca..3ce6aba 100644\n> --- a/contrib/credential/wincred/Makefile\n> +++ b/contrib/credential/wincred/Makefile\n> @@ -1,14 +1,20 @@\n> -all: git-credential-wincred.exe\n> -\n> -CC = gcc\n> -RM = rm -f\n> -CFLAGS = -O2 -Wall\n> -\n>  -include ../../../config.mak.autogen\n>  -include ../../../config.mak\n>\n> -git-credential-wincred.exe : git-credential-wincred.c\n> +prefix ?= /usr/local\n> +libexecdir ?= $(prefix)/libexec/git-core\n> +\n> +INSTALL ?= install\n> +\n> +GIT_CREDENTIAL_WINCRED := git-credential-wincred.exe\n\nWhy this variable? IMO, it's just as \"GIT_CREDENTIAL_WINCRED\" easy to\nmiss-spell as \"git-credential-wincred.exe\", and it doesn't seem to be\npossible to overload.\n\n> +\n> +all: $(GIT_CREDENTIAL_WINCRED)\n> +\n\nAlso, why move the all-target down from the top? Is it simply because\nof the definition above?\n"},{"id":"240296","messageId":"20140430112724.GA22929@camelia.ucw.cz","threadId":"36550","inReplyTo":"CABPQNSZsviaGqFeKZE4ofF6HoUQrPvNPuowar4YDjk_Mbu5iCQ@mail.gmail.com","subject":"Re: [PATCH] wincred: add install target and avoid overwriting configured variables","fromName":"Stepan Kasal","fromEmail":"kasal@ucw.cz","sentAt":"2014-04-30T11:27:24Z","receivedAt":"2014-04-30T11:27:24Z","isPatch":true,"sender":{"key":"kasal@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/1481596?v=4"},"body":"Hello,\n\n> On Wed, Apr 30, 2014 at 8:46 AM, Stepan Kasal <kasal@ucw.cz> wrote:\n> > Date: Wed, 24 Oct 2012 00:15:29 +0100\n> >\n> > Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>\n> > Signed-off-by: Stepan Kasal <kasal@ucw.cz>\n> > ---\n> > Another one from msysGit project.\n> > Original subject by Pat; I would suggest:\n> >     wincred: improve Makefile\n\nOn Wed, Apr 30, 2014 at 11:21:17AM +0200, Erik Faye-Lund wrote:\n> I'm a little bit unsure about this, because the makefile was basically\n> just copied from contrib/credential/osxkeychain/Makefile (which was\n> the first credential helper) and tweaked slightly.\n> \n> So, what makes wincred special compared to gnome-keyring, netrc and\n> osxkeychain wrt installation? Shouldn't all helpers get the same\n> treatment?\n\nI can only guess that the hardwired CC and CFLAGS values can cause\nproblems.\nIt is probably much sane on Windows to use the compiler that the user\nset up for the build.\n\nI'm not sure if users of, say, OS X, have the same problems, so I\nwould hesitate to apply these changes to all helpers.\n\n> > From: Pat Thoyts <patthoyts@users.sourceforge.net>\n> >  contrib/credential/wincred/Makefile | 22 ++++++++++++++--------\n> >  1 file changed, 14 insertions(+), 8 deletions(-)\n> >\n> > diff --git a/contrib/credential/wincred/Makefile b/contrib/credential/wincred/Makefile\n> > index bad45ca..3ce6aba 100644\n> > --- a/contrib/credential/wincred/Makefile\n> > +++ b/contrib/credential/wincred/Makefile\n> > @@ -1,14 +1,20 @@\n> > -all: git-credential-wincred.exe\n> > -\n> > -CC = gcc\n> > -RM = rm -f\n> > -CFLAGS = -O2 -Wall\n> > -\n> >  -include ../../../config.mak.autogen\n> >  -include ../../../config.mak\n> >\n> > -git-credential-wincred.exe : git-credential-wincred.c\n> > +prefix ?= /usr/local\n> > +libexecdir ?= $(prefix)/libexec/git-core\n> > +\n> > +INSTALL ?= install\n> > +\n> > +GIT_CREDENTIAL_WINCRED := git-credential-wincred.exe\n> \n> Why this variable? IMO, it's just as \"GIT_CREDENTIAL_WINCRED\" easy to\n> miss-spell as \"git-credential-wincred.exe\", and it doesn't seem to be\n> possible to overload.\n\nIf you mis-spell a variable name, nothing is build.  If you misspell\na binary name, that binary may get compiled using a default rule;\nthat is why I would generally prefer variables.\nMoreover, if the cardinality of the set ever increases, the\nindirection may get helpful.\nNo big deal.\n\n> > +\n> > +all: $(GIT_CREDENTIAL_WINCRED)\n> > +\n> \n> Also, why move the all-target down from the top? Is it simply because\n> of the definition above?\n\nAgain, I agree with Pat that it is nicer this way, but no big\ndeal.\n\nStepan Kasal\n"},{"id":"240298","messageId":"CABPQNSafKXDLyBj5OYW-PPWdxfxQtC23vKQsQ-_Pa1empU=n8g@mail.gmail.com","threadId":"36550","inReplyTo":"20140430112724.GA22929@camelia.ucw.cz","subject":"Re: [PATCH] wincred: add install target and avoid overwriting configured variables","fromName":"Erik Faye-Lund","fromEmail":"kusmabite@gmail.com","sentAt":"2014-04-30T11:56:05Z","receivedAt":"2014-04-30T11:56:05Z","isPatch":true,"sender":{"key":"kusmabite@gmail.com","avatar":"https://avatars.githubusercontent.com/u/47073?v=4"},"body":"On Wed, Apr 30, 2014 at 1:27 PM, Stepan Kasal <kasal@ucw.cz> wrote:\n> Hello,\n>\n>> On Wed, Apr 30, 2014 at 8:46 AM, Stepan Kasal <kasal@ucw.cz> wrote:\n>> > Date: Wed, 24 Oct 2012 00:15:29 +0100\n>> >\n>> > Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>\n>> > Signed-off-by: Stepan Kasal <kasal@ucw.cz>\n>> > ---\n>> > Another one from msysGit project.\n>> > Original subject by Pat; I would suggest:\n>> >     wincred: improve Makefile\n>\n> On Wed, Apr 30, 2014 at 11:21:17AM +0200, Erik Faye-Lund wrote:\n>> I'm a little bit unsure about this, because the makefile was basically\n>> just copied from contrib/credential/osxkeychain/Makefile (which was\n>> the first credential helper) and tweaked slightly.\n>>\n>> So, what makes wincred special compared to gnome-keyring, netrc and\n>> osxkeychain wrt installation? Shouldn't all helpers get the same\n>> treatment?\n>\n> I can only guess that the hardwired CC and CFLAGS values can cause\n> problems.\n\nI doubt that a patch that doesn't describe exactly what kind of issues\nwill get merged. And it certainly won't get my ack unless I understand\nwhy.\n\n> It is probably much sane on Windows to use the compiler that the user\n> set up for the build.\n\nBut you can already do that, the same way as for the rest of git, by\noverloading these in config.mak in the root of the git repo.\n\n> I'm not sure if users of, say, OS X, have the same problems, so I\n> would hesitate to apply these changes to all helpers.\n\nEven if I bought that it's needed (which I'm currently skeptical to),\nI think the \"dunno about OSX\" is a bit of a cop-out.\n\n>> > From: Pat Thoyts <patthoyts@users.sourceforge.net>\n>> >  contrib/credential/wincred/Makefile | 22 ++++++++++++++--------\n>> >  1 file changed, 14 insertions(+), 8 deletions(-)\n>> >\n>> > diff --git a/contrib/credential/wincred/Makefile b/contrib/credential/wincred/Makefile\n>> > index bad45ca..3ce6aba 100644\n>> > --- a/contrib/credential/wincred/Makefile\n>> > +++ b/contrib/credential/wincred/Makefile\n>> > @@ -1,14 +1,20 @@\n>> > -all: git-credential-wincred.exe\n>> > -\n>> > -CC = gcc\n>> > -RM = rm -f\n>> > -CFLAGS = -O2 -Wall\n>> > -\n>> >  -include ../../../config.mak.autogen\n>> >  -include ../../../config.mak\n>> >\n>> > -git-credential-wincred.exe : git-credential-wincred.c\n>> > +prefix ?= /usr/local\n>> > +libexecdir ?= $(prefix)/libexec/git-core\n>> > +\n>> > +INSTALL ?= install\n>> > +\n>> > +GIT_CREDENTIAL_WINCRED := git-credential-wincred.exe\n>>\n>> Why this variable? IMO, it's just as \"GIT_CREDENTIAL_WINCRED\" easy to\n>> miss-spell as \"git-credential-wincred.exe\", and it doesn't seem to be\n>> possible to overload.\n>\n> If you mis-spell a variable name, nothing is build.  If you misspell\n> a binary name, that binary may get compiled using a default rule;\n> that is why I would generally prefer variables.\n\nFollowing that logic, you should be submitting similar patches to the\nmain git Makefile as well. Somehow I doubt that'll happen.\n\n> Moreover, if the cardinality of the set ever increases, the\n> indirection may get helpful.\n\nI don't think there's any reason to expect the number of binaries to\nincrease, so that's moot. And if I'm wrong, let's deal with that when\nthe time comes. It's not like this version is prepared for the\nvariable being a list either - neither should there IMO.\n\n>> > +\n>> > +all: $(GIT_CREDENTIAL_WINCRED)\n>> > +\n>>\n>> Also, why move the all-target down from the top? Is it simply because\n>> of the definition above?\n>\n> Again, I agree with Pat that it is nicer this way, but no big\n> deal.\n\nWe don't usually do \"this is subjectively better\"-patches in Git.\nInstead we try to follow the current style.\n"},{"id":"241332","messageId":"20140513055953.GA28182@camelia.ucw.cz","threadId":"36550","inReplyTo":"CABPQNSafKXDLyBj5OYW-PPWdxfxQtC23vKQsQ-_Pa1empU=n8g@mail.gmail.com","subject":"[PATCH 0/2] wincred makefile changes","fromName":"Stepan Kasal","fromEmail":"kasal@ucw.cz","sentAt":"2014-05-13T05:59:53Z","receivedAt":"2014-05-13T05:59:53Z","isPatch":true,"sender":{"key":"kasal@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/1481596?v=4"},"body":"Hello again,\n  I revisited a patch that is present in msysgit since Oct 2012.\nDropping the cosmetic changes, there are two separate parts:\n\nPat Thoyts (2):\n  wincred: add install target\n  wincred: avoid overwriting configured variables\n\nwincred: add install target\n   Git for Windows does contain git-credential-wincred\nwincred: avoid overwriting configured variables\n   Generally, overriding these variables this deep is evil.\n   (We could use ?= if really necessary.)\n\nErik, does this iteration look better?\n\nStepan\n\n contrib/credential/wincred/Makefile | 12 ++++++++----\n 1 file changed, 8 insertions(+), 4 deletions(-)\n\n-- \n1.9.2.msysgit.0.161.g83227c1\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"msysGit\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"241333","messageId":"20140513060101.GB28182@camelia.ucw.cz","threadId":"36550","inReplyTo":"20140513055953.GA28182@camelia.ucw.cz","subject":"[PATCH 1/2] wincred: add install target","fromName":"Stepan Kasal","fromEmail":"kasal@ucw.cz","sentAt":"2014-05-13T06:01:01Z","receivedAt":"2014-05-13T06:01:01Z","isPatch":true,"sender":{"key":"kasal@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/1481596?v=4"},"body":"From: Pat Thoyts <patthoyts@users.sourceforge.net>\nDate: Wed, 24 Oct 2012 00:15:29 +0100\n\nSigned-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>\nSigned-off-by: Stepan Kasal <kasal@ucw.cz>\n---\n contrib/credential/wincred/Makefile | 8 ++++++++\n 1 file changed, 8 insertions(+)\n\ndiff --git a/contrib/credential/wincred/Makefile b/contrib/credential/wincred/Makefile\nindex bad45ca..39fa5e0 100644\n--- a/contrib/credential/wincred/Makefile\n+++ b/contrib/credential/wincred/Makefile\n@@ -7,8 +7,16 @@ CFLAGS = -O2 -Wall\n -include ../../../config.mak.autogen\n -include ../../../config.mak\n \n+prefix ?= /usr/local\n+libexecdir ?= $(prefix)/libexec/git-core\n+\n+INSTALL ?= install\n+\n git-credential-wincred.exe : git-credential-wincred.c\n \t$(LINK.c) $^ $(LOADLIBES) $(LDLIBS) -o $@\n \n+install: git-credential-wincred.exe\n+\t$(INSTALL) -m 755 $^ $(libexecdir)\n+\n clean:\n \t$(RM) git-credential-wincred.exe\n-- \n1.9.2.msysgit.0.161.g83227c1\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"msysGit\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"241334","messageId":"20140513060144.GC28182@camelia.ucw.cz","threadId":"36550","inReplyTo":"20140513055953.GA28182@camelia.ucw.cz","subject":"[PATCH 2/2] wincred: avoid overwriting configured variables","fromName":"Stepan Kasal","fromEmail":"kasal@ucw.cz","sentAt":"2014-05-13T06:01:44Z","receivedAt":"2014-05-13T06:01:44Z","isPatch":true,"sender":{"key":"kasal@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/1481596?v=4"},"body":"From: Pat Thoyts <patthoyts@users.sourceforge.net>\nDate: Wed, 24 Oct 2012 00:15:29 +0100\n\nSigned-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>\nSigned-off-by: Stepan Kasal <kasal@ucw.cz>\n---\n contrib/credential/wincred/Makefile | 4 ----\n 1 file changed, 4 deletions(-)\n\ndiff --git a/contrib/credential/wincred/Makefile b/contrib/credential/wincred/Makefile\nindex 39fa5e0..e64cd9a 100644\n--- a/contrib/credential/wincred/Makefile\n+++ b/contrib/credential/wincred/Makefile\n@@ -1,9 +1,5 @@\n all: git-credential-wincred.exe\n \n-CC = gcc\n-RM = rm -f\n-CFLAGS = -O2 -Wall\n-\n -include ../../../config.mak.autogen\n -include ../../../config.mak\n \n-- \n1.9.2.msysgit.0.161.g83227c1\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"msysGit\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"241336","messageId":"CABPQNSYU5haMzdy2cDn=KF2+j_aFK19Ju+x+LTeex6JqWJMncQ@mail.gmail.com","threadId":"36550","inReplyTo":"20140513060144.GC28182@camelia.ucw.cz","subject":"Re: [PATCH 2/2] wincred: avoid overwriting configured variables","fromName":"Erik Faye-Lund","fromEmail":"kusmabite@gmail.com","sentAt":"2014-05-13T06:34:36Z","receivedAt":"2014-05-13T06:34:36Z","isPatch":true,"sender":{"key":"kusmabite@gmail.com","avatar":"https://avatars.githubusercontent.com/u/47073?v=4"},"body":"On Tue, May 13, 2014 at 8:01 AM, Stepan Kasal <kasal@ucw.cz> wrote:\n> From: Pat Thoyts <patthoyts@users.sourceforge.net>\n> Date: Wed, 24 Oct 2012 00:15:29 +0100\n>\n> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>\n> Signed-off-by: Stepan Kasal <kasal@ucw.cz>\n> ---\n>  contrib/credential/wincred/Makefile | 4 ----\n>  1 file changed, 4 deletions(-)\n>\n> diff --git a/contrib/credential/wincred/Makefile b/contrib/credential/wincred/Makefile\n> index 39fa5e0..e64cd9a 100644\n> --- a/contrib/credential/wincred/Makefile\n> +++ b/contrib/credential/wincred/Makefile\n> @@ -1,9 +1,5 @@\n>  all: git-credential-wincred.exe\n>\n> -CC = gcc\n> -RM = rm -f\n> -CFLAGS = -O2 -Wall\n> -\n\nWould it be better to set these if not already set, i.e:\n\n-CC = gcc\n-RM = rm -f\n-CFLAGS = -O2 -Wall\n+CC ?= gcc\n+RM ?= rm -f\n+CFLAGS ?= -O2 -Wall\n\ninstead?\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"msysGit\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"241337","messageId":"20140513065335.GA28417@camelia.ucw.cz","threadId":"36550","inReplyTo":"CABPQNSYU5haMzdy2cDn=KF2+j_aFK19Ju+x+LTeex6JqWJMncQ@mail.gmail.com","subject":"[PATCH 2/2] wincred: avoid overwriting configured variables","fromName":"Stepan Kasal","fromEmail":"kasal@ucw.cz","sentAt":"2014-05-13T06:53:35Z","receivedAt":"2014-05-13T06:53:35Z","isPatch":true,"sender":{"key":"kasal@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/1481596?v=4"},"body":"From: Pat Thoyts <patthoyts@users.sourceforge.net>\nDate: Wed, 24 Oct 2012 00:15:29 +0100\n\nSigned-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>\nSigned-off-by: Stepan Kasal <kasal@ucw.cz>\n---\n\nHi kusma,\n\nOn Tue, May 13, 2014 at 08:34:36AM +0200, Erik Faye-Lund wrote:\n> Would it be better to set these if not already set, i.e:\n> \n> -CC = gcc\n> -RM = rm -f\n> -CFLAGS = -O2 -Wall\n> +CC ?= gcc\n> +RM ?= rm -f\n> +CFLAGS ?= -O2 -Wall\n> \n> instead?\n\n... and moving it after the two includes, so that it does not\noverride the values set there?\n\nCan you ack this?\n\n contrib/credential/wincred/Makefile | 8 ++++----\n 1 file changed, 4 insertions(+), 4 deletions(-)\n\ndiff --git a/contrib/credential/wincred/Makefile b/contrib/credential/wincred/Makefile\nindex 39fa5e0..6e992c0 100644\n--- a/contrib/credential/wincred/Makefile\n+++ b/contrib/credential/wincred/Makefile\n@@ -1,12 +1,12 @@\n all: git-credential-wincred.exe\n \n-CC = gcc\n-RM = rm -f\n-CFLAGS = -O2 -Wall\n-\n -include ../../../config.mak.autogen\n -include ../../../config.mak\n \n+CC ?= gcc\n+RM ?= rm -f\n+CFLAGS ?= -O2 -Wall\n+\n prefix ?= /usr/local\n libexecdir ?= $(prefix)/libexec/git-core\n \n-- \n1.9.2.msysgit.0.161.g83227c1\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"msysGit\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"241365","messageId":"CAMP44s2p0t9cBg=rOdY74MKOYzekCoCj8K20F8ARjQ0RQmJygg@mail.gmail.com","threadId":"36550","inReplyTo":"CABPQNSYU5haMzdy2cDn=KF2+j_aFK19Ju+x+LTeex6JqWJMncQ@mail.gmail.com","subject":"Re: [PATCH 2/2] wincred: avoid overwriting configured variables","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2014-05-13T13:18:26Z","receivedAt":"2014-05-13T13:18:26Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"On Tue, May 13, 2014 at 1:34 AM, Erik Faye-Lund <kusmabite@gmail.com> wrote:\n> On Tue, May 13, 2014 at 8:01 AM, Stepan Kasal <kasal@ucw.cz> wrote:\n>> From: Pat Thoyts <patthoyts@users.sourceforge.net>\n>> Date: Wed, 24 Oct 2012 00:15:29 +0100\n>>\n>> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>\n>> Signed-off-by: Stepan Kasal <kasal@ucw.cz>\n>> ---\n>>  contrib/credential/wincred/Makefile | 4 ----\n>>  1 file changed, 4 deletions(-)\n>>\n>> diff --git a/contrib/credential/wincred/Makefile b/contrib/credential/wincred/Makefile\n>> index 39fa5e0..e64cd9a 100644\n>> --- a/contrib/credential/wincred/Makefile\n>> +++ b/contrib/credential/wincred/Makefile\n>> @@ -1,9 +1,5 @@\n>>  all: git-credential-wincred.exe\n>>\n>> -CC = gcc\n>> -RM = rm -f\n>> -CFLAGS = -O2 -Wall\n>> -\n>\n> Would it be better to set these if not already set, i.e:\n>\n> -CC = gcc\n> -RM = rm -f\n> -CFLAGS = -O2 -Wall\n> +CC ?= gcc\n> +RM ?= rm -f\n> +CFLAGS ?= -O2 -Wall\n>\n> instead?\n\nSet by whom? If it's by the environment you should be running 'make -e'.\n\n-- \nFelipe Contreras\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"msysGit\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"241369","messageId":"20140513135356.GA30110@camelia.ucw.cz","threadId":"36550","inReplyTo":"CAMP44s2p0t9cBg=rOdY74MKOYzekCoCj8K20F8ARjQ0RQmJygg@mail.gmail.com","subject":"Re: [PATCH 2/2] wincred: avoid overwriting configured variables","fromName":"Stepan Kasal","fromEmail":"kasal@ucw.cz","sentAt":"2014-05-13T13:53:56Z","receivedAt":"2014-05-13T13:53:56Z","isPatch":true,"sender":{"key":"kasal@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/1481596?v=4"},"body":"Hello,\n\nOn Tue, May 13, 2014 at 08:18:26AM -0500, Felipe Contreras wrote:\n> Set by whom? If it's by the environment you should be running 'make -e'.\n\n... or on command line (through recursive make, prehaps).\nBut these both take precedence over makefile assignments.\n\nAnother issue is the interaction with included makefile fragments.\nActually, both\n\tCC = gcc\n\t-include ../../../config.mak\nand\n\t-include ../../../config.mak\n\tCC ?= gcc\nare very close.  (They would differ if config.mak contained \"?=\".)\n\nI was confused by the former, but perhaps it's only me.\n\nStepan\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"msysGit\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"241484","messageId":"CABPQNSYcWrK08Gx=eXWWYLmezx-hLQgrgGyGnuZ4nxVqh=UAnQ@mail.gmail.com","threadId":"36550","inReplyTo":"20140514084509.GA3134@camelia.ucw.cz","subject":"Re: [PATCH 2/2] wincred: avoid overwriting configured variables","fromName":"Erik Faye-Lund","fromEmail":"kusmabite@gmail.com","sentAt":"2014-05-14T08:49:27Z","receivedAt":"2014-05-14T08:49:27Z","isPatch":true,"sender":{"key":"kusmabite@gmail.com","avatar":"https://avatars.githubusercontent.com/u/47073?v=4"},"body":"On Wed, May 14, 2014 at 10:45 AM, Stepan Kasal <kasal@ucw.cz> wrote:\n> Hello kusma,\n>\n> On Tue, May 13, 2014 at 08:56:54AM +0200, Erik Faye-Lund wrote:\n>> > --- a/contrib/credential/wincred/Makefile\n>> > +++ b/contrib/credential/wincred/Makefile\n>> > @@ -1,12 +1,12 @@\n>> >  all: git-credential-wincred.exe\n>> >\n>> > -CC = gcc\n>> > -RM = rm -f\n>> > -CFLAGS = -O2 -Wall\n>> > -\n>> >  -include ../../../config.mak.autogen\n>> >  -include ../../../config.mak\n>> >\n>> > +CC ?= gcc\n>> > +RM ?= rm -f\n>> > +CFLAGS ?= -O2 -Wall\n>> > +\n>> >  prefix ?= /usr/local\n>> >  libexecdir ?= $(prefix)/libexec/git-core\n>> >\n>>\n>> Yeah, looks good to me.\n>\n> thanks, but it looks you replied only to my personal mail.  Was it\n> intentional?\n\nNo, sorry about that.\n\nConsider the patches\n\nAcked-by: Erik Faye-Lund <kusmabite@gmail.com>\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"msysGit\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"}]}