On Sat, Sep 15, 2007 at 01:20:33PM +0200, Frank Lichtenheld wrote:
> On Mon, Sep 03, 2007 at 12:28:05PM +0200, Robert Millan wrote:
> > Attached patch adds support for parallel builds (dpkg-buildpackage -j N).
> > 
> > It is based on the one from bug #355654.
> 
> I like the general idea. But why do you use $makecommand? Wouldn't
> "debian/rules $makeoptions build" work just as well?

Yes, that seems to work fine.

Attaching new patch doing it this way.

-- 
Robert Millan

<GPLv2> I know my rights; I want my phone call!
<DRM> What use is a phone call, if you are unable to speak?
(as seen on /.)
diff -ur ../dpkg-1.14.6.old/scripts/dpkg-buildpackage.sh ./scripts/dpkg-buildpackage.sh
--- ../dpkg-1.14.6.old/scripts/dpkg-buildpackage.sh	2007-09-05 06:15:15.000000000 +0200
+++ ./scripts/dpkg-buildpackage.sh	2007-09-15 20:31:48.000000000 +0200
@@ -23,6 +23,7 @@
 Options:
   -r<gain-root-command>
   -p<sign-command>
+  -j<N>	         allow N jobs at once.
   -d             do not check build dependencies and conflicts.
   -D             check build dependencies and conflicts.
   -k<keyid>      the key to use for signing.
@@ -96,6 +97,7 @@
 		admindir="$value" ;;
 	-r*)	rootcommand="$value" ;;
 	-p*)	signcommand="$value" ;;
+	-j*)	makeoptions="-j $value" ;;
 	-k*)	signkey="$value" ;;
 	-d)	checkbuilddep=false ;;
 	-D)	checkbuilddep=true ;;
@@ -220,14 +222,14 @@
 if [ -n "$desc"		]; then set -- "$@" "-C$desc"		; fi
 
 if [ x$noclean != xtrue ]; then
-	withecho $rootcommand debian/rules clean
+	withecho $rootcommand debian/rules $makeoptions 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 debian/rules $makeoptions build 
+	withecho $rootcommand debian/rules $makeoptions $binarytarget
 fi
 if [ "$usepause" = "true" ] && \
    ( [ "$signchanges" != ":" ] || ( [ -z "$binaryonly" ] && [ "$signsource" != ":" ] ) ) ; then
@@ -281,7 +283,7 @@
 fi
 
 if $cleansource; then
-	withecho $rootcommand debian/rules clean
+	withecho $rootcommand debian/rules $makeoptions clean
 fi
 
 echo "dpkg-buildpackage: $srcmsg"

Reply via email to