On Friday, 29 May 2026 20:24:30 CEST Jakub Kicinski wrote: > > > To be clear, definitely a move in the right direction. I hope we can > > > move _all the way_ in the right direction, tho, without still defining > > > OOT-feeling version.h file with a dedicated BATADV_SOURCE_VERSION > > > > version.c and version.h are there to not recompile more parts of batman-adv > > than necessary when the linux kernel version changes. Has nothing to do > > with OOT. If you consider this a no-go, I can also just place > > generated/utsrelease.h + UTS_RELEASE in the three different files. > > Ah! My bad, sorry for the accusation! 🙂 > > The re-compilation thing is annoying but it's solvable. > Please TAL at commit 3f9ed5f5aa9ecffd2 for inspiration.
Interesting, didn't knew about it. This should work for the in-function ones and avoids the const batadv_version string + version.h. https://git.open-mesh.org/batadv.git/commit/?id=6f864eb5cfd8315b8f9a29167263282fe4593f3a Now we are left with version.c. MODULE_VERSION doesn't accept "dynamically generated" strings for obvious reasons. Which could be handled via: * MODULE_VERSION(UTS_RELEASE) in version.c (keeping it in a separate file) * MODULE_VERSION(UTS_RELEASE) in main.c (requires recompilation of main.c) * MODULE_VERSION($STATIC_STRING) in main.c (then somebody needs to come up with one) * something else What would you prefer? Regards, Sven
signature.asc
Description: This is a digitally signed message part.
