Skip to content
Snippets Groups Projects
Commit fba6530a authored by Jan Tattermusch's avatar Jan Tattermusch
Browse files

refactor make_jobspec

parent 9be594f7
No related branches found
No related tags found
No related merge requests found
...@@ -774,8 +774,8 @@ if args.use_docker: ...@@ -774,8 +774,8 @@ if args.use_docker:
env=env) env=env)
sys.exit(0) sys.exit(0)
if platform_string() == 'windows': def make_jobspec(cfg, targets, makefile='Makefile'):
def make_jobspec(cfg, targets, makefile='Makefile'): if platform_string() == 'windows':
extra_args = [] extra_args = []
# better do parallel compilation # better do parallel compilation
# empirically /m:2 gives the best performance/price and should prevent # empirically /m:2 gives the best performance/price and should prevent
...@@ -793,8 +793,7 @@ if platform_string() == 'windows': ...@@ -793,8 +793,7 @@ if platform_string() == 'windows':
language_make_options, language_make_options,
shell=True, timeout_seconds=None) shell=True, timeout_seconds=None)
for target in targets] for target in targets]
else: else:
def make_jobspec(cfg, targets, makefile='Makefile'):
if targets: if targets:
return [jobset.JobSpec([os.getenv('MAKE', 'make'), return [jobset.JobSpec([os.getenv('MAKE', 'make'),
'-f', makefile, '-f', makefile,
...@@ -807,6 +806,7 @@ else: ...@@ -807,6 +806,7 @@ else:
timeout_seconds=None)] timeout_seconds=None)]
else: else:
return [] return []
make_targets = {} make_targets = {}
for l in languages: for l in languages:
makefile = l.makefile_name() makefile = l.makefile_name()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment