From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Mon, 25 Oct 2021 15:10:09 +0200 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by lore.white.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1mezjt-0007zW-1s for lore@lore.pengutronix.de; Mon, 25 Oct 2021 15:10:09 +0200 Received: from localhost ([127.0.0.1] helo=metis.ext.pengutronix.de) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1mezjs-0000Ad-MI; Mon, 25 Oct 2021 15:10:08 +0200 Received: from mail.thorsis.com ([92.198.35.195]) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mezj3-0008Fu-GD for ptxdist@pengutronix.de; Mon, 25 Oct 2021 15:09:22 +0200 Received: from localhost (localhost [127.0.0.1]) by mail.thorsis.com (Postfix) with ESMTP id BB0021BF5 for ; Mon, 25 Oct 2021 15:09:16 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mail.thorsis.com Received: from mail.thorsis.com ([127.0.0.1]) by localhost (mail.thorsis.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id yW0QayesV-1i for ; Mon, 25 Oct 2021 15:09:16 +0200 (CEST) Received: by mail.thorsis.com (Postfix, from userid 109) id 9A8FB1C60; Mon, 25 Oct 2021 15:09:16 +0200 (CEST) Received: from adahl by ada.ifak-system.com with local (Exim 4.92) (envelope-from ) id 1meziw-0001tv-Oh; Mon, 25 Oct 2021 15:09:10 +0200 From: Alexander Dahl To: ptxdist@pengutronix.de Date: Mon, 25 Oct 2021 15:09:09 +0200 Message-Id: <20211025130910.7257-2-ada@thorsis.com> In-Reply-To: <20211025130910.7257-1-ada@thorsis.com> References: <20211025130910.7257-1-ada@thorsis.com> X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on metis.ext.pengutronix.de X-Spam-Level: X-Spam-Status: No, score=-2.6 required=4.0 tests=AWL,BAYES_00,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Subject: [ptxdist] [PATCH 1/2] Add macro 'noyes' as reverse of 'yesno' X-BeenThere: ptxdist@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "ptxdist" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: ptxdist-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false This will be useful for some packages using scons. Signed-off-by: Alexander Dahl --- doc/ref_make_macros.rst | 3 +++ rules/pre/000-option-disabled.make | 12 ++++++++++++ 2 files changed, 15 insertions(+) diff --git a/doc/ref_make_macros.rst b/doc/ref_make_macros.rst index ae65cb940..730687daf 100644 --- a/doc/ref_make_macros.rst +++ b/doc/ref_make_macros.rst @@ -673,6 +673,7 @@ Usage: $(call ptx/wow, VARIABLE) $(call ptx/wwo, VARIABLE) $(call ptx/yesno, VARIABLE) + $(call ptx/noyes, VARIABLE) $(call ptx/truefalse, VARIABLE) $(call ptx/falsetrue, VARIABLE) $(call ptx/onoff, VARIABLE) @@ -694,6 +695,8 @@ These are useful for ``_CONF_OPT`` variables, and expand as follows: +--------------------+-------------------------------+---------------------------------+---------------------+ | ptx/yesno | ``yes`` | ``no`` | autoconf cache vars | +--------------------+-------------------------------+---------------------------------+---------------------+ +| ptx/noyes | ``no`` | ``yes`` | scons | ++--------------------+-------------------------------+---------------------------------+---------------------+ | ptx/truefalse | ``true`` | ``false`` | meson | +--------------------+-------------------------------+---------------------------------+---------------------+ | ptx/falsetrue | ``false`` | ``true`` | meson | diff --git a/rules/pre/000-option-disabled.make b/rules/pre/000-option-disabled.make index fa0e8a294..9a068b39c 100644 --- a/rules/pre/000-option-disabled.make +++ b/rules/pre/000-option-disabled.make @@ -146,6 +146,18 @@ $(call ptx/ifdef, $(1), yes, no) endef +# +# $(call ptx/noyes, PTXCONF_SYMBOL) returns "no" or "yes" +# depending on the symbol is defined or not +# +# $(call ptx/noyes, PTXCONF_SYMBOL) +# $1 +# +define ptx/noyes +$(call ptx/ifdef, $(1), no, yes) +endef + + define ptx/config-foo $(strip $(if $($(strip $(1))), $(if $(call remove_quotes,$($(2))), -- 2.30.2 _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de