]> granicus.if.org Git - python/commitdiff
Merge forward extras beyond #21907 backport.
authorZachary Ware <zachary.ware@gmail.com>
Wed, 10 Jun 2015 05:43:20 +0000 (00:43 -0500)
committerZachary Ware <zachary.ware@gmail.com>
Wed, 10 Jun 2015 05:43:20 +0000 (00:43 -0500)
1  2 
PCbuild/build.bat

index fa9f403f2f92bcac926179e02474d338829f95d7,f3bc1e3b8b22f4d184a447797d90304e1b6fc3eb..3f8e231df02638a0a19515e4d6173abc77094bd1
@@@ -6,11 -6,13 +6,13 @@@ rem Arguments
  rem  -c  Set the configuration (default: Release)\r
  rem  -p  Set the platform (x64 or Win32, default: Win32)\r
  rem  -r  Target Rebuild instead of Build\r
 -rem  -t  Set the target manually (Build, Rebuild, or Clean)\r
 +rem  -t  Set the target manually (Build, Rebuild, Clean, or CleanAll)\r
  rem  -d  Set the configuration to Debug\r
  rem  -e  Pull in external libraries using get_externals.bat\r
 -rem  -m  Enable parallel build\r
 -rem  -M  Disable parallel build (disabled by default)\r
++rem  -m  Enable parallel build (enabled by default)\r
 +rem  -M  Disable parallel build\r
  rem  -v  Increased output messages\r
 -rem  -k  Attempt to kill any running Pythons before building\r
++rem  -k  Attempt to kill any running Pythons before building (usually unnecessary)\r
  \r
  setlocal\r
  set platf=Win32\r
@@@ -18,8 -20,10 +20,9 @@@ set vs_platf=x8
  set conf=Release\r
  set target=Build\r
  set dir=%~dp0\r
 -set parallel=\r
 +set parallel=/m\r
  set verbose=/nologo /v:m\r
 -set build_tkinter=\r
+ set kill=\r
  \r
  :CheckOpts\r
  if '%1'=='-c' (set conf=%2) & shift & shift & goto CheckOpts\r
@@@ -27,15 -31,75 +30,21 @@@ if '%1'=='-p' (set platf=%2) & shift & 
  if '%1'=='-r' (set target=Rebuild) & shift & goto CheckOpts\r
  if '%1'=='-t' (set target=%2) & shift & shift & goto CheckOpts\r
  if '%1'=='-d' (set conf=Debug) & shift & goto CheckOpts\r
 -if '%1'=='-e' call "%dir%get_externals.bat" & (set build_tkinter=true) & shift & goto CheckOpts\r
 +if '%1'=='-e' call "%dir%get_externals.bat" & shift & goto CheckOpts\r
+ if '%1'=='-m' (set parallel=/m) & shift & goto CheckOpts\r
  if '%1'=='-M' (set parallel=) & shift & goto CheckOpts\r
  if '%1'=='-v' (set verbose=/v:n) & shift & goto CheckOpts\r
+ if '%1'=='-k' (set kill=true) & shift & goto CheckOpts\r
  \r
 -if '%conf%'=='Debug' (set dbg_ext=_d) else (set dbg_ext=)\r
 -if '%platf%'=='x64' (\r
 -    set vs_platf=x86_amd64\r
 -    set builddir=%dir%amd64\\r
 -) else (\r
 -    set builddir=%dir%\r
 -)\r
 +if '%platf%'=='x64' (set vs_platf=x86_amd64)\r
  \r
  rem Setup the environment\r
 -call "%dir%env.bat" %vs_platf%\r
 +call "%dir%env.bat" %vs_platf% >nul\r
  \r
 -    msbuild "%dir%kill_python.vcxproj" %verbose% /p:Configuration=%conf% /p:Platform=%platf% && "%builddir%kill_python%dbg_ext%.exe"\r
 -)\r
 -\r
 -set externals_dir=%dir%..\externals\r
 -if '%build_tkinter%'=='true' (\r
 -    if '%platf%'=='x64' (\r
 -        set tcltkdir=%externals_dir%\tcltk64\r
 -        set machine=AMD64\r
 -    ) else (\r
 -        set tcltkdir=%externals_dir%\tcltk\r
 -        set machine=IX86\r
 -    )\r
 -    if '%conf%'=='Debug' (\r
 -        set tcl_dbg_ext=g\r
 -        set debug_flag=1\r
 -        set options=symbols\r
 -    ) else (\r
 -        set tcl_dbg_ext=\r
 -        set debug_flag=0\r
 -        set options=\r
 -    )\r
 -    set tcldir=%externals_dir%\tcl-8.6.1.0\r
 -    set tkdir=%externals_dir%\tk-8.6.1.0\r
 -    set tixdir=%externals_dir%\tix-8.4.3.4\r
 -)\r
 -if '%build_tkinter%'=='true' (\r
 -    if not exist "%tcltkdir%\bin\tcl86t%tcl_dbg_ext%.dll" (\r
 -        @rem all and install need to be separate invocations, otherwise nmakehlp is not found on install\r
 -        pushd "%tcldir%\win"\r
 -        nmake -f makefile.vc MACHINE=%machine% OPTS=%options% INSTALLDIR="%tcltkdir%" clean all\r
 -        nmake -f makefile.vc MACHINE=%machine% OPTS=%options% INSTALLDIR="%tcltkdir%" install-binaries install-libraries\r
 -        popd\r
 -    )\r
 -\r
 -    if not exist "%tcltkdir%\bin\tk86t%tcl_dbg_ext%.dll" (\r
 -        pushd "%tkdir%\win"\r
 -        nmake -f makefile.vc MACHINE=%machine% OPTS=%options% INSTALLDIR="%tcltkdir%" TCLDIR="%tcldir%" clean\r
 -        nmake -f makefile.vc MACHINE=%machine% OPTS=%options% INSTALLDIR="%tcltkdir%" TCLDIR="%tcldir%" all\r
 -        nmake -f makefile.vc MACHINE=%machine% OPTS=%options% INSTALLDIR="%tcltkdir%" TCLDIR="%tcldir%" install-binaries install-libraries\r
 -        popd\r
 -    )\r
 -\r
 -    if not exist "%tcltkdir%\lib\tix8.4.3\tix84%tcl_dbg_ext%.dll" (\r
 -        pushd "%tixdir%\win"\r
 -        nmake -f python.mak DEBUG=%debug_flag% MACHINE=%machine% TCL_DIR="%tcldir%" TK_DIR="%tkdir%" INSTALL_DIR="%tcltkdir%" clean\r
 -        nmake -f python.mak DEBUG=%debug_flag% MACHINE=%machine% TCL_DIR="%tcldir%" TK_DIR="%tkdir%" INSTALL_DIR="%tcltkdir%" all\r
 -        nmake -f python.mak DEBUG=%debug_flag% MACHINE=%machine% TCL_DIR="%tcldir%" TK_DIR="%tkdir%" INSTALL_DIR="%tcltkdir%" install\r
 -        popd\r
 -    )\r
+ if '%kill%'=='true' (\r
++    msbuild /v:m /nologo /target:KillPython "%pcbuild%\pythoncore.vcxproj" /p:Configuration=%conf% /p:Platform=%platf% /p:KillPython=true\r
+ )\r
\r
  rem Call on MSBuild to do the work, echo the command.\r
  rem Passing %1-9 is not the preferred option, but argument parsing in\r
  rem batch is, shall we say, "lackluster"\r