summaryrefslogtreecommitdiff
path: root/autogen.sh
diff options
context:
space:
mode:
authorMichael Stahl <Michael.Stahl@cib.de>2018-06-29 15:44:09 +0200
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2018-06-30 00:22:31 +0200
commitbe1a2fb3ad0e5a7a364886a83c9bdc895717cdfd (patch)
treeb29ff4069fcd9dd3618216fdcdbf1b0ea4da1ae9 /autogen.sh
parent720d53ee663edf26b3e5bb29560c89bcc42aed3a (diff)
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>
Diffstat (limited to 'autogen.sh')
-rwxr-xr-xautogen.sh11
1 files 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";