appveyor: consider base build (BASE=SELF)

This commit is contained in:
Ralph Lange
2020-04-23 12:44:37 +02:00
parent 177dfd4615
commit 88831439b1

View File

@@ -45,7 +45,16 @@ ciscriptsdir = os.path.abspath(os.path.dirname(sys.argv[0]))
if os.path.basename(ciscriptsdir) == 'appveyor': if os.path.basename(ciscriptsdir) == 'appveyor':
ciscriptsdir = ciscriptsdir.rstrip(os.pathsep+'appveyor') ciscriptsdir = ciscriptsdir.rstrip(os.pathsep+'appveyor')
if 'BASE' not in os.environ or os.environ['BASE'] == 'SELF':
building_base = True
places['EPICS_BASE'] = '.'
else:
building_base = False
def modlist(): def modlist():
if building_base:
ret = []
else:
for var in ['ADD_MODULES', 'MODULES']: for var in ['ADD_MODULES', 'MODULES']:
setup.setdefault(var, '') setup.setdefault(var, '')
if var in os.environ: if var in os.environ:
@@ -377,6 +386,8 @@ def setup_for_build(args):
make = os.path.join(toolsdir, 'make.exe') make = os.path.join(toolsdir, 'make.exe')
base_place = '.'
if not building_base:
with open(os.path.join(cachedir, 'RELEASE.local'), 'r') as f: with open(os.path.join(cachedir, 'RELEASE.local'), 'r') as f:
lines = f.readlines() lines = f.readlines()
for line in lines: for line in lines:
@@ -386,7 +397,10 @@ def setup_for_build(args):
dllpaths.append(bindir) dllpaths.append(bindir)
if mod == 'EPICS_BASE': if mod == 'EPICS_BASE':
base_place = place base_place = place
with open(os.path.join(base_place, 'configure', 'CONFIG_BASE_VERSION')) as myfile:
cfg_base_version = os.path.join(base_place, 'configure', 'CONFIG_BASE_VERSION')
if os.path.exists(cfg_base_version):
with open(cfg_base_version) as myfile:
if 'BASE_3_14=YES' in myfile.read(): if 'BASE_3_14=YES' in myfile.read():
isbase314 = True isbase314 = True
@@ -433,9 +447,12 @@ def prepare(args):
[add_dependency(mod) for mod in modlist()] [add_dependency(mod) for mod in modlist()]
if not building_base:
if os.path.isdir('configure'): if os.path.isdir('configure'):
release_local = os.path.join(cachedir, 'RELEASE.local') targetdir = 'configure'
shutil.copy(release_local, 'configure') else:
targetdir = '.'
shutil.copy(os.path.join(cachedir, 'RELEASE.local'), targetdir)
print('{0}Configuring EPICS build system{1}'.format(ANSI_YELLOW, ANSI_RESET)) print('{0}Configuring EPICS build system{1}'.format(ANSI_YELLOW, ANSI_RESET))
@@ -487,6 +504,7 @@ def prepare(args):
sys.stdout.flush() sys.stdout.flush()
sp.check_call(['cl']) sp.check_call(['cl'])
if not building_base:
for mod in modlist(): for mod in modlist():
place = places[setup[mod+"_VARNAME"]] place = places[setup[mod+"_VARNAME"]]
print('{0}Building dependency {1} in {2}{3}'.format(ANSI_YELLOW, mod, place, ANSI_RESET)) print('{0}Building dependency {1} in {2}{3}'.format(ANSI_YELLOW, mod, place, ANSI_RESET))