autogen.sh: fix out-of-tree module Makefiles for Win32 make
These were created as symlinks, which doesn't work with Win32 make as it doesn't understand Cygwin symlinks. Instead, create them as actual files. Note: the reason why they work as symlinks at all is that the Makefile uses $(realpath) and partial_build.mk does not, so they can resolve relative paths from 2 different directories... Change-Id: I4a9abffae82561111a9525fb35ed4b174cc8d96a Reviewed-on: https://gerrit.libreoffice.org/56691 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
This commit is contained in:
parent
720d53ee66
commit
be1a2fb3ad
1 changed files with 9 additions and 2 deletions
11
autogen.sh
11
autogen.sh
|
@ -165,12 +165,18 @@ if ($src_path ne $build_path)
|
|||
{
|
||||
system ("ln -sf $src_path/configure.ac configure.ac");
|
||||
system ("ln -sf $src_path/g g");
|
||||
my $src_path_win=$src_path;
|
||||
if ($system =~ /CYGWIN.*/) {
|
||||
$src_path_win=`cygpath -m $src_path`;
|
||||
chomp $src_path_win;
|
||||
}
|
||||
my @modules = <$src_path/*/Makefile>;
|
||||
foreach my $module (@modules)
|
||||
{
|
||||
my $dir = basename (dirname ($module));
|
||||
mkdir ($dir);
|
||||
system ("ln -sf $src_path/$dir/Makefile $dir/Makefile");
|
||||
system ("rm $dir/Makefile");
|
||||
system ("printf 'module_directory:=$src_path_win/$dir/\ninclude \$(module_directory)/../solenv/gbuild/partial_build.mk\n' > $dir/Makefile");
|
||||
}
|
||||
my @external_modules = <$src_path/external/*/Makefile>;
|
||||
mkdir ("external");
|
||||
|
@ -179,7 +185,8 @@ if ($src_path ne $build_path)
|
|||
{
|
||||
my $dir = basename (dirname ($module));
|
||||
mkdir ("external/$dir");
|
||||
system ("ln -sf $src_path/external/$dir/Makefile external/$dir/Makefile");
|
||||
system ("rm external/$dir/Makefile");
|
||||
system ("printf 'module_directory:=$src_path_win/external/$dir/\ninclude \$(module_directory)/../../solenv/gbuild/partial_build.mk\n' > external/$dir/Makefile");
|
||||
}
|
||||
}
|
||||
system ("$aclocal $aclocal_flags") && die "Failed to run aclocal";
|
||||
|
|
Loading…
Reference in a new issue