summaryrefslogtreecommitdiff
path: root/autogen.sh
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2014-03-23 16:21:51 +0100
committerLuboš Luňák <l.lunak@collabora.com>2014-04-23 18:50:20 +0200
commit2bf2bc2c7f257a818f3f723780690450f1a22c50 (patch)
treecdd1642dfd5e3e6631049ac607134e01ea3ec996 /autogen.sh
parent129f9c4c39b37eaddbd51838627973744854bdf9 (diff)
make it possible to do 'make -C sw/' even with builddir!=srcdir
The change in partial_build.mk assumes all the Makefile's using it are in builddir/<module>/ or builddir/external/<module> , these are differentiated by checking for ../External_module.mk . Change-Id: Iddc8fa2ec0842f181780f7491cf5a2244efd014a
Diffstat (limited to 'autogen.sh')
-rwxr-xr-xautogen.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/autogen.sh b/autogen.sh
index f15dd91a534d..6894a8ee9c7c 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -135,6 +135,22 @@ if ($src_path ne $build_path)
{
system ("ln -sf $src_path/configure.ac configure.ac");
system ("ln -sf $src_path/g g");
+ 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");
+ }
+ my @external_modules = <$src_path/external/*/Makefile>;
+ mkdir ("external");
+ system ("ln -sf $src_path/external/Module_external.mk external/");
+ foreach my $module (@external_modules)
+ {
+ my $dir = basename (dirname ($module));
+ mkdir ("external/$dir");
+ system ("ln -sf $src_path/external/$dir/Makefile external/$dir/Makefile");
+ }
}
system ("$aclocal $aclocal_flags") && die "Failed to run aclocal";
unlink ("configure");