autogen.sh | 6 ++++++
1 file changed, 6 insertions(+)
New commits:
commit 17c4536ebd342bb917df0f5978b1b1b7281ef2b9
Author: Christian Lohmaier <[email protected]>
AuthorDate: Mon Oct 14 14:10:37 2024 +0200
Commit: Christian Lohmaier <[email protected]>
CommitDate: Mon Oct 14 19:48:15 2024 +0200
wsl-as-helper: fix paths to module/Makefile in builddir!=srcdir case
while regular "make module" commands don't make use of those Makefiles
(and instead cd to $srcdir/module before running make there), some
users run "make -C module -rs SUBTARGET" in which case they would be
read.
autogen.sh did create wsl-style paths that the windows side can't
resolve. So make sure to convert them to windows-style paths when
running inside wsl with ming64 in path (=autogen is running inside wsl,
but was started from windows-side, to distinguish from the case where
autogen is started from within wsl to create a linux build)
Change-Id: I0b3d9fda9bc22ebd27edaaad75233a84b33e61c5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174900
Reviewed-by: Christian Lohmaier <[email protected]>
Tested-by: Jenkins
diff --git a/autogen.sh b/autogen.sh
index 21c21c743a84..889bb463b830 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -173,6 +173,12 @@ if ($src_path ne $build_path)
$src_path_win=`cygpath -m $src_path`;
chomp $src_path_win;
}
+ # wsl-as-helper method: autogen.sh/configure runs within a wsl-container
(WSL_DISTRO_NAME)
+ # and build is run from within git-bash (that adds .../Git/mingw64/bin to
PATH)
+ if ($ENV{WSL_DISTRO_NAME} && $ENV{PATH} =~ /mingw64/) {
+ $src_path_win=`wslpath -m $src_path`;
+ chomp $src_path_win;
+ }
my @modules = <$src_path/*/Makefile>;
foreach my $module (@modules)
{