From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 27D85C433EF for ; Fri, 21 Jan 2022 18:26:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1382093AbiAUS0q (ORCPT ); Fri, 21 Jan 2022 13:26:46 -0500 Received: from dcvr.yhbt.net ([64.71.152.64]:50912 "EHLO dcvr.yhbt.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1381955AbiAUS0p (ORCPT ); Fri, 21 Jan 2022 13:26:45 -0500 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id CA2991FA10; Fri, 21 Jan 2022 18:26:35 +0000 (UTC) From: Eric Wong To: io-uring@vger.kernel.org Cc: Stefan Metzmacher , Liu Changcheng , Eric Wong Subject: [PATCH v3 4/7] debian/rules: support parallel build Date: Fri, 21 Jan 2022 18:26:32 +0000 Message-Id: <20220121182635.1147333-5-e@80x24.org> In-Reply-To: <20220121182635.1147333-1-e@80x24.org> References: <20220121182635.1147333-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: io-uring@vger.kernel.org This bit stolen from the debian/rules file of `git' speeds up builds from ~35s to ~10s for me. Signed-off-by: Eric Wong --- debian/rules | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/debian/rules b/debian/rules index 6631b10..f26271e 100755 --- a/debian/rules +++ b/debian/rules @@ -9,6 +9,16 @@ DEB_CFLAGS_MAINT_PREPEND = -Wall include /usr/share/dpkg/default.mk include /usr/share/dpkg/buildtools.mk +# taken from the debian/rules of src:git +ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) + NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) + MAKEFLAGS += -j$(NUMJOBS) + # Setting this with a pattern-specific rule prevents -O from + # affecting the top-level make, which would break realtime build + # output (unless dh is run as +dh, which causes other problems). + %: MAKEFLAGS += -O +endif + export CC lib := liburing1