[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: .ONESEHLL not working as expected in 3.82
From: |
Eli Zaretskii |
Subject: |
Re: .ONESEHLL not working as expected in 3.82 |
Date: |
Sat, 27 Apr 2013 19:17:42 +0300 |
> Date: Mon, 30 Aug 2010 17:09:51 +0100
> From: "Anjum Naseer" <address@hidden>
>
> I have built the 3.82 version of GNU Make using the Microsoft Visual C++
> compiler and it seems to work fine.
> However, I cannot get it to work correctly with the .ONESHELL option.
> I created a dummy makefile (dummy.mak) with this content:
> vvvvvvvvvvvvvvvvvvvvvvvvvvvv
> .ONESHELL:
>
> .PHONY: dummy
>
> dummy:
> set xyz=abc
> @echo xyz=%xyz%
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> If I invoke this with "make -d -r -f dummy.mak" I get:
> Vvvvvvvvvvvvvvvvvvvvvvvvvvvv
> GNU Make 3.82
> Built for Windows32
> Copyright (C) 2010 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later
> <http://gnu.org/licenses/gpl.html>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.
> Reading makefiles...
> Reading makefile `dummy.mak'...
> Updating makefiles....
> Considering target file `dummy.mak'.
> Looking for an implicit rule for `dummy.mak'.
> No implicit rule found for `dummy.mak'.
> Finished prerequisites of target file `dummy.mak'.
> No need to remake target `dummy.mak'.
> Updating goal targets....
> Considering target file `dummy'.
> File `dummy' does not exist.
> Finished prerequisites of target file `dummy'.
> Must remake target `dummy'.
> Invoking recipe from dummy.mak:6 to update target `dummy'.
> Creating temporary batch file
> C:\Users\ADB14~1.NAS\AppData\Local\Temp\make5868-1.bat
> Batch file contents:
> @echo off
> set xyz=abc
> set xyz=abc
> CreateProcess(C:\Users\ADB14~1.NAS\AppData\Local\Temp\make5868-1.bat,C:\
> Users\ADB14~1.NAS\AppData\Local\Temp\make5868-1.bat,...)
> Putting child 0094AFB8 (dummy) PID 9620224 on the chain.
> Live child 0094AFB8 (dummy) PID 9620224
> Main thread handle = 00000054
> Reaping winning child 0094AFB8 PID 9620224
> Cleaning up temp batch file
> C:\Users\ADB14~1.NAS\AppData\Local\Temp\make5868-1.bat
> Creating temporary batch file
> C:\Users\ADB14~1.NAS\AppData\Local\Temp\make5868-1.bat
> Batch file contents:
> @echo off
> echo xyz=%xyz%
> CreateProcess(C:\Users\ADB14~1.NAS\AppData\Local\Temp\make5868-1.bat,C:\
> Users\ADB14~1.NAS\AppData\Local\Temp\make5868-1.bat,...)
> Live child 0094AFB8 (dummy) PID 9620224
> xyz=
> Reaping winning child 0094AFB8 PID 9620224
> Cleaning up temp batch file
> C:\Users\ADB14~1.NAS\AppData\Local\Temp\make5868-1.bat
> Removing child 0094AFB8 PID 9620224 from chain.
> Successfully remade target file `dummy'.
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> As you can see from the debug trace above, it looks like it is still
> loading a separate SHELL for each line of the recipe. Have I
> misunderstood the .ONESHELL feature or is this a bug?
(Yes, this was almost 3 years ago. Sorry for a long delay.)
The .ONESHELL feature is now supported on MS-Windows, for the default
Windows shell (cmd.exe) or compatible replacements, in the development
version (commit e56aad4).
I realize that one of the important use cases for .ONESHELL is to use
a shell that Make knows nothing about, but as such shells are not yet
supported by the Windows build, I didn't feel it was right to postpone
.ONESHELL any longer. Volunteers are welcome to contribute support
for foreign shells.
- Re: .ONESEHLL not working as expected in 3.82,
Eli Zaretskii <=