Skip to content

Commit

Permalink
bpo-36500: Simplify PCbuild/build.bat and prevent path separator chan…
Browse files Browse the repository at this point in the history
…ging in comments (pythonGH-17644)
  • Loading branch information
zooba authored and shihai1991 committed Jan 31, 2020
1 parent fa86028 commit 88f2288
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 14 deletions.
21 changes: 8 additions & 13 deletions PCbuild/build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -156,21 +156,16 @@ echo on
/p:UseTestMarker=%UseTestMarker% %GITProperty%^
%1 %2 %3 %4 %5 %6 %7 %8 %9

if "%Regen%"=="true" call :Regen
@echo off
exit /b %ERRORLEVEL%

:Regen
echo on
call "%dir%find_msbuild.bat" %MSBUILD%
if not ERRORLEVEL 1 %MSBUILD% "%dir%regen.vcxproj" /t:%target% %parallel% %verbose%^
/p:IncludeExternals=%IncludeExternals%^
/p:Configuration=%conf% /p:Platform=%platf%^
/p:UseTestMarker=%UseTestMarker% %GITProperty%^
%1 %2 %3 %4 %5 %6 %7 %8 %9
@if not ERRORLEVEL 1 @if "%Regen%"=="true" (
%MSBUILD% "%dir%regen.vcxproj" /t:%target% %parallel% %verbose%^
/p:IncludeExternals=%IncludeExternals%^
/p:Configuration=%conf% /p:Platform=%platf%^
/p:UseTestMarker=%UseTestMarker% %GITProperty%^
%1 %2 %3 %4 %5 %6 %7 %8 %9
)

@echo off
goto :eof
exit /b %ERRORLEVEL%

:Version
rem Display the current build version information
Expand Down
3 changes: 2 additions & 1 deletion Parser/asdl_c.py
Original file line number Diff line number Diff line change
Expand Up @@ -1331,7 +1331,8 @@ def generate_module_def(f, mod):
def main(srcfile, dump_module=False):
argv0 = sys.argv[0]
components = argv0.split(os.sep)
argv0 = os.sep.join(components[-2:])
# Always join with '/' so different OS does not keep changing the file
argv0 = '/'.join(components[-2:])
auto_gen_msg = common_msg % argv0
mod = asdl.parse(srcfile)
if dump_module:
Expand Down

0 comments on commit 88f2288

Please sign in to comment.