# [PATCH] Makefile: POSIX windres

5 messages from 2017-01-07 to 2017-01-09. Participants: Steven Penny, Junio C Hamano, Johannes Schindelin, Johannes Sixt.
Thread: https://gitlist.dev/t/44834

## Steven Penny, 2017-01-07 21:41

Subject: [PATCH] Makefile: POSIX windres
Message-ID: <20170107214110.3124-1-svnpenn@gmail.com>
URL: https://gitlist.dev/e/20170107214110.3124-1-svnpenn%40gmail.com

```
When environment variable POSIXLY_CORRECT is set, the "input -o output" syntax
is not supported.

http://cygwin.com/ml/cygwin/2017-01/msg00036.html

Signed-off-by: Steven Penny <svnpenn@gmail.com>
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index d861bd9..a2a1212 100644
--- a/Makefile
+++ b/Makefile
@@ -1816,7 +1816,7 @@ $(SCRIPT_LIB) : % : %.sh GIT-SCRIPT-DEFINES
 git.res: git.rc GIT-VERSION-FILE
 	$(QUIET_RC)$(RC) \
 	  $(join -DMAJOR= -DMINOR=, $(wordlist 1,2,$(subst -, ,$(subst ., ,$(GIT_VERSION))))) \
-	  -DGIT_VERSION="\\\"$(GIT_VERSION)\\\"" $< -o $@
+	  -DGIT_VERSION="\\\"$(GIT_VERSION)\\\"" -i $< -o $@
 
 # This makes sure we depend on the NO_PERL setting itself.
 $(SCRIPT_PERL_GEN): GIT-BUILD-OPTIONS
-- 
2.8.3


```

## Junio C Hamano, 2017-01-09 03:10

Subject: Re: [PATCH] Makefile: POSIX windres
Message-ID: <xmqqtw99x70u.fsf@gitster.mtv.corp.google.com>
URL: https://gitlist.dev/e/xmqqtw99x70u.fsf%40gitster.mtv.corp.google.com
In-Reply-To: <20170107214110.3124-1-svnpenn@gmail.com>

```
Steven Penny <svnpenn@gmail.com> writes:

> When environment variable POSIXLY_CORRECT is set, the "input -o output" syntax
> is not supported.
>
> http://cygwin.com/ml/cygwin/2017-01/msg00036.html
>
> Signed-off-by: Steven Penny <svnpenn@gmail.com>
> ---

Who other than cygwin build uses this target?  Git for Windows?

Hannes, Dscho, is this change OK with you guys?
 
>  Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Makefile b/Makefile
> index d861bd9..a2a1212 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -1816,7 +1816,7 @@ $(SCRIPT_LIB) : % : %.sh GIT-SCRIPT-DEFINES
>  git.res: git.rc GIT-VERSION-FILE
>  	$(QUIET_RC)$(RC) \
>  	  $(join -DMAJOR= -DMINOR=, $(wordlist 1,2,$(subst -, ,$(subst ., ,$(GIT_VERSION))))) \
> -	  -DGIT_VERSION="\\\"$(GIT_VERSION)\\\"" $< -o $@
> +	  -DGIT_VERSION="\\\"$(GIT_VERSION)\\\"" -i $< -o $@
>  
>  # This makes sure we depend on the NO_PERL setting itself.
>  $(SCRIPT_PERL_GEN): GIT-BUILD-OPTIONS

```

## Johannes Schindelin, 2017-01-09 08:09

Subject: Re: [PATCH] Makefile: POSIX windres
Message-ID: <alpine.DEB.2.20.1701090903500.3469@virtualbox>
URL: https://gitlist.dev/e/alpine.DEB.2.20.1701090903500.3469%40virtualbox
In-Reply-To: <xmqqtw99x70u.fsf@gitster.mtv.corp.google.com>

```
Hi Junio,

On Sun, 8 Jan 2017, Junio C Hamano wrote:

> Steven Penny <svnpenn@gmail.com> writes:
> 
> > When environment variable POSIXLY_CORRECT is set, the "input -o
> > output" syntax is not supported.
> >
> > http://cygwin.com/ml/cygwin/2017-01/msg00036.html
> >
> > Signed-off-by: Steven Penny <svnpenn@gmail.com>
> > ---
> 
> Who other than cygwin build uses this target?  Git for Windows?

Yes, Git for Windows uses this target, as did msysGit (and I suspect
Hannes' setup).

The resources are built correctly in Git for Windows SDK with this patch,
and I just verified that the windres shipped with the last msysGit (AKA
Git for Windows 1.x' SDK) handles the -i flag correctly, too. That is, at
least windres.exe included in binutils-2.19.1-mingw32-bin.tar.gz (which
was current at the time I updated msysGit on Feb 19 2009) can handle it.

So: ACK

Ciao,
Dscho

P.S.: I applied this patch to Git for Windows' `master`:
https://github.com/git-for-windows/git/commit/744120c602

```

## Junio C Hamano, 2017-01-09 09:47

Subject: Re: [PATCH] Makefile: POSIX windres
Message-ID: <xmqq7f64y38i.fsf@gitster.mtv.corp.google.com>
URL: https://gitlist.dev/e/xmqq7f64y38i.fsf%40gitster.mtv.corp.google.com
In-Reply-To: <alpine.DEB.2.20.1701090903500.3469@virtualbox>

```
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:

>> Who other than cygwin build uses this target?  Git for Windows?
>
> Yes, Git for Windows uses this target, as did msysGit (and I suspect
> Hannes' setup).
> ...
> So: ACK

Thanks.

```

## Johannes Sixt, 2017-01-09 19:54

Subject: Re: [PATCH] Makefile: POSIX windres
Message-ID: <69ad0a2b-2005-4845-7400-9951a0811c1c@kdbg.org>
URL: https://gitlist.dev/e/69ad0a2b-2005-4845-7400-9951a0811c1c%40kdbg.org
In-Reply-To: <alpine.DEB.2.20.1701090903500.3469@virtualbox>

```
Am 09.01.2017 um 09:09 schrieb Johannes Schindelin:
> Hi Junio,
>
> On Sun, 8 Jan 2017, Junio C Hamano wrote:
>
>> Steven Penny <svnpenn@gmail.com> writes:
>>
>>> When environment variable POSIXLY_CORRECT is set, the "input -o
>>> output" syntax is not supported.
>>>
>>> http://cygwin.com/ml/cygwin/2017-01/msg00036.html
>>>
>>> Signed-off-by: Steven Penny <svnpenn@gmail.com>
>>> ---
>>
>> Who other than cygwin build uses this target?  Git for Windows?
>
> Yes, Git for Windows uses this target, as did msysGit (and I suspect
> Hannes' setup).

The patch works for me, too.

-- Hannes


```
