summaryrefslogtreecommitdiff
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-03-23 16:26:59 +0100
commit11e881a63821ea209bda509d1e502d9ba270782d (patch)
tree0bf4cddc87fcb084bb6d67016b5d8d64f8f99e79
parentf605cfc73d918c5ba38c988619e0a52472a589d8 (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>/ , but that seems to be the case. Change-Id: Iddc8fa2ec0842f181780f7491cf5a2244efd014a
-rwxr-xr-xautogen.sh7
-rw-r--r--solenv/gbuild/partial_build.mk2
2 files changed, 8 insertions, 1 deletions
diff --git a/autogen.sh b/autogen.sh
index f15dd91a534d..da967a420c9c 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -135,6 +135,13 @@ 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");
+ }
}
system ("$aclocal $aclocal_flags") && die "Failed to run aclocal";
unlink ("configure");
diff --git a/solenv/gbuild/partial_build.mk b/solenv/gbuild/partial_build.mk
index 68e807b97615..eb2b5ccee365 100644
--- a/solenv/gbuild/partial_build.mk
+++ b/solenv/gbuild/partial_build.mk
@@ -22,7 +22,7 @@ gb_Side:=host
endif
ifeq (,$(BUILDDIR))
-BUILDDIR := $(dir $(realpath $(lastword $(MAKEFILE_LIST))))../..
+BUILDDIR := $(dir $(abspath $(firstword $(MAKEFILE_LIST))))..
endif
ifeq ($(BUILD_TYPE),)