Jakub Wilk wrote: > $ make -j2 > BEFORE > AFTER > > $ dpkg-buildpackage -j2 > [snip] > dh_auto_build > make[1]: Entering directory `/home/jwilk/trunk/bugs/makejobs-1' > make[1]: warning: jobserver unavailable: using -j1. Add `+' to parent make > rule.
make relies on submakes being called via $(MAKE) in the make file in
order to support parallel builds. Since the rules file runs a submake
via a debhelper command, even though that command then runs $MAKE,
make will not do its parallel magic (specifically, it won't leave
the jobserver FDs open when running the debhelper command). You can
see the same result with this simple case:
build: foo bar
foo:
echo foo
bar:
echo bar
FAKE=$(MAKE)
debian_rules_build:
$(FAKE)
If you run 'make -j2 debian_rules_build', it will not parallelize.
If the last line is changed to use $(MAKE), it will.
Or, you can change it to +$(FAKE); this causes make to treat the line
as a sub-make invocation.
So, there's nothing debhelper can do to help here; it's up to your rules
file. If you want to work around this make limitation, you will have to
ensure your rules file calls $(MAKE) directly, with something like this:
override_dh_auto_build:
$(MAKE)
Or, modify the call to dh_auto_build or dh to be prefixed with a +:
%:
+dh $@
--
see shy jo
signature.asc
Description: Digital signature

