chiark / gitweb /
bin/mdw-build: Allow overriding the `make' program.
authorMark Wooding <mdw@distorted.org.uk>
Sat, 9 May 2020 23:50:23 +0000 (00:50 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Sat, 9 May 2020 23:50:23 +0000 (00:50 +0100)
Not generally useful, but handy for debugging.

bin/mdw-build

index 6a5a28ac1f241e5da890385296bf220b27ff0747..45ca7f8b9c9825b1d0822c76cd69ca9032063d8e 100755 (executable)
@@ -83,6 +83,7 @@ default_depends () {
 : ${clean=yes}
 : ${vpath=yes}
 : ${native=yes}
+: ${make=make}
 default_depends sbuild sbuildsrv
 default_depends sign signkey
 default_depends upload uploadpath
@@ -112,6 +113,7 @@ Build options:
   [no]sbuild[=SERVER]
   [no]sign[=KEYID]
   [no]native
+  make=MAKE
 EOF
 }
 
@@ -151,6 +153,7 @@ for opt; do
     sbuild=*)  sbuild=yes sbuildsrv=${opt#*=} ;;
     dput)      maybe_set dput dputtarget ;;
     dput=*)    dput=yes dputtarget=${opt#*=} ;;
+    make=*)    make=${opt#*=} ;;
 
     distcheck | debian | clean | vpath | native)
       eval "$opt=yes"
@@ -366,15 +369,15 @@ print-distdir:
        @echo >&3 $(distdir)
 EOF
 assign distdir \
-       $({ make -f find-distdir.mk print-distdir >/dev/null 2>&1; } 3>&1)
+       $({ $make -f find-distdir.mk print-distdir >/dev/null 2>&1; } 3>&1)
 
 ## Get a tarball distribution.
 case "$distcheck" in
   yes)
-    run make $makeopts distcheck
+    run $make $makeopts distcheck
     ;;
   no)
-    run make $makeopts dist
+    run $make $makeopts dist
     ;;
 esac