public inbox for kdevops@lists.linux.dev
 help / color / mirror / Atom feed
From: Daniel Gomez <da.gomez@kernel.org>
To: Chuck Lever <chuck.lever@oracle.com>,
	Luis Chamberlain <mcgrof@kernel.org>
Cc: kdevops@lists.linux.dev, Daniel Gomez <da.gomez@samsung.com>
Subject: Re: [PATCH] Makefile: Add support for user makefile params
Date: Fri, 4 Jul 2025 21:58:59 +0200	[thread overview]
Message-ID: <7dcf62c9-e670-454a-8c4b-37116479fb3b@kernel.org> (raw)
In-Reply-To: <585de3f6-c604-433c-bbce-8f686c6afb33@oracle.com>



On 04/07/2025 17.26, Chuck Lever wrote:
> On 7/4/25 7:26 AM, Daniel Gomez wrote:
>> From: Daniel Gomez <da.gomez@samsung.com>
>>
>> Introduce a params.mk file for user-defined Makefile parameters.
>> Users can refer to params.mk.sample to see the available configuration
>> options and create their own params.mk accordingly. When enabled via
>> Kconfig, a params.mk will be automatically generated at the specified
>> directory using the sample as a template. When enabled,
>> Makefile will attempt to include params.mk if it exists.
>>
>> Example: Enable Makefile verbosity and Ansible Verbosity Level 4.
>>
>> File: params.mk
>>
>> V = 1
>> AV = 4
>>
>> Signed-off-by: Daniel Gomez <da.gomez@samsung.com>
>> ---
>> We use GNU Make as a wrapper mainly for Kconfig and Ansible. In order
>> to assist kdevops users to change certain options we expose certain
>> features to the cli interface via Makefile parameters. A few examples
>> are the verbosity of the ansible-playbook command (-v, -vv...) via AV
>> parameter. Or the Linux tree git reference (Kconfig) to be used via
>> LINUX_TREE_REF. This seems convenient and has been increasing over time.
>> Enough parameters have been added than I personally tend to forget
>> the exact variable/argument/parameter names. For that, documentation
>> may be best but when using a large combination of these options, the
>> cli becomes inconvenient by itself. To help with command cli parameters,
>> this patch adds a file params.mk.sample that will generate a params.mk
>> (if it doesn't exist already) with all parameters disabled. But the file
>> will contain examples of how to use each of the options available via
>> cli interface. The main Makefile will parse this first and will make it
>> available as if the user would pass them through the command line making
>> it easier to handle, specially when multiple options are used.
>>
>> Thoughts?

I meant to send this as RFC but I forgot to change the prefix before sending.
I'll keep as is for the next iterations.

> 
> Why is a new Kconfig option needed? Instead, can the param.mk file
> either exist or not, and "make" will work either way?

I agree. At first, I had it disabled by default in the new Kconfig option. But
I don't see why not having always this feature (no kconfig needed). If the file
is not present then, it will create one based on the sample file and everything
would be comment it out.

> 
> 
> I'm glad to see the comments documenting each variable in the sample
> file. Some of these I did not know about before. Are they documented
> somewhere else as well? Having them all in one place is great.

I think documentation may be spread. But adding a standalone documentation file
for cli + the sample config is not incompatible. I'll work on that.

> 
> But, the use of "[ section name ]" suggests this file might be an
> INI file, though it's actually just "VAR = value" with comments. A
> block comment at the top that explains the format would be helpful,
> and perhaps find a different way of demarcating the sections.

Thanks for the suggestion and examples. Makes sense to me.


  reply	other threads:[~2025-07-04 19:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-04 11:26 [PATCH] Makefile: Add support for user makefile params Daniel Gomez
2025-07-04 15:26 ` Chuck Lever
2025-07-04 19:58   ` Daniel Gomez [this message]
2025-08-21  9:35 ` Daniel Gomez
2025-08-23 20:54   ` Luis Chamberlain
2025-08-25  8:01     ` Daniel Gomez
2025-08-27 20:34       ` Luis Chamberlain

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7dcf62c9-e670-454a-8c4b-37116479fb3b@kernel.org \
    --to=da.gomez@kernel.org \
    --cc=chuck.lever@oracle.com \
    --cc=da.gomez@samsung.com \
    --cc=kdevops@lists.linux.dev \
    --cc=mcgrof@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox