Kaydet (Commit) 86423d68 authored tarafından Matúš Kukan's avatar Matúš Kukan

gbuild: add gb_UnpackedTarball_copy_header_files for external headers

Change-Id: Iaf6908ede1d06a7b36eca8f16f44716181428ce8
üst 38cc4f7f
...@@ -307,5 +307,6 @@ gb_StaticLibrary_OUTDIRLOCATION = $(OUTDIR)/lib ...@@ -307,5 +307,6 @@ gb_StaticLibrary_OUTDIRLOCATION = $(OUTDIR)/lib
# static variables declared here because they are used globally # static variables declared here because they are used globally
gb_SDFLOCATION := $(WORKDIR)/CustomTarget/translations/translate/sdf gb_SDFLOCATION := $(WORKDIR)/CustomTarget/translations/translate/sdf
gb_EXTERNAL_HEADERS_DIR := $(OUTDIR)/inc/external
# vim: set noet sw=4: # vim: set noet sw=4:
...@@ -136,6 +136,9 @@ $(call gb_Helper_abbreviate_dirs,\ ...@@ -136,6 +136,9 @@ $(call gb_Helper_abbreviate_dirs,\
mkdir -p $(sort $(dir $(UNPACKED_DESTFILES))) && \ mkdir -p $(sort $(dir $(UNPACKED_DESTFILES))) && \
$(call gb_UnpackedTarball__copy_files,$(UNPACKED_FILES),$(UNPACKED_DESTFILES)) && \ $(call gb_UnpackedTarball__copy_files,$(UNPACKED_FILES),$(UNPACKED_DESTFILES)) && \
) \ ) \
$(if $(UNPACKED_SUBDIRS),\
cp -rf $(UNPACKED_SUBDIRS) $(gb_EXTERNAL_HEADERS_DIR) && \
) \
$(if $(UNPACKED_POST_ACTION),\ $(if $(UNPACKED_POST_ACTION),\
$(UNPACKED_POST_ACTION) && \ $(UNPACKED_POST_ACTION) && \
) \ ) \
...@@ -160,6 +163,7 @@ $(call gb_UnpackedTarball_get_clean_target,%) : ...@@ -160,6 +163,7 @@ $(call gb_UnpackedTarball_get_clean_target,%) :
$(call gb_UnpackedTarball_get_target,$*) \ $(call gb_UnpackedTarball_get_target,$*) \
$(call gb_UnpackedTarball_get_preparation_target,$*) \ $(call gb_UnpackedTarball_get_preparation_target,$*) \
$(call gb_UnpackedTarball_get_dir,$*) \ $(call gb_UnpackedTarball_get_dir,$*) \
$(foreach subdir,$(UNPACKED_SUBDIRS),$(gb_EXTERNAL_HEADERS_DIR)/$(subdir)) \
) )
define gb_UnpackedTarball__get_makefile define gb_UnpackedTarball__get_makefile
...@@ -175,6 +179,8 @@ $(call gb_UnpackedTarball_get_target,$(1)) : UNPACKED_FIX_EOL := ...@@ -175,6 +179,8 @@ $(call gb_UnpackedTarball_get_target,$(1)) : UNPACKED_FIX_EOL :=
$(call gb_UnpackedTarball_get_target,$(1)) : UNPACKED_PATCHES := $(call gb_UnpackedTarball_get_target,$(1)) : UNPACKED_PATCHES :=
$(call gb_UnpackedTarball_get_target,$(1)) : UNPACKED_PATCHLEVEL := $(gb_UnpackedTarball_PATCHLEVEL_DEFAULT) $(call gb_UnpackedTarball_get_target,$(1)) : UNPACKED_PATCHLEVEL := $(gb_UnpackedTarball_PATCHLEVEL_DEFAULT)
$(call gb_UnpackedTarball_get_target,$(1)) : UNPACKED_POST_ACTION := $(call gb_UnpackedTarball_get_target,$(1)) : UNPACKED_POST_ACTION :=
$(call gb_UnpackedTarball_get_target,$(1)) : UNPACKED_SUBDIRS :=
$(call gb_UnpackedTarball_get_clean_target,$(1)) : UNPACKED_SUBDIRS :=
$(call gb_UnpackedTarball_get_preparation_target,$(1)) : $(call gb_UnpackedTarball__get_makefile) $(call gb_UnpackedTarball_get_preparation_target,$(1)) : $(call gb_UnpackedTarball__get_makefile)
$(call gb_UnpackedTarball_get_preparation_target,$(1)) :| $(dir $(call gb_UnpackedTarball_get_target,$(1))).dir $(call gb_UnpackedTarball_get_preparation_target,$(1)) :| $(dir $(call gb_UnpackedTarball_get_target,$(1))).dir
...@@ -264,6 +270,19 @@ $(foreach file,$(3),$(call gb_UnpackedTarball_add_file,$(1),$(2)/$(notdir $(file ...@@ -264,6 +270,19 @@ $(foreach file,$(3),$(call gb_UnpackedTarball_add_file,$(1),$(2)/$(notdir $(file
endef endef
# Copy header files from the unpacked subdir(s) to solver
#
# Used for boost.
# For other external headers, include path is added in RepositoryExternal.mk
#
# gb_UnpackedTarball_copy_header_files unpacked subdir(s)
define gb_UnpackedTarball_copy_header_files
$(call gb_UnpackedTarball_get_target,$(1)) :| $(gb_EXTERNAL_HEADERS_DIR)/.dir
$(call gb_UnpackedTarball_get_target,$(1)) : UNPACKED_SUBDIRS := $(2)
$(call gb_UnpackedTarball_get_clean_target,$(1)) : UNPACKED_SUBDIRS := $(2)
endef
# Set arbitrary shell command to be run during unpack # Set arbitrary shell command to be run during unpack
# #
# The command is run at the very end: after patching, C++ extension # The command is run at the very end: after patching, C++ extension
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment