[src/check-*] Pickup $(NM), $(OBJDUMP), $(LDD), $(OTOOL)
Fixes https://github.com/harfbuzz/harfbuzz/issues/3019
diff --git a/src/gen-ragel-artifacts.py b/src/gen-ragel-artifacts.py
index b60ec3b..d22e03a 100755
--- a/src/gen-ragel-artifacts.py
+++ b/src/gen-ragel-artifacts.py
@@ -4,7 +4,7 @@
import os, os.path, sys, subprocess, shutil
-ragel = shutil.which ('ragel')
+ragel = os.getenv ('RAGEL', shutil.which ('ragel'))
if not ragel:
sys.exit ('You have to install ragel if you are going to develop HarfBuzz itself')
@@ -19,7 +19,7 @@
shutil.copy (INPUT, outdir)
rl = os.path.basename (INPUT)
hh = rl.replace ('.rl', '.hh')
-subprocess.Popen ([ragel, '-e', '-F1', '-o', hh, rl], cwd=outdir).wait ()
+subprocess.Popen (ragel.split() + ['-e', '-F1', '-o', hh, rl], cwd=outdir).wait ()
# copy it also to src/
shutil.copyfile (os.path.join (outdir, hh), os.path.join (CURRENT_SOURCE_DIR, hh))