summaryrefslogtreecommitdiff
path: root/solenv/gbuild/source_and_rerun.mk
diff options
context:
space:
mode:
authorNorbert Thiebaud <nthiebaud@gmail.com>2011-11-16 06:14:27 -0600
committerNorbert Thiebaud <nthiebaud@gmail.com>2011-11-16 06:18:54 -0600
commit0ea8c014ef44695d0fd94f8738654e123e154cc0 (patch)
treecba63bc66aea56290c24569477ee87185d017077 /solenv/gbuild/source_and_rerun.mk
parent9d76072055074cdd4bbd29ce6ba33c9499509fff (diff)
tweak gbuild standart Makefile to allow partial build in unsourced env
This allow to run make in a module wihtout the need to source Env.Host.sh.
Diffstat (limited to 'solenv/gbuild/source_and_rerun.mk')
-rw-r--r--solenv/gbuild/source_and_rerun.mk6
1 files changed, 6 insertions, 0 deletions
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)