Re: [poky] Best practice to share constants between C code and recipes

Khem Raj <[email protected]>
Newsgroups org.yoctoproject.lists.poky
Message-ID <CAMKF1srvJjcFmcD3t0Pdi0V2Ub6ufYwbiX0cEa9vqOtNv9rxeg@mail.gmail.com>
On Fri, May 17, 2024 at 5:55 PM maude007 via lists.yoctoproject.org
<[email protected]> wrote:
>
> Hello,
>
> A project uses GUIDs. They are constant string values. The values are used:
> - in several recipes do_install() function to generate xml files
> - in another recipe where the GUIDs are used in C code
>
> What is the best practice to manage these constants so they are centralized in a single file? Is it OK to put them in a bitbake .inc file, then generate a C header file at build time? Are dependencies managed correctly in that case? Changing the .inc file should trigger rebuilding of the C code.
>
> Thanks in advance for any suggestions

you might want to look into useradd-staticids class -
https://docs.yoctoproject.org/ref-manual/classes.html?highlight=useradd+staticids#ref-classes-useradd

> Best regards
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#13356): https://lists.yoctoproject.org/g/poky/message/13356
> Mute This Topic: https://lists.yoctoproject.org/mt/106165043/1997914
> Group Owner: [email protected]
> Unsubscribe: https://lists.yoctoproject.org/g/poky/unsub [[email protected]]
> -=-=-=-=-=-=-=-=-=-=-=-
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.