Procházet zdrojové kódy

use gmake wherever it is available for the posix-local build

This is useful when the default make is not GNU make e.g on FreeBSD
Ashish Kulkarni před 11 roky
rodič
revize
5075a2cfe4
1 změnil soubory, kde provedl 4 přidání a 3 odebrání
  1. 4 3
      scripts/build.py

+ 4 - 3
scripts/build.py

@@ -720,6 +720,7 @@ def build_posix_local(config, basedir):
     app    = os.path.join(basedir, config, 'app')
     qtdir  = os.path.join(basedir, config, 'qt')
     dist   = os.path.join(basedir, config, 'wkhtmltox-%s' % version)
+    make   = get_output('which gmake') and 'gmake' or 'make'
 
     mkdir_p(qt)
     mkdir_p(app)
@@ -734,14 +735,14 @@ def build_posix_local(config, basedir):
         shell('../../../qt/configure %s' % qt_config('posix', '--prefix=%s' % qtdir))
         shell('touch is_configured')
 
-    if subprocess.call(['make', '-j%d' % CPU_COUNT]):
-        shell('make -j%d' % CPU_COUNT)
+    if subprocess.call([make, '-j%d' % CPU_COUNT]):
+        shell('%s -j%d' % (make, CPU_COUNT))
 
     os.chdir(app)
     shell('rm -f bin/*')
     os.environ['WKHTMLTOX_VERSION'] = version
     shell('../qt/bin/qmake ../../../wkhtmltopdf.pro')
-    shell('make -j%d' % CPU_COUNT)
+    shell('%s -j%d' % (make, CPU_COUNT))
     shell('cp bin/wkhtmlto* ../wkhtmltox-%s/bin' % version)
     shell('cp -P bin/libwkhtmltox*.so.* ../wkhtmltox-%s/lib' % version)
     shell('cp ../../../include/wkhtmltox/*.h ../wkhtmltox-%s/include/wkhtmltox' % version)