diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2011-11-16 06:14:27 -0600 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2011-11-16 06:18:54 -0600 |
commit | 0ea8c014ef44695d0fd94f8738654e123e154cc0 (patch) | |
tree | cba63bc66aea56290c24569477ee87185d017077 /solenv | |
parent | 9d76072055074cdd4bbd29ce6ba33c9499509fff (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')
-rw-r--r-- | solenv/gbuild/gbuild.mk | 3 | ||||
-rw-r--r-- | solenv/gbuild/gbuild_simple.mk | 2 | ||||
-rw-r--r-- | solenv/gbuild/source_and_rerun.mk | 6 | ||||
-rw-r--r-- | solenv/gbuild/templates/Makefile | 8 |
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: |