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 <lohmaier+LibreOffice@googlemail.com>
Tested-by: Jenkins
This commit is contained in:
Christian Lohmaier 2024-10-14 14:10:37 +02:00
parent 8afc6cb5aa
commit 17c4536ebd

View file

@ -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)
{