From patchwork Sun Jul 25 14:11:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnout Vandecappelle X-Patchwork-Id: 1509602 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=2605:bc80:3010::138; helo=smtp1.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=mind.be header.i=@mind.be header.a=rsa-sha256 header.s=google header.b=ALPHYOHX; dkim-atps=neutral Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4GXlNz0k0Xz9s24 for ; Mon, 26 Jul 2021 00:12:02 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 34DE483196; Sun, 25 Jul 2021 14:12:00 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mHFMnVY4Okrs; Sun, 25 Jul 2021 14:11:59 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp1.osuosl.org (Postfix) with ESMTP id 8261283103; Sun, 25 Jul 2021 14:11:58 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 2977B1BF34C for ; Sun, 25 Jul 2021 14:11:57 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 1838340147 for ; Sun, 25 Jul 2021 14:11:57 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp2.osuosl.org (amavisd-new); dkim=pass (2048-bit key) header.d=mind.be Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id E-BUc1osIwOU for ; Sun, 25 Jul 2021 14:11:56 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) by smtp2.osuosl.org (Postfix) with ESMTPS id 3FF94401A4 for ; Sun, 25 Jul 2021 14:11:56 +0000 (UTC) Received: by mail-ej1-x62d.google.com with SMTP id oz16so3213591ejc.7 for ; Sun, 25 Jul 2021 07:11:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mind.be; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=sAPN9GkVTnmAZto2y3i/h8TN/pm3PNyK5RAD39WOMJ4=; b=ALPHYOHX6rRo+nP9R4MUCsZzMdAjkUFmsLADnHg+QWMMEz8DEcTqZtu5aWv9v7Llws LvcoqERZb1iY9KZWOduB31YjRE/Njqa6mG941iADmw+S6ZgU2R9jeGkQbK4aD27UeZGs HqyaZvkiteLdv/6iH9WKy7cSgSJdtCs0dfrJNedbKHaSOK5RZFZobkuss630ZwF0pncp qN/wvHWhmtNvoQPUUrGZAQVAzMv5shdFjTNpg8CcDW1QRWguWna5QuCHTDxXNhR06yCG wa1VNmFzkPnGAk/r0oGdIy/PLQQPc9UgulQnVnLDRWMxP2jvFasm2N1/cdihgAEqfPTx SfWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=sAPN9GkVTnmAZto2y3i/h8TN/pm3PNyK5RAD39WOMJ4=; b=cq5deyeKjU6FeEske1eBfhwhf9b+SGvMTTt+ue/DZYt6aZuzBG+wetf/+GbZrtNVPL 5kBsFs73YlhnfHd4qkY3Xk4QybDAvbKq04si8w55mWxUhW3jFdrpvLdMGEum4ct8otiY Q7oMjMKOoyQ82vDAwA4U0toJ6epV6ebvyPHDajlTDtBA0sodhIITw/TMhPYuW87Bi8z1 29OfsuXxFXXY6DeeYyN2tHtuyZ67Lb0c1Ol9qBwaca91MkUhih1Nz/s1DXobwkcR0uRw IbribMCh9HYMnE+jnu76Fw+SvfxTeKtm/JxdObB0Tjh9UnvRQ8qftqEDnvjT2B+8x7or 3OrA== X-Gm-Message-State: AOAM531zbS40UFoSOK8wh8zp1d6ia/WPvACHZ9OhJQ6SP+AcXDMYwR6n gTi9yx3eFuA8n963zUghqUMQMNT4pJMiPNe3 X-Google-Smtp-Source: ABdhPJxXhaqfNgs3HjHvaTwKFRgG0P75zwHpPWgfmEOh/SJLG+uhVjiMwsfKEcWbGLch7w7OsIK8hw== X-Received: by 2002:aa7:cb86:: with SMTP id r6mr16116050edt.181.1627222314432; Sun, 25 Jul 2021 07:11:54 -0700 (PDT) Received: from localhost.localdomain (ptr-9fplejn4os7m3x31ny9.18120a2.ip6.access.telenet.be. [2a02:1811:3a7e:7b00:1400:24ea:cbca:e681]) by smtp.gmail.com with ESMTPSA id d2sm13313515ejo.13.2021.07.25.07.11.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Jul 2021 07:11:54 -0700 (PDT) From: "Arnout Vandecappelle (Essensium/Mind)" To: buildroot@buildroot.org Date: Sun, 25 Jul 2021 16:11:45 +0200 Message-Id: <20210725141146.539853-1-arnout@mind.be> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Subject: [Buildroot] [PATCH 1/2] package/pkg-kconfig: hide defconfig targets if defconfig not supported X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Yann E . MORIN" Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" When the savedefconfig target is not supported by a kconfig package, (like is the case for busybox) it doesn't make sense to define busybox-savedefconfig or busybox-update-defconfig. Calling these leads to an error from busybox itself "No rule to make target 'savedefconfig'.", which may be confusing. Only define the savedefconfig and update-defconfig target if $(2)_KCONFIG_SUPPORTS_DEFCONFIG is YES. Note that we also need to define it as phony in the condition, otherwise 'make busybox-update-defconfig' will just say "Nothing to be done" and we really want the error "No rule to make target 'busybox-update-defconfig'". Signed-off-by: Arnout Vandecappelle (Essensium/Mind) --- package/pkg-kconfig.mk | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/package/pkg-kconfig.mk b/package/pkg-kconfig.mk index 715c3e04ec..baad2e3baf 100644 --- a/package/pkg-kconfig.mk +++ b/package/pkg-kconfig.mk @@ -279,8 +279,11 @@ $(1)-check-configuration-done: exit 1; \ fi +ifeq ($$($(2)_KCONFIG_SUPPORTS_DEFCONFIG),YES) $(1)-savedefconfig: $(1)-check-configuration-done $$(call kconfig-package-savedefconfig,$(2)) +.PHONY: $(1)-savedefconfig +endif # Target to copy back the configuration to the source configuration file # Even though we could use 'cp --preserve-timestamps' here, the separate @@ -289,6 +292,7 @@ $(1)-update-config: PKG=$(2) $(1)-update-config: $(1)-check-configuration-done $$(call kconfig-package-update-config,$$($(2)_KCONFIG_DOTCONFIG)) +ifeq ($$($(2)_KCONFIG_SUPPORTS_DEFCONFIG),YES) # Note: make sure the timestamp of the stored configuration is not newer than # the .config to avoid a useless rebuild. Note that, contrary to # $(1)-update-config, the reference for 'touch' is _not_ the file from which @@ -296,6 +300,8 @@ $(1)-update-config: $(1)-check-configuration-done $(1)-update-defconfig: PKG=$(2) $(1)-update-defconfig: $(1)-savedefconfig $$(call kconfig-package-update-config,defconfig) +.PHONY: $(1)-update-defconfig +endif # Target to output differences between the configuration obtained via the # defconfig + fragments (if any) and the current configuration. @@ -315,9 +321,7 @@ endif # package enabled .PHONY: \ $(1)-update-config \ - $(1)-update-defconfig \ $(1)-diff-config \ - $(1)-savedefconfig \ $(1)-check-configuration-done \ $$($(2)_DIR)/.kconfig_editor_% \ $$(addprefix $(1)-,$$($(2)_KCONFIG_EDITORS)) From patchwork Sun Jul 25 14:11:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnout Vandecappelle X-Patchwork-Id: 1509603 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=2605:bc80:3010::137; helo=smtp4.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=mind.be header.i=@mind.be header.a=rsa-sha256 header.s=google header.b=MMBjixiG; dkim-atps=neutral Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4GXlPD0p76z9s24 for ; Mon, 26 Jul 2021 00:12:15 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id E4499403E2; Sun, 25 Jul 2021 14:12:12 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mlb9uorezZyT; Sun, 25 Jul 2021 14:12:12 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp4.osuosl.org (Postfix) with ESMTP id 1154C403DA; Sun, 25 Jul 2021 14:12:11 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id EE89F1BF34C for ; Sun, 25 Jul 2021 14:11:57 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id DCE9140288 for ; Sun, 25 Jul 2021 14:11:57 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YVbJBh6umfzA for ; Sun, 25 Jul 2021 14:11:57 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) by smtp4.osuosl.org (Postfix) with ESMTPS id E39E140266 for ; Sun, 25 Jul 2021 14:11:56 +0000 (UTC) Received: by mail-ej1-x62a.google.com with SMTP id nb11so11777610ejc.4 for ; Sun, 25 Jul 2021 07:11:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mind.be; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=67JZMXUAfb1eV2r/k1rVYPalp7oQRKyigzK2hrmDwOA=; b=MMBjixiGzt5kQuoDPdT7CJUU9IlCROXN4iswa29rUCaapxa3Z+xEu7ttjQQRYFbd7k OnOegyLcAUmXlTCdqodA6+yCEZlKM2Hl82C2qf79Hw7c9IbABSvIRFexoskDeJlNnaVW 9t4NmXRWiX2/4zc5fZEpo885mPFwuvd4FdmsbKepUjviWl6BbRJ2amlusV77uUDRmzM6 uKUEBX4nbS6gdnXojTZJzJcJpWxni9mXxpnI7EV41ApjYEXg9a7apkkkgUluuVfbGrD7 9bWrxc54XcB/X8FnFZ1sl8KQNYD1t5hYL1E+VhBX5BS9V8QHftRAk4p+xYKGZufBo/w0 E1qw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=67JZMXUAfb1eV2r/k1rVYPalp7oQRKyigzK2hrmDwOA=; b=RvVw9TsTPtlGelBNDjMrv0bXHhc6zJ9RQKfSKMJTGtCHtjCwrOdGBWKXwlz4Zg6yqF UhLU7Y3InzQkAVEQckzGRrrRruTRybHx4v9Zp2rnlBEQBpj7s9NpknaHaYUn62TKHmKC t1260ys2Z25vMvYicztoAOBnA9y+pySHztZQ+AnBsqSOH6tnLuXUpUP/ZeTK0I+CAPSE 176B/tHhObk16USYr+MfNBPqtKqRFABsNnEel5G161lYj4fbnXwjWMdhs/w0H++QjEmM pAXASzvG4zcPkJ4U/6BXXcxrk10om/lGYY9MRrwicC2kB94vvBtB1Ou2twHVMXP2XhVR jwvw== X-Gm-Message-State: AOAM532bnjEc+4zYP8xhLsgkt7m6sQOJozBrFdehIKaNakdNn2ysmoJ2 rBjeXlvNvZQXvEqMhStqpKTkW1z+3EmQZENw X-Google-Smtp-Source: ABdhPJwD1xrw0ORUhOLGjnoazUdEePp3Z7zj2bL80W5vvjlbehQSqSduAo0/7aSmO6yeYHhBE4knCg== X-Received: by 2002:a17:906:4889:: with SMTP id v9mr12963392ejq.269.1627222315036; Sun, 25 Jul 2021 07:11:55 -0700 (PDT) Received: from localhost.localdomain (ptr-9fplejn4os7m3x31ny9.18120a2.ip6.access.telenet.be. [2a02:1811:3a7e:7b00:1400:24ea:cbca:e681]) by smtp.gmail.com with ESMTPSA id d2sm13313515ejo.13.2021.07.25.07.11.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Jul 2021 07:11:54 -0700 (PDT) From: "Arnout Vandecappelle (Essensium/Mind)" To: buildroot@buildroot.org Date: Sun, 25 Jul 2021 16:11:46 +0200 Message-Id: <20210725141146.539853-2-arnout@mind.be> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210725141146.539853-1-arnout@mind.be> References: <20210725141146.539853-1-arnout@mind.be> MIME-Version: 1.0 Subject: [Buildroot] [PATCH 2/2] package/pkg-kconfig: only define -update-{def, }config if supported X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Yann E . MORIN" Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" The foo-update-config and foo-update-defconfig targets only work if a custom config file was defined. Remove those targets entirely if they don't work to begin with. This was originally handled with an error condition in the kconfig-package-update-config macro. However, it makes more sense to simply remove the target if it anyway can't be used. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) --- package/pkg-kconfig.mk | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/package/pkg-kconfig.mk b/package/pkg-kconfig.mk index baad2e3baf..1e18d7dc07 100644 --- a/package/pkg-kconfig.mk +++ b/package/pkg-kconfig.mk @@ -12,12 +12,12 @@ ################################################################################ # Macro to update back the custom (def)config file +# Must only be called if $(PKG)_KCONFIG_FILE is set and $(PKG)_KCONFIG_DEFCONFIG) +# is not set. # $(1): file to copy from define kconfig-package-update-config @$(if $($(PKG)_KCONFIG_FRAGMENT_FILES), \ echo "Unable to perform $(@) when fragment files are set"; exit 1) - @$(if $($(PKG)_KCONFIG_DEFCONFIG), \ - echo "Unable to perform $(@) when using a defconfig rule"; exit 1) $(Q)if [ -d $($(PKG)_KCONFIG_FILE) ]; then \ echo "Unable to perform $(@) when $($(PKG)_KCONFIG_FILE) is a directory"; \ exit 1; \ @@ -285,12 +285,14 @@ $(1)-savedefconfig: $(1)-check-configuration-done .PHONY: $(1)-savedefconfig endif +ifeq ($$($(2)_KCONFIG_DEFCONFIG),) # Target to copy back the configuration to the source configuration file # Even though we could use 'cp --preserve-timestamps' here, the separate # cp and 'touch --reference' is used for symmetry with $(1)-update-defconfig. $(1)-update-config: PKG=$(2) $(1)-update-config: $(1)-check-configuration-done $$(call kconfig-package-update-config,$$($(2)_KCONFIG_DOTCONFIG)) +.PHONY: $(1)-update-config ifeq ($$($(2)_KCONFIG_SUPPORTS_DEFCONFIG),YES) # Note: make sure the timestamp of the stored configuration is not newer than @@ -303,6 +305,8 @@ $(1)-update-defconfig: $(1)-savedefconfig .PHONY: $(1)-update-defconfig endif +endif + # Target to output differences between the configuration obtained via the # defconfig + fragments (if any) and the current configuration. # Note: it preserves the timestamp of the current configuration when moving it @@ -320,7 +324,6 @@ $(1)-diff-config: $(1)-check-configuration-done endif # package enabled .PHONY: \ - $(1)-update-config \ $(1)-diff-config \ $(1)-check-configuration-done \ $$($(2)_DIR)/.kconfig_editor_% \