summaryrefslogtreecommitdiff
path: root/solenv
diff options
context:
space:
mode:
Diffstat (limited to 'solenv')
-rw-r--r--solenv/gbuild/gbuild.mk3
-rw-r--r--solenv/gbuild/gbuild_simple.mk2
-rw-r--r--solenv/gbuild/source_and_rerun.mk6
-rw-r--r--solenv/gbuild/templates/Makefile8
4 files changed, 14 insertions, 5 deletions
diff --git a/solenv/gbuild/gbuild.mk b/solenv/gbuild/gbuild.mk
index 9c7d1f757820..4634333cd49f 100644
--- a/solenv/gbuild/gbuild.mk
+++ b/solenv/gbuild/gbuild.mk
@@ -26,10 +26,11 @@
#
#*************************************************************************
+GBUILDDIR:=$(SRC_ROOT)/solenv/gbuild
+
# vars needed from the env/calling makefile
# DEBUG
-# GBUILDDIR
# INPATH
# JAVA_HOME
# JDKINCS
diff --git a/solenv/gbuild/gbuild_simple.mk b/solenv/gbuild/gbuild_simple.mk
index 35a2197a2ba0..aeac005e4bd4 100644
--- a/solenv/gbuild/gbuild_simple.mk
+++ b/solenv/gbuild/gbuild_simple.mk
@@ -26,6 +26,8 @@
#
#*************************************************************************
+GBUILDDIR:=$(SRC_ROOT)/solenv/gbuild
+
# this is a subset of gbuild functionality, for use in custom makefiles
COMMA :=,
diff --git a/solenv/gbuild/source_and_rerun.mk b/solenv/gbuild/source_and_rerun.mk
new file mode 100644
index 000000000000..937751f1e6c5
--- /dev/null
+++ b/solenv/gbuild/source_and_rerun.mk
@@ -0,0 +1,6 @@
+
+all:
+ @if test -f ./config.mk; then . ./config.mk; else if test -f ../config.mk ; then . ../config.mk; fi; fi && \
+ if test -f ./Env.Host.sh; then . ./Env.Host.sh; else if test -f ../Env.Host.sh; then . ../Env.Host.sh; fi ; fi && \
+ if test -z "$${SOLARENV}"; then echo "No environment set!" 2>&1; exit 1; fi && \
+ $(MAKE) $(MAKECMDGOALS)
diff --git a/solenv/gbuild/templates/Makefile b/solenv/gbuild/templates/Makefile
index 90947b2e5f48..78def2598caa 100644
--- a/solenv/gbuild/templates/Makefile
+++ b/solenv/gbuild/templates/Makefile
@@ -26,13 +26,13 @@
#*************************************************************************
ifeq ($(strip $(SOLARENV)),)
-$(error No environment set!)
-endif
+include ../solenv/gbuild/source_and_rerun.mk
+else
gb_PARTIALBUILD := T
-GBUILDDIR := $(SOLARENV)/gbuild
-include $(GBUILDDIR)/gbuild.mk
+include $(SOLARENV)/gbuild/gbuild.mk
$(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
+endif
# vim: set noet sw=4 ts=4: