Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b25824b

Browse files
committed
Use same Make as FreeType's configure to build it.
Namely, it's necessary to use `gmake` on BSD, since their `make` does not work.
1 parent fecfa1a commit b25824b

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

setupext.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -597,7 +597,21 @@ def do_custom_build(self, env):
597597
"--with-png=no", "--with-harfbuzz=no", "--enable-static",
598598
"--disable-shared"],
599599
env=env, cwd=src_path)
600-
subprocess.check_call(["make"], env=env, cwd=src_path)
600+
if 'GNUMAKE' in env:
601+
make = env['GNUMAKE']
602+
elif 'MAKE' in env:
603+
make = env['MAKE']
604+
else:
605+
try:
606+
output = subprocess.check_output(['make', '-v'],
607+
stderr=subprocess.DEVNULL)
608+
except subprocess.CalledProcessError:
609+
output = ''
610+
if b'GNU' not in output and b'makepp' not in output:
611+
make = 'gmake'
612+
else:
613+
make = 'make'
614+
subprocess.check_call([make], env=env, cwd=src_path)
601615
else: # compilation on windows
602616
shutil.rmtree(src_path / "objs", ignore_errors=True)
603617
msbuild_platform = (

0 commit comments

Comments
 (0)