diff options
-rwxr-xr-x | autogen.sh | 16 | ||||
-rw-r--r-- | solenv/gbuild/partial_build.mk | 5 |
2 files changed, 20 insertions, 1 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"); diff --git a/solenv/gbuild/partial_build.mk b/solenv/gbuild/partial_build.mk index 68e807b97615..4d5e1db89b7d 100644 --- a/solenv/gbuild/partial_build.mk +++ b/solenv/gbuild/partial_build.mk @@ -22,7 +22,10 @@ gb_Side:=host endif ifeq (,$(BUILDDIR)) -BUILDDIR := $(dir $(realpath $(lastword $(MAKEFILE_LIST))))../.. +gb_partial_build__makefile_dir=$(dir $(abspath $(firstword $(MAKEFILE_LIST)))) +BUILDDIR := $(if $(wildcard $(gb_partial_build__makefile_dir)../Module_external.mk), \ + $(gb_partial_build__makefile_dir)../.., \ + $(gb_partial_build__makefile_dir)..) endif ifeq ($(BUILD_TYPE),) |