From 5095210e1b6b15e1430b99bcb914645cde299329 Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Sun, 25 Nov 2012 10:14:59 +0000 Subject: Only build with -j if DEB_BUILD_OPTIONS=parallel=* is used (closes: #694282). --- debian/changelog | 2 ++ debian/rules | 11 +++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 64d7df278..b3f7fc49a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,6 +8,8 @@ openssh (1:6.1p1-2) UNRELEASED; urgency=low been long enough since the relevant vulnerability that we shouldn't need these installed by default nowadays. - Add an Upstart job (not currently used by default in Debian). + * Only build with -j if DEB_BUILD_OPTIONS=parallel=* is used (closes: + #694282). -- Colin Watson Fri, 28 Sep 2012 17:54:42 +0100 diff --git a/debian/rules b/debian/rules index 3dfbe6a66..a2efd3a0b 100755 --- a/debian/rules +++ b/debian/rules @@ -12,6 +12,13 @@ else RUN_TESTS := endif +ifeq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) + PARALLEL := +else + PARALLEL := \ + -j$(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) +endif + DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) @@ -121,8 +128,8 @@ override_dh_auto_build: perl -pi -e 's/ +-lnsl//' build-udeb/config.status cd build-udeb && ./config.status - $(MAKE) -C build-deb -j 2 ASKPASS_PROGRAM='/usr/bin/ssh-askpass' - $(MAKE) -C build-udeb -j 2 ASKPASS_PROGRAM='/usr/bin/ssh-askpass' ssh scp sftp sshd ssh-keygen + $(MAKE) -C build-deb $(PARALLEL) ASKPASS_PROGRAM='/usr/bin/ssh-askpass' + $(MAKE) -C build-udeb $(PARALLEL) ASKPASS_PROGRAM='/usr/bin/ssh-askpass' ssh scp sftp sshd ssh-keygen $(MAKE) -C contrib gnome-ssh-askpass2 CC='$(CC) $(default_cflags) -Wall -Wl,--as-needed $(default_ldflags)' PKG_CONFIG=$(PKG_CONFIG) -- cgit v1.2.3