Message ID | 1527499328-13213-16-git-send-email-yamada.masahiro@socionext.com |
---|---|
State | Accepted |
Commit | 82bc8bd82e5c4e6e53d4ba20bb89cec6a91d8702 |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp2592577lji; Mon, 28 May 2018 02:25:24 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJz74PdfursOFNg7uyhah0YRvcu6MvNVNmOe8lCTyrz9VHEcE+U/bGWBrKt4UWYMPX/v7w9 X-Received: by 2002:a62:bd0:: with SMTP id 77-v6mr8175659pfl.235.1527499524659; Mon, 28 May 2018 02:25:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527499524; cv=none; d=google.com; s=arc-20160816; b=x8BareQf40Axp76esP4LdggVEMUD23mPKBgWvjTAHgK4G08lBw0/CITQi817BIlmVE h0NV195Fwh23PVmB1IxQRjMHtM4XVRhIirZ6v1/smAPhNbdo82t74RWOQbMZQW2B3O8r mUvxisxCxu1Tk85aMw063RM+jBn1U8YF616BaDekpFxm2ZgS9xBwCWxxRym3XuNt6Oz5 k+zTR8rRY8osMMNrtXVx9oN4X4fv+Ho9WCZihYSUskvGs+8cEkld3cx3vijZLUcxWGIq g5/aJ69Hdq9gTPBYLtyq7Chkl49fCkcfHDBynEpYeoSYAfFzaL+Co1WBsIDtjR6HcO4g VTzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter :arc-authentication-results; bh=lnlXgpG2yr3gcltd1Tfk1Ic+F5H37kq4DDC7fttMI+M=; b=PevLMx6BAaWvV37xiRF/teKYkowDKvn6m4Eal05akQvPGNe6junAcQ6tzUwlRHjHkr OjJO5Ul9Ts8EhrKmSPTbEFEY/3boRZndU96Vlo8BGu69TRpSDk/LV3NLA17pdmp/Mqbz gX69Fi+JytFnnNHn5bftNA7AdwBk8GdJDQPjLMsjRXmmUDyH749ekG5uEMd1Wg5X30Pi eWAfNH2l4lrSE4SFvq5XNv7VNGJsR2PzKT1eenMAtR7ln1chkItgB+Alo3nLlDtgyFQh EGR+3Tmck5hSv3Fua3iE5FadsCwaL3cy5egi6+mCfhig0ac2WQin0iBjmfwHYnmIBayL aKhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=0SjgHlGG; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: <linux-kernel-owner@vger.kernel.org> Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o73-v6si29905174pfg.327.2018.05.28.02.25.24; Mon, 28 May 2018 02:25:24 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=0SjgHlGG; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933832AbeE1JZV (ORCPT <rfc822;ruslan.trofymenko@linaro.org> + 30 others); Mon, 28 May 2018 05:25:21 -0400 Received: from conuserg-10.nifty.com ([210.131.2.77]:23165 "EHLO conuserg-10.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933652AbeE1JZJ (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 28 May 2018 05:25:09 -0400 Received: from grover.sesame (FL1-125-199-20-195.osk.mesh.ad.jp [125.199.20.195]) (authenticated) by conuserg-10.nifty.com with ESMTP id w4S9MInW027506; Mon, 28 May 2018 18:22:31 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-10.nifty.com w4S9MInW027506 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1527499352; bh=lnlXgpG2yr3gcltd1Tfk1Ic+F5H37kq4DDC7fttMI+M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0SjgHlGGUBYwbKzkRSQbUdD6UfsTXr7xFW07Vkc/xUCpFhiuiw0Y3DJ9X9QytQOyU Sb285tZtIeqBxaBgIICuaRZZbwT8+8caneCScsbYKUImfHAkrjHida3di3UVbs17So NvfhWzeIgxD+urnNnv2hTazWoei6jaoba9IUB2+INz6RFn76gFklZampIRNS85YYqy 9/t06cHo9MdtrACaZ7Ypr3I3k+OPaeLSP4ggS4wPkA9Qvm4r62/MTfQhosT5vwUZDe oCazBHuAqsEYGwa75hB/DbE8RK3sK5KdkeKKyTrR6WeBstoZKnxUWvj4RwPqx4Jact gkj4CkYzJ1GGw== X-Nifty-SrcIP: [125.199.20.195] From: Masahiro Yamada <yamada.masahiro@socionext.com> To: linux-kbuild@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Kees Cook <keescook@chromium.org>, Nicholas Piggin <npiggin@gmail.com>, "Luis R . Rodriguez" <mcgrof@suse.com>, Randy Dunlap <rdunlap@infradead.org>, Ulf Magnusson <ulfalizer@gmail.com>, Sam Ravnborg <sam@ravnborg.org>, Linus Torvalds <torvalds@linux-foundation.org>, Masahiro Yamada <yamada.masahiro@socionext.com> Subject: [PATCH v5 15/31] kconfig: expand lefthand side of assignment statement Date: Mon, 28 May 2018 18:21:52 +0900 Message-Id: <1527499328-13213-16-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1527499328-13213-1-git-send-email-yamada.masahiro@socionext.com> References: <1527499328-13213-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org |
Series |
kconfig: move compiler capability tests to Kconfig
|
expand
|
diff --git a/scripts/kconfig/zconf.l b/scripts/kconfig/zconf.l index a6cbe2d..25bd2b8 100644 --- a/scripts/kconfig/zconf.l +++ b/scripts/kconfig/zconf.l @@ -114,6 +114,13 @@ n [A-Za-z0-9_-] yylval.string = text; return T_VARIABLE; } + ({n}|$)+ { + /* this token includes at least one '$' */ + yylval.string = expand_token(yytext, yyleng); + if (strlen(yylval.string)) + return T_VARIABLE; + free(yylval.string); + } "=" { BEGIN(ASSIGN_VAL); yylval.flavor = VAR_RECURSIVE; return T_ASSIGN; } ":=" { BEGIN(ASSIGN_VAL); yylval.flavor = VAR_SIMPLE; return T_ASSIGN; } "+=" { BEGIN(ASSIGN_VAL); yylval.flavor = VAR_APPEND; return T_ASSIGN; }
Make expands the lefthand side of assignment statements. In fact, Kbuild relies on it since kernel makefiles mostly look like this: obj-$(CONFIG_FOO) += foo.o Do likewise in Kconfig. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> --- Changes in v5: None Changes in v4: None Changes in v3: None Changes in v2: None scripts/kconfig/zconf.l | 7 +++++++ 1 file changed, 7 insertions(+) -- 2.7.4