Package: dpkg
Version: 1.13.13
Severity: wishlist
Tags: patch

dpkg-buildpackage should be able to overwrite the hardcoded
make path (#!/usr/bin/make -f) in debian/rules file.

A simple patch to allow this behavior is attached. It adds the -M
option which should be used like say:

  dpkg-buildpackage -M'/usr/local/bin/make -f'

Rgds,
-doc


--- ./bin/dpkg-buildpackage Tue Feb 21 19:09:23 CET 2006
+++ patch/bin/dpkg-buildpackage     Mon Mar 06 02:39:45 CET 2006
@@ -16,9 +16,10 @@
 Usage: dpkg-buildpackage [options]
 Options: -r<gain-root-command>
          -p<sign-command>
-        -d            do not check build dependencies and conflicts
-        -D            check build dependencies and conflicts
-        -k<keyid>     the key to use for signing
+         -M<make-command>
+         -d            do not check build dependencies and conflicts
+         -D            check build dependencies and conflicts
+         -k<keyid>     the key to use for signing
          -sgpg         the sign-command is called like GPG
          -spgp         the sign-command is called like PGP 
          -us           unsigned source
@@ -47,6 +48,7 @@
 }
 
 rootcommand=''
+makecommand=''
 signcommand=""
 if ( [ -e $GNUPGHOME/secring.gpg ] || [ -e $HOME/.gnupg/secring.gpg ] ) && \
                command -v gpg > /dev/null 2>&1; then
@@ -78,6 +80,7 @@
        -h)     usageversion; exit 0 ;;
        -r*)    rootcommand="$value" ;;
        -p*)    signcommand="$value" ;;
+       -M*)    makecommand="$value" ;;
        -k*)    signkey="$value" ;;
        -d)     checkbuilddep=false ;;
        -D)     checkbuilddep=true ;;
@@ -190,14 +193,14 @@
 if [ -n "$desc"                ]; then set -- "$@" "-C$desc"           ; fi
 
 if [ x$noclean != xtrue ]; then
-       withecho $rootcommand debian/rules clean
+       withecho $rootcommand $makecommand debian/rules clean
 fi
 if [ x$binaryonly = x ]; then
        cd ..; withecho dpkg-source $passopts $diffignore $tarignore -b 
"$dirn"; cd "$dirn"
 fi
 if [ x$sourceonly = x ]; then
-       withecho debian/rules build 
-       withecho $rootcommand debian/rules $binarytarget
+       withecho $makecommand debian/rules build 
+       withecho $rootcommand $makecommand debian/rules $binarytarget
 fi
 if [ "$usepause" = "true" ] && \
    ( [ "$signchanges" != ":" ] || ( [ -z "$binaryonly" ] && [ "$signsource" != 
":" ] ) ) ; then
@@ -245,7 +248,7 @@
 $signchanges "$pva.changes"
 
 if $cleansource; then
-       withecho $rootcommand debian/rules clean
+       withecho $rootcommand $makecommand debian/rules clean
 fi
 
 echo "dpkg-buildpackage: $srcmsg"


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to