From patchwork Wed Jan 25 09:27:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juerg Haefliger X-Patchwork-Id: 1731610 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=Lvna4/nK; dkim-atps=neutral Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4P1z5v6b39z23gY for ; Wed, 25 Jan 2023 20:28:03 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1pKc4P-0008Vr-Be; Wed, 25 Jan 2023 09:27:53 +0000 Received: from smtp-relay-internal-0.internal ([10.131.114.225] helo=smtp-relay-internal-0.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1pKc4N-0008Vj-DH for kernel-team@lists.ubuntu.com; Wed, 25 Jan 2023 09:27:51 +0000 Received: from mail-ej1-f69.google.com (mail-ej1-f69.google.com [209.85.218.69]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id 34F4D3F301 for ; Wed, 25 Jan 2023 09:27:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1674638871; bh=9yGPA2ERinX2lWa+kAPBCCislEeOlQYBbhHxzPVINKU=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=Lvna4/nKzL+jzcgwC08vilupqdWmnOmNtL7Nwqtatp+bQsQPaSivO+7PwI2JoNfAB 5a2pj4K5OUhYHfksFq9bNmx0PO1TQjd1Z//mHsqoXR95PZP0J96wXize84L5yw0hcp vR5s5Uj08kvsubF5VQ+lF+i5p/oSQJ82Iwfl006iuiwDtXibBcQbz3j7mCR/lbmsVM 8Lf1DIU61tqZBhO4zWUkjEbRyIlaOd0rpHBnMjxdGI++yNqZsOJZObcR8H0RO1VOxO Ex/5ZnAiMBMPRpiAUu1RUIYalogr1JsB0CGpprR2bSdopvGlL77Ff3IAc81vTdQxyP MCpehmo4g+SkA== Received: by mail-ej1-f69.google.com with SMTP id nc27-20020a1709071c1b00b0086dae705676so11653707ejc.12 for ; Wed, 25 Jan 2023 01:27:51 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=9yGPA2ERinX2lWa+kAPBCCislEeOlQYBbhHxzPVINKU=; b=7FKXVShECvVd5t1/sAdeEjQws7vFwAuFJ8GdmPlwrhB6BygoSuXgppeP4MLkNt3lO/ QvUn26/0nQ3xaDf6aeDG32rODd1vxSzuU0Age8jaZ16qN6jnToBVKYLy9EWQqPp+SC+t aB1zm7gNynKHBse+nDb/NSxQwmNqUpHUodXXtx2ujOZbvP6TszIxY3sYgrmRlwirF74O hly2KI3ScxnazvITUkcvWML/n7OwCkaIDxQKy0SdxvrU1uOGnFhBGngpbSazfp1rODRl AQbX4e4hK0oIc7TPtEVb+t+5jpoHBVmpDnf3Qqk5wHeRZB093oVdYVveCvc4hmUZUbkf J0Gg== X-Gm-Message-State: AFqh2krPrIQ+k1Zb1WVSK5PQc6VqKMA57WeDeoMO8KwvUHb6QUlkiOsK s3pTP+nono6wS77heE1DhhI0d3z5bXp8oXN7E5RHIXFQSbxGWm3KBq89DunvWsNwobeTNejLH6u OD4YhpMkoRehOjPQPCw1SrZDi4aHrDSefTNxivva+oA== X-Received: by 2002:aa7:c9c7:0:b0:499:cc32:6a52 with SMTP id i7-20020aa7c9c7000000b00499cc326a52mr44354721edt.16.1674638870970; Wed, 25 Jan 2023 01:27:50 -0800 (PST) X-Google-Smtp-Source: AMrXdXt90skGt4RpvKMaOxgw8YbWYEz9Q/EwYSMrZLfWDpMJ85fhCmsgH4aZz5SoZn+CxaqMXpLgIA== X-Received: by 2002:aa7:c9c7:0:b0:499:cc32:6a52 with SMTP id i7-20020aa7c9c7000000b00499cc326a52mr44354710edt.16.1674638870708; Wed, 25 Jan 2023 01:27:50 -0800 (PST) Received: from gollum.fritz.box ([194.191.244.86]) by smtp.gmail.com with ESMTPSA id a2-20020a50ff02000000b0046c4553010fsm2114555edu.1.2023.01.25.01.27.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Jan 2023 01:27:50 -0800 (PST) From: Juerg Haefliger To: kernel-team@lists.ubuntu.com Subject: [Unstable/Lunar][PATCH] UBUNTU: [Config] debian/rules: 1-maintainer.mk -- Use make's if-else Date: Wed, 25 Jan 2023 10:27:49 +0100 Message-Id: <20230125092749.931724-1-juerg.haefliger@canonical.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" Use make's built-in if-else conditional rather than the shell's so we can drop multi-line shell statements and make the code more readable. While at it, don't purge the 'build' directory at the end of the config operations. That's a directory used internally by the kernelconfig script which handles the cleanup. Signed-off-by: Juerg Haefliger --- debian/rules.d/1-maintainer.mk | 38 +++++++++++++++++----------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/debian/rules.d/1-maintainer.mk b/debian/rules.d/1-maintainer.mk index 239af468df5d..e90d4792ce58 100644 --- a/debian/rules.d/1-maintainer.mk +++ b/debian/rules.d/1-maintainer.mk @@ -27,31 +27,31 @@ printdebian: .PHONY: migrateconfigs migrateconfigs: - dh_testdir; - if [ -e "$(DEBIAN)/config/config.common.ubuntu" ]; then \ - conc_level=$(conc_level) $(SHELL) $(DROOT)/scripts/misc/old-kernelconfig genconfigs; \ - mkdir build; \ - mv $(DEBIAN)/config/annotations build/.annotations ; \ - mv $(DEBIAN)/config/README.rst build/.README.rst 2>/dev/null || true; \ - rm -rf $(DEBIAN)/config; \ - mkdir -p $(DEBIAN)/config; \ - debian/scripts/misc/migrate-annotations < build/.annotations > $(DEBIAN)/config/annotations; \ - mv build/.README.rst $(DEBIAN)/config/README.rst 2>/dev/null || true; \ - conc_level=$(conc_level) $(SHELL) $(DROOT)/scripts/misc/kernelconfig updateconfigs; \ - fi +ifneq ($(wildcard $(DEBIAN)/config/config.common.ubuntu),) + dh_testdir + conc_level=$(conc_level) $(SHELL) $(DROOT)/scripts/misc/old-kernelconfig genconfigs rm -rf build + mkdir build + mv $(DEBIAN)/config/annotations build/.annotations + mv $(DEBIAN)/config/README.rst build/.README.rst 2>/dev/null || true + rm -rf $(DEBIAN)/config + mkdir -p $(DEBIAN)/config + debian/scripts/misc/migrate-annotations < build/.annotations > $(DEBIAN)/config/annotations + mv build/.README.rst $(DEBIAN)/config/README.rst 2>/dev/null || true + rm -rf build + conc_level=$(conc_level) $(SHELL) $(DROOT)/scripts/misc/kernelconfig updateconfigs +endif configs-targets := updateconfigs defaultconfigs genconfigs editconfigs .PHONY: $(configs-targets) $(configs-targets): - dh_testdir; - if [ -e "$(DEBIAN)/config/config.common.ubuntu" ]; then \ - conc_level=$(conc_level) $(SHELL) $(DROOT)/scripts/misc/old-kernelconfig $@; \ - else \ - conc_level=$(conc_level) $(SHELL) $(DROOT)/scripts/misc/kernelconfig $@; \ - fi; - rm -rf build + dh_testdir +ifneq ($(wildcard $(DEBIAN)/config/config.common.ubuntu),) + conc_level=$(conc_level) $(SHELL) $(DROOT)/scripts/misc/old-kernelconfig $@ +else + conc_level=$(conc_level) $(SHELL) $(DROOT)/scripts/misc/kernelconfig $@ +endif .PHONY: printenv printenv: