summaryrefslogtreecommitdiff
path: root/tail_build
diff options
context:
space:
mode:
Diffstat (limited to 'tail_build')
-rw-r--r--tail_build/Makefile12
1 files changed, 10 insertions, 2 deletions
diff --git a/tail_build/Makefile b/tail_build/Makefile
index c4a6356fada0..4773523fe957 100644
--- a/tail_build/Makefile
+++ b/tail_build/Makefile
@@ -25,13 +25,21 @@
#
#*************************************************************************
+# if no environment is set, try to find one, source it and re-exec
ifeq ($(strip $(SOLARENV)),)
-$(error No environment set!)
-endif
+
+all:
+ if test -f ./source_soenv.sh; then . ./source_soenv.sh; fi && \
+ if test -z "$${SOLARENV}"; then echo "No environment set!"; exit 1; fi && \
+ $(MAKE)
+
+else # SOLARENV
GBUILDDIR := $(SOLARENV)/gbuild
include $(GBUILDDIR)/gbuild.mk
$(eval $(call gb_Module_make_global_targets,$(SRC_ROOT)/Module_tail_build.mk))
+endif # SOLARENV
+
# vim: set noet sw=4 ts=4: