add build of cfg.h files to the Windows command line build (requires Python)

This commit is contained in:
gladman 2012-09-28 18:11:47 +00:00
parent 9bfa07c82a
commit a4903916a2
2 changed files with 20 additions and 6 deletions

View File

@ -33,7 +33,7 @@ from copy import deepcopy
from sys import argv, exit
from filecmp import cmp
from shutil import copy
from re import compile, search, ASCII
from re import compile, search
from collections import defaultdict
from uuid import uuid1
@ -190,11 +190,11 @@ def find_src(dir_list):
# scan the files in the input set and find the symbols
# defined in the files
fr_sym = compile(r'LEAF_PROC\s+(\w+)', ASCII)
lf_sym = compile(r'FRAME_PROC\s+(\w+)', ASCII)
wf_sym = compile(r'WIN64_GCC_PROC\s+(\w+)', ASCII)
g3_sym = compile(r'global\s+___g(\w+)', ASCII)
g2_sym = compile(r'global\s+__g(\w+)', ASCII)
fr_sym = compile(r'LEAF_PROC\s+(\w+)')
lf_sym = compile(r'FRAME_PROC\s+(\w+)')
wf_sym = compile(r'WIN64_GCC_PROC\s+(\w+)')
g3_sym = compile(r'global\s+___g(\w+)')
g2_sym = compile(r'global\s+__g(\w+)')
def get_symbols(setf, sym_dir):
for f in setf:

View File

@ -41,6 +41,20 @@ copy ..\build.vc10\out_copy_rename.bat .
copy ..\build.vc10\gen_config_h.bat .
copy ..\build.vc10\cfg.h .
@echo off
for /f "usebackq tokens=1*" %%f in (`reg query HKCR\Python.File\shell\open\command`) do (set _my_=%%f %%g)
goto next%errorlevel%
:next1
echo Cannot build without Python ...exiting
exit /b 1
:next0
set _res_=%_my_:*REG_SZ=%
set _end_=%_res_:*exe"=%
call set _python_=%%_res_:%_end_%=%%
call %_python_% ..\build.vc10\mpir_config.py 1
if %ABI% == 64 (set LOCALABI=x64)
if %ABI% == 32 (set LOCALABI=win32)
set YASMFLAG=