Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754534AbdFNHc0 (ORCPT ); Wed, 14 Jun 2017 03:32:26 -0400 Received: from mx2.suse.de ([195.135.220.15]:56354 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754259AbdFNHcZ (ORCPT ); Wed, 14 Jun 2017 03:32:25 -0400 Subject: Re: [PATCH v2] Kbuild: tiny correction on `make help` To: Cao jin , Masahiro Yamada References: <1496740073-3320-1-git-send-email-caoj.fnst@cn.fujitsu.com> <593FB5F2.4040206@cn.fujitsu.com> <5940E10A.10309@cn.fujitsu.com> Cc: Linux Kernel Mailing List , Linux Kbuild mailing list From: Michal Marek Message-ID: <98403870-3c74-0730-2ffa-3048ed3827ad@suse.com> Date: Wed, 14 Jun 2017 09:32:22 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <5940E10A.10309@cn.fujitsu.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1199 Lines: 43 Dne 14.6.2017 v 09:08 Cao jin napsal(a): > > > On 06/14/2017 09:15 AM, Masahiro Yamada wrote: >> 2017-06-13 18:52 GMT+09:00 Cao jin : >>> Yamada-san, >>> >>> I have a question on the current top level Makefile. There are >>> following lines, I have trouble to understand "firstword x$(MAKEFLAGS)" >>> in 2nd line, why there is a 'x' there? >>> >>> >>> ifneq ($(filter 4.%,$(MAKE_VERSION)),) # make-4 >>> ifneq ($(filter %s ,$(firstword x$(MAKEFLAGS))),) >> >> >> I do not understand the 'x' either. >> >> Michal suggested the code according to the following: >> https://patchwork.kernel.org/patch/3291301/ >> (I hope Michal can help you.) >> > > It does helps. > >> >> My first guess was, it was added just in case $(MAKEFLAGS) is empty. >> Actually $(firstword ) seems to work with empty argument, though. >> > > I see, I guess you are saying it was added in case there is no > single-letter flags in $(MAKEFLAGS) while it has "--debug=jobs", that > make sense to me. Thanks very much, Yamada-san. Well, it more than three years ago. But yes, I believe that was the intention: make --foo=s x$(MAKEFLAGS) => x --foo=s $(firstword x$(MAKEFLAGS)) => x Michal