From be1a2fb3ad0e5a7a364886a83c9bdc895717cdfd Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Fri, 29 Jun 2018 15:44:09 +0200 Subject: 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 --- autogen.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/autogen.sh b/autogen.sh index 20976ce66d3f..1f3bb813fbbf 100755 --- a/autogen.sh +++ b/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"; -- cgit