diff options
author | Michael Stahl <mstahl@redhat.com> | 2013-03-14 11:59:21 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2013-03-14 12:16:07 +0100 |
commit | 6594838457152b2fa53382ac11b383d2adc1f8da (patch) | |
tree | 5675faa7a63de23c16c597679138405bc8f7ccab | |
parent | b986c5076c0489e690b07e289b67f035b545d04e (diff) |
gbuild: move MSC specific wrapper stuff to platform/
That's where code conditional on COM or OS belongs.
Change-Id: Id31378bcc840dc38aa4b64241f0d1ccc11a99792
-rw-r--r-- | solenv/gbuild/ExternalProject.mk | 26 | ||||
-rw-r--r-- | solenv/gbuild/platform/com_GCC_class.mk | 4 | ||||
-rw-r--r-- | solenv/gbuild/platform/com_MSC_class.mk | 18 |
3 files changed, 25 insertions, 23 deletions
diff --git a/solenv/gbuild/ExternalProject.mk b/solenv/gbuild/ExternalProject.mk index e1800148f854..811a5d34c25d 100644 --- a/solenv/gbuild/ExternalProject.mk +++ b/solenv/gbuild/ExternalProject.mk @@ -180,38 +180,18 @@ $(call gb_ExternalProject_get_preparation_target,$(1)) : \ endef -# Use the gcc wrappers for a autoconf based project -# -# gb_ExternalProject_register_targets project state_target -define gb_ExternalProject_use_autoconf -ifeq ($(COM),MSC) -$(call gb_ExternalProject_get_preparation_target,$(1)) : $(call gb_Executable_get_runtime_dependencies,gcc-wrapper) \ - $(call gb_Executable_get_runtime_dependencies,g++-wrapper) -$(call gb_ExternalProject_get_state_target,$(1),$(2)): WRAPPERS := $(AUTOCONF_WRAPPERS) -endif -endef - # Run a target command # -# This provide a wrapper that cange to the right directory -# touch the 'target' if sucessfull and also provide +# This provides a wrapper that changes to the right directory, +# touches the 'target' if sucessful and also provides # the ability to hide the output if there is no failure # gb_ExternalProject_run,run_target,command,optional_extra_sub_directory,optional_log_filename) # default log_filename is <run_target>.log # -ifeq ($(COM),MSC) -AUTOCONF_WRAPPERS := \ - REAL_CC="$(shell cygpath -w $(CC))" \ - CC="$(call gb_Executable_get_target,gcc-wrapper)" \ - REAL_CXX="$(shell cygpath -w $(CXX))" \ - CXX="$(call gb_Executable_get_target,g++-wrapper)" \ - LD="$(shell cygpath -w $(COMPATH)/bin/link.exe) -nologo" -endif - define gb_ExternalProject_run $(call gb_Helper_print_on_error,cd $(EXTERNAL_WORKDIR)/$(3) && \ - $(if $(filter MSC,$(COM)),$(if $(WRAPPERS),export $(WRAPPERS) &&)) \ + $(if $(WRAPPERS),export $(WRAPPERS) &&) \ $(2) && touch $@,$(EXTERNAL_WORKDIR)/$(if $(3),$(3)/,)$(if $(4),$(4),$(1).log)) endef diff --git a/solenv/gbuild/platform/com_GCC_class.mk b/solenv/gbuild/platform/com_GCC_class.mk index b177dae9446d..6d068d7e086e 100644 --- a/solenv/gbuild/platform/com_GCC_class.mk +++ b/solenv/gbuild/platform/com_GCC_class.mk @@ -268,4 +268,8 @@ $(call gb_Helper_abbreviate_dirs,\ endef endif +# ExternalProject class + +gb_ExternalProject_use_autoconf := + # vim: set noet sw=4 ts=4: diff --git a/solenv/gbuild/platform/com_MSC_class.mk b/solenv/gbuild/platform/com_MSC_class.mk index 99ac77caed2c..27211ef89085 100644 --- a/solenv/gbuild/platform/com_MSC_class.mk +++ b/solenv/gbuild/platform/com_MSC_class.mk @@ -539,6 +539,24 @@ $(call gb_InstallModuleTarget_add_defs,$(1),\ endef +# ExternalProject class + +# Use the gcc wrappers for a autoconf based project +# +# gb_ExternalProject_register_targets project state_target +define gb_ExternalProject_use_autoconf +$(call gb_ExternalProject_get_preparation_target,$(1)) : $(call gb_Executable_get_runtime_dependencies,gcc-wrapper) \ + $(call gb_Executable_get_runtime_dependencies,g++-wrapper) +$(call gb_ExternalProject_get_state_target,$(1),$(2)): WRAPPERS := $(gb_AUTOCONF_WRAPPERS) +endef + +gb_AUTOCONF_WRAPPERS := \ + REAL_CC="$(shell cygpath -w $(CC))" \ + CC="$(call gb_Executable_get_target,gcc-wrapper)" \ + REAL_CXX="$(shell cygpath -w $(CXX))" \ + CXX="$(call gb_Executable_get_target,g++-wrapper)" \ + LD="$(shell cygpath -w $(COMPATH)/bin/link.exe) -nologo" + # InstallScript class gb_InstallScript_EXT := .inf |