From 464a4779c5a28407026104fc9b13e139e8b9843c Mon Sep 17 00:00:00 2001 From: Bruce Dawson Date: Wed, 6 Sep 2017 21:46:14 +0000 Subject: [PATCH] Revert "Fix autoninja.bat to not swallow ^^ sequences" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit ee3946be4e5237f443a5cc2aa2ec2fa75495539b. Reason for revert: This broke autoninja. The arguments all come in as one and aren't recognized. I think I can fix but I'm reverting for now. Original change's description: > Fix autoninja.bat to not swallow ^^ sequences > > Ninja uses the '^' character to indicate that ninja should build the > targets that are generated from the specified file, rather than > building the specified file. On Windows '^^' is needed because '^' is > the line continuation character. However autoninja.bat complicates > things because the multiple levels of batch files successfully swallow > pairs of '^' characters. > > By adding quotes around %* in autoninja.bat it becomes possible to > invoke autoninja.bat normally. That is, this works: > > autoninja -C out\debug_component ..\..\base\win\enum_variant.cc^^ > > It can be convenient to have a ninja.bat file which starts goma and lets > users keep typing the same build commands. However even with this fix > the previously recommended ninja.bat file requires four '^' characters. > If that is too much then the new recommended ninja.bat is to copy > autoninja.bat and modify as needed, perhaps like this: > > @echo off > call python c:\goma\goma-win64\goma_ctl.py ensure_start >nul > FOR /f "usebackq tokens=*" %%a in (`python c:\src\depot_tools\autoninja.py "%*"`) do echo %%a & %%a > > BUG=758725 > > Change-Id: I648cf42675af2f946be7aa4033956b015d953829 > Reviewed-on: https://chromium-review.googlesource.com/651826 > Reviewed-by: Sébastien Marchand > Reviewed-by: Dirk Pranke > Commit-Queue: Bruce Dawson TBR=dpranke@chromium.org,brucedawson@chromium.org,sebmarchand@chromium.org Change-Id: I131b9ba00882acb5a2d009a2a444f186740d7394 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: 758725 Reviewed-on: https://chromium-review.googlesource.com/654117 Commit-Queue: Dirk Pranke Reviewed-by: Dirk Pranke --- autoninja.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoninja.bat b/autoninja.bat index d3a47452d..402253231 100755 --- a/autoninja.bat +++ b/autoninja.bat @@ -5,5 +5,5 @@ REM Execute whatever is printed by autoninja.py. REM Also print it to reassure that the right settings are being used. -FOR /f "usebackq tokens=*" %%a in (`python %~dp0autoninja.py "%*"`) do echo %%a & %%a +FOR /f "usebackq tokens=*" %%a in (`python %~dp0autoninja.py %*`) do echo %%a & %%a