Skip to content

Commit dffe32c

Browse files
committed
finish PATH manipulation before probing "make"
1 parent afeb695 commit dffe32c

1 file changed

Lines changed: 12 additions & 8 deletions

File tree

cue.py

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -762,14 +762,6 @@ def setup_for_build(args):
762762
if re.match('^test-results:', line):
763763
has_test_results = True
764764

765-
# Check make version
766-
if re.match(r'^GNU Make 3', sp.check_output(['make', '-v']).decode('ascii')):
767-
is_make3 = True
768-
logger.debug('Check if make is a 3.x series: %s', is_make3)
769-
770-
# apparently %CD% is handled automagically
771-
os.environ['TOP'] = os.getcwd()
772-
773765
addpaths = []
774766
for path in args.paths:
775767
try:
@@ -781,6 +773,18 @@ def setup_for_build(args):
781773

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

776+
logger.debug('Final PATH')
777+
for loc in os.environ['PATH'].split(os.pathsep):
778+
logger.debug(' %r', loc)
779+
780+
# Check make version
781+
if re.match(r'^GNU Make 3', sp.check_output(['make', '-v']).decode('ascii')):
782+
is_make3 = True
783+
logger.debug('Check if make is a 3.x series: %s', is_make3)
784+
785+
# apparently %CD% is handled automagically
786+
os.environ['TOP'] = os.getcwd()
787+
784788
# Add EXTRA make arguments
785789
for tag in ['EXTRA', 'EXTRA1', 'EXTRA2', 'EXTRA3', 'EXTRA4', 'EXTRA5']:
786790
val = os.environ.get(tag, "")

0 commit comments

Comments
 (0)