[PATCH] waf: Add --rtems-version as a configure option

Chris Johns chrisj at rtems.org
Sun Nov 14 22:42:25 UTC 2021


> On 14 Nov 2021, at 11:15 pm, Sebastian Huber
> <sebastian.huber at embedded-brains.de> wrote:
>
> On 14/11/2021 04:07, chrisj at rtems.org wrote:
>> From: Chris Johns <chrisj at rtems.org>
>> - Provide the option `--rtems-version` to set the major version
>>   number
>> - Add a method to handle setting action values
>> - Return the spec YAML file back to it's original values
>>   as it does not allow a user to change the version.
>> Closes #4548
>
> I would simply revert the optvermaj.yml patch with "git revert".

Ok. 

> I don't like the special case approach which violates one design principle of
> the build system that the wcript should know the absolute minimum of the
> layout of the build specification.

This alternative moves that knowledge out into all sorts of support tools. Is
that what you want?

I think the same command line interface (--rtems-version) used else where for
this option would be good.

> My preferred solution would be that the build item defines that it can be
> modified by a command line option, for example:
>
> ./waf configure --rtems-set-value=__RTEMS_MAJOR__=7

Does this option as stated here contradict the idea of the build system being
specified? I see strength in the spec files and I am not sure about a generic
approach. I think the less that can change the better. And if you need change
the spec files to use the value what does it offer?

We need to change the version and a specific option exposes as narrow an
interface as possible.

> In spec/build/cpukit/optvermaj.yml:
>
> actions:
> - get-string-option: '6'
> - env-assign
>
> With this approach you don't give the user the ability to change everything.
> However, what can be change is defined by the build specification and not the
> wscript.

I understand the reason however you would need to implement it to show how it is
done? Can we internally do:

 set_value("__RTEMS_MAJOR__", ctx.options.rtems_version)

? I do not understand the how to make the change and then manage the sequence
via the actions. 

Chris


More information about the devel mailing list