Package build time: cdbs vs dh

Most people (at least those who hear me shouting on irc) probably know that I’m not a fan of cdbs. While working on geoclue, which builds a lot of binary packages I realized, that cdbs wastes an insane amount of time by calling dh_* for every single package. One of the reasons geoclue uses cdbs is that the maintainer likes the short debian/rules file. We’ll, compare yourself:

cdbs:

#!/usr/bin/make -f
# -*- makefile -*-

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

include /usr/share/cdbs/1/rules/patchsys-quilt.mk
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/autotools.mk
include /usr/share/cdbs/1/rules/utils.mk

common-binary-predeb-arch:: list-missing

clean::
	rm -f providers/gypsy/Makefile
	rm -rf debian/tmp

Build time: dpkg-buildpackage -B 132.20s user 41.52s system 90% cpu 3:11.13 total

dh(1):

#!/usr/bin/make -f
# -*- makefile -*-

include /usr/share/quilt/quilt.make

build: $(QUILT_STAMPFN) build-stamp
build-stamp:
	dh build
	touch $@

%:
	dh $@

clean: clean-patched unpatch
clean-patched:
	dh clean
	rm -f providers/gypsy/Makefile
	rm -f build-stamp

.PHONY: patch unpatch clean clean-patched build 

Build time: dpkg-buildpackage -B 85.63s user 32.91s system 91% cpu 2:08.91 total

So cdbs wasted about one minute of time using a 2.4 GHz Intel Core2Duo. I’m wondering how much more time it takes on slow architectures like mips(el) and arm(el). One more argument against the unmaintaible mess of makefiles called cdbs.