Skip to content

Commit

Permalink
finish PATH manipulation before probing "make"
Browse files Browse the repository at this point in the history
  • Loading branch information
mdavidsaver committed Oct 24, 2023
1 parent afeb695 commit dffe32c
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions cue.py
Original file line number Diff line number Diff line change
Expand Up @@ -762,14 +762,6 @@ def setup_for_build(args):
if re.match('^test-results:', line):
has_test_results = True

# Check make version
if re.match(r'^GNU Make 3', sp.check_output(['make', '-v']).decode('ascii')):
is_make3 = True
logger.debug('Check if make is a 3.x series: %s', is_make3)

# apparently %CD% is handled automagically
os.environ['TOP'] = os.getcwd()

addpaths = []
for path in args.paths:
try:
Expand All @@ -781,6 +773,18 @@ def setup_for_build(args):

os.environ['PATH'] = os.pathsep.join([os.environ['PATH']] + addpaths)

logger.debug('Final PATH')
for loc in os.environ['PATH'].split(os.pathsep):
logger.debug(' %r', loc)

# Check make version
if re.match(r'^GNU Make 3', sp.check_output(['make', '-v']).decode('ascii')):
is_make3 = True
logger.debug('Check if make is a 3.x series: %s', is_make3)

# apparently %CD% is handled automagically
os.environ['TOP'] = os.getcwd()

# Add EXTRA make arguments
for tag in ['EXTRA', 'EXTRA1', 'EXTRA2', 'EXTRA3', 'EXTRA4', 'EXTRA5']:
val = os.environ.get(tag, "")
Expand Down

0 comments on commit dffe32c

Please sign in to comment.