fdo#72394 Don't endlessly expand $(share_subdir_name) into itself
The introduction of $(share_subdir_name) expanding to "share" in c6a73009 "Use subfolder names from <config_folders.h>" shows that SubstitutePathVariables::impl_reSubstituteVariables is fundamentally flawed in that it allows reducing variable occurrences even in variable names, so that it will expand an occurrence of "share" into an endless recursion of "$(share_subdir_name)" -> "$($(share_subdir_name)_subdir_name)" -> ... Adding $(share_subdir_name) to the list of variables that can only replace a complete path segment (delimited by "/"), from which it had erroneously been missing, "fixes" this problem for now. But the code is still wrong in at least two respects: * SubstitutePathVariables::impl_reSubstituteVariables arguably needs to be made more robust, to never reduce variable occurrences in variable names. * The compile-time variable LIBO_SHARE_FOLDER should not end up as a runtime framework path variable, esp. since accidentally re-substituting it for "share" segments in unrelated URLs like <file:///export/share/for-all> does not make sense. ac4e19f9 "fdo#68552: Don't (attempt to) do run-time expansion of build-time parameters" had already attempted a fix for that, but it had to be reverted again with 791a8b96 because it "Unfortunately does not work if BUILDDIR is different from SRCDIR." Change-Id: If214c179c0068fbaa475c1c9cac804d6a1dbb2dc
Showing
Please
register
or
sign in
to comment