Received: by 10.223.185.116 with SMTP id b49csp1046361wrg; Fri, 16 Feb 2018 11:25:17 -0800 (PST) X-Google-Smtp-Source: AH8x226osjIbX1cUUb/zUu47Td5nC/pt+8UBNgMXkrT8LcybgrMUE6ADOiOkfEy5jT9/XQe3nekY X-Received: by 10.99.126.19 with SMTP id z19mr5900113pgc.108.1518809117517; Fri, 16 Feb 2018 11:25:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518809117; cv=none; d=google.com; s=arc-20160816; b=fVEzybRnN8YlREYm+oxnsireCuzABf3lFhO5cxRcbhjlGZvHKivsPqg1GAEpadv5bZ PTy0GrSFIxjbnnnDOSlTQd4/CS+k6Kj/Pt/idFxpx0m3uxwFK71ydA2akHrtE509752z wNuBZ6Xg+e708bUvkTlNwDwRmMgMg8Jp/PtSK7d5f9bD60gt0pxSLR4y5vBvvUt3Apix wYYpWRJ97+3MsPR1HSm64NKh8L0m3f1+ofAA8hSjXV990eULFmd6QFaMQJm/tPjXrsvm kCtTeSpuMxU2TjNz/XP5LLF+FHH0zEa7kDYaJ6+W6MZ1meQKvRuvWd5c9DGGhWlO0arY AjLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=sodw03NpQu1cnO7enjixBMXFMH+aKOKqCRxdHoRmIEI=; b=avS30OVgXLStfnYgK/vAt2GebZGDMoVzSa189Zavpin+3J8t9ybbz4zU2Sg5Au8cV8 5XzOqeAXcIyvO1QlM99eLL5f9NJ94scRxWWwE+/Qo1G8UmITzw32aWkryjwAazwAIyBt tJcnfOqlaJekqRnov/EyA4jdeDrb7RGTI4imAUsliIRYVXAoJsT9qCCCFK/TSGNpqYP6 Mfh1nBKVjQKotPuuMhEhHWt44pht3H7GLfqMmFgXiWG5iF3sfNngCWLCJjU6QYp+5tOk PSMIn9DjdDMd18eX/AvyXagqSYkqX1S1rEKJx79XufYqvNsuTpjPY0fl0qQr0LT+7+C2 MXWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=oMxI9B9h; 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: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e9si1909521pgr.481.2018.02.16.11.25.03; Fri, 16 Feb 2018 11:25:17 -0800 (PST) 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=fail header.i=@gmail.com header.s=20161025 header.b=oMxI9B9h; 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 S1753297AbeBPTR5 (ORCPT + 99 others); Fri, 16 Feb 2018 14:17:57 -0500 Received: from mail-io0-f176.google.com ([209.85.223.176]:33006 "EHLO mail-io0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751008AbeBPTRy (ORCPT ); Fri, 16 Feb 2018 14:17:54 -0500 Received: by mail-io0-f176.google.com with SMTP id n7so5201287iob.0; Fri, 16 Feb 2018 11:17:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=sodw03NpQu1cnO7enjixBMXFMH+aKOKqCRxdHoRmIEI=; b=oMxI9B9hKcuHA1/D6Dq2LzdwoCTXk/RMh/enoqaYkiEzArobV7HE0H6+B+RCusmjoI 6z8wDm7Gs8VVZb6RF19umLIVS5dCsEwtnaerHdQco/nTCOU69v2mo4q8DOXAGLBQEZc5 XeJFt6DBqwaY+0TU7ragn/zbQ955upd7mvdWG8Dl9RVZVQHpQ0xe4+GMkd9nF2PWTbGr wtTdb0Z3uZiHes1OgnBlOjOYCGnMNoTSWbpScQ00l9A6VGOIsAHI/w7MoVLB4U7kXWBl 9r7Ct69eITM2B/NZrMYFU1J8gzm8oxUJ77aUkUgje/b8ktq+eWKx3FuV4xK7S/Z3/DbQ ZOuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=sodw03NpQu1cnO7enjixBMXFMH+aKOKqCRxdHoRmIEI=; b=QR5/8dlg/LSNsGL5ZRAlhLf02iqU6xjgcTOvROiLH7rZSKn12sGhkktDj6xVfyP1XB yefs1v/3IloNn3etDzW3Bn6cGRb+ssskDBu+344WuM6blXcTFmRPzOc41ANm43ut/8+G wo6HVal/rw0G4gGjdRn6WyTbua5cwy1a1cTXiTxsjRgBAOzV3BYDSZ82q6gsYpHTdyJ/ rNjeDhNhFKoknU7cqqpTDULgl96rTS5aJ4IxvdEu67nlLdNs2pteYS4QRMO6xL5k0S7s y79ZbgJOmmBrqhWI3iJi93T2W4X8e4gOODCQ2F7qnBzvynSvJmSCMLJECf6JvAX+qNHj 71Wg== X-Gm-Message-State: APf1xPBpxAcPD1xoENzH97KeX9pTbtNhCUmLTvIAtB0z7+G0/x78VvSp A/uwyaZ3qeaScCqeOYaiPppEpRFpN+D5/I5AEZ8= X-Received: by 10.107.154.137 with SMTP id c131mr10138957ioe.203.1518808672844; Fri, 16 Feb 2018 11:17:52 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.135.221 with HTTP; Fri, 16 Feb 2018 11:17:52 -0800 (PST) In-Reply-To: <1518806331-7101-12-git-send-email-yamada.masahiro@socionext.com> References: <1518806331-7101-1-git-send-email-yamada.masahiro@socionext.com> <1518806331-7101-12-git-send-email-yamada.masahiro@socionext.com> From: Linus Torvalds Date: Fri, 16 Feb 2018 11:17:52 -0800 X-Google-Sender-Auth: XR3ZjpXv7JOPiZjvVq8BU4XNpCs Message-ID: Subject: Re: [PATCH 11/23] kconfig: add 'shell-stdout' function To: Masahiro Yamada Cc: Linux Kbuild mailing list , Greg Kroah-Hartman , Arnd Bergmann , Kees Cook , Randy Dunlap , Ulf Magnusson , Sam Ravnborg , Michal Marek , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 16, 2018 at 10:38 AM, Masahiro Yamada wrote: > This is the second built-in function, which retrieves the first line > of stdout from the given shell command. This is the only part I really don't much like in your patch series. Most of it is just lovely and looks very nice and powerful, but the difference between "$(shell ..." and "$(shell-stdout ..." to me is bvery ugly. Can we *please* make "shell-stdout" go away, and make this just be "shell"? The rule would be very simple: - if the result of the shell command is a failure, the result is 'n' - otherwise, the result is the first line of stdout - if the result is empty, we replace it with 'y'. So doing $(shell true) would be 100% equivalent to $(shell echo y), and you could still do that default $(shell $CC --version | grep -q gcc) because it would just automatically do the right thing. Basically, the only difference is how $(shell ) works in the success case: the result won't necessarily be 'y', it will be whatever output. But if you want to always turn it into 'y' (say, you don't have a "-q" flag for the grep equivalent above), you can always do so with default $(shell $CC --version | noqgrep gcc > /dev/null) So it seems to me that there is never any fundamental reason why we'd want both "shell" and "shell-stdout", since "shell-stdout" is fundamentally more powerful than "shell", and can always be used as such (and just renamed to "shell"). Because I really think that it's just much prettier and more intuitive to be able to say default "/boot/config-$(shell uname --release)" without that "-stdout" thing. Hmm? But I do want to say how much I liked this series. Just this part seemed to result in uglier Kconfig scripts. Linus