]> granicus.if.org Git - python/commitdiff
PCbuild/build.bat: Add note about using msbuild response file. (#1551)
authorCharles <peacech@gmail.com>
Fri, 12 May 2017 23:23:15 +0000 (06:23 +0700)
committerSteve Dower <steve.dower@microsoft.com>
Fri, 12 May 2017 23:23:15 +0000 (16:23 -0700)
Using a response file will eliminate the headache associated with batch argument/quote processing.

For example I unsucessfully compiled python with visualcpptools when specifying VSInstallDir in the batch file (cannot find vcruntime.h)

```batch
build.bat -p x64 -e -M --no-tkinter  "/p:VCInstallDir=%VCInstallDir%"
```

but it build successfully when specifying it in a response file

msbuild.rsp:
```
/p:VCInstallDir=%VCInstallDir%
```

PCbuild/build.bat

index fce1e4648fe9208a9fdccd6fdced2f307b13f7c1..aac3f7f6766db71824ef718ee976910f8347a7d7 100644 (file)
@@ -10,7 +10,12 @@ echo.given.
 echo.\r
 echo.After the flags recognized by this script, up to 9 arguments to be passed\r
 echo.directly to MSBuild may be passed.  If the argument contains an '=', the\r
-echo.entire argument must be quoted (e.g. `%~nx0 "/p:PlatformToolset=v100"`)\r
+echo.entire argument must be quoted (e.g. `%~nx0 "/p:PlatformToolset=v100"`).\r
+echo.Alternatively you can put extra flags for MSBuild in a file named \r
+echo.`msbuild.rsp` in the `PCbuild` directory, one flag per line. This file\r
+echo.will be picked automatically by MSBuild. Flags put in this file does not\r
+echo.need to be quoted. You can still use environment variables inside the \r
+echo.response file.\r
 echo.\r
 echo.Available flags:\r
 echo.  -h  Display this help message\r