The "new" gbuild build system is picking up some age -- and some things bitrot. Initially gbuild had all its variables prefixed/namespaced with gb_... unless this was unavoidable. The rationale is that gb_ is not a lot to write extra and this: - prevents conflicts with shell environment variables, and thus prevents: -- conflicts with any of the tools using the environment in the build -- conflicts with environment vars from the users shell bleeding into the build - is more grep-able So unless there are very, very good reasons (like an external tool we are using in the build being hardcoded to a variable name) for a build system variable not to start with a gb_ prefix, it should. As a bonus, the var should ideally continue showing what part of the build system it belongs to (e.g. gb_CppunitTest_... or gb_Jar_...) to avoid hard to debug overlaps there as we are unfortunately in a project global namespace. Code pointer: solenv/gbuild/
JanI is default CC for Easy Hacks (Add Jan; remove LibreOffice Dev List from CC) [NinjaEdit]
Björn: it seems to me that this task is obsolete. I did find solenv/gbuild -name '*.mk' -exec grep --color 'define [^g]' {} + and there isn't really anything to do. Can you confirm?
variables can be defined also with "=" and ":=" not just "define"
although, most of the "="/":=" are target local variables, that are preceded by a makefile target, i.e. they are not global so shouldn't be a problem.
Sabyasachi Bhoi committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/3829c0c7db8768ca05f148e8f5c271ddb56d5bae Resolves: tdf#97046 ensure build system variables start with gb_ It will be available in 7.3.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
... okay i think these are the only ones that make sense to replace: solenv/gbuild/platform/com_MSC_class.mk:MSC_SUBSYSTEM_VERSION=$(COMMA)$(if $(fil ter AARCH64,$(CPUNAME)),6.02,6.01) solenv/gbuild/extensions/pre_MergedLibsList.mk:MERGE_LIBRARY_LIST := \ solenv/gbuild/Output.mk:KNOWN_TERM:=Eterm aterm gnome kterm linux putty rxvt rxv t-unicode screen xterm xterm xtermc cygwin there's a bunch more that are meant to be set on the make commandline, best not to change those.
Arjun committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/1cc2690fe2f87e8acce4e9b4e0cb533fda26e295 tdf#97046 prefix gb_ to system variables It will be available in 7.4.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.