diff options
author | David Tardon <dtardon@redhat.com> | 2017-09-29 10:49:22 +0200 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2017-10-04 08:12:21 +0200 |
commit | 4b5574ef48a4745a2073ca1b7c50169fdc83b068 (patch) | |
tree | 5283a04fedcadfcd0ae2a501817ab2bf0b2fe767 /solenv/gbuild/UnpackedTarball.mk | |
parent | 81fee9ab4c4630da4a3346958fba4df63ce5ef27 (diff) |
simplify updating of config.* in bundled projects
Change-Id: I2028bb9664caf9b9c09d22cc766f88094c92b95f
Reviewed-on: https://gerrit.libreoffice.org/42940
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: David Tardon <dtardon@redhat.com>
Diffstat (limited to 'solenv/gbuild/UnpackedTarball.mk')
-rw-r--r-- | solenv/gbuild/UnpackedTarball.mk | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/solenv/gbuild/UnpackedTarball.mk b/solenv/gbuild/UnpackedTarball.mk index 49403a474a76..9654d42fe2de 100644 --- a/solenv/gbuild/UnpackedTarball.mk +++ b/solenv/gbuild/UnpackedTarball.mk @@ -15,6 +15,9 @@ # gb_UnpackedTarget_TARFILE_LOCATION # NOTE: only for commands; targets should use TARFILE_LOCATION directly +# Location of internal copies of config.{guess,sub}. +gb_UnpackedTarball_CONFIGDIR := $(GBUILDDIR) + define gb_UnpackedTarget__command_untar $(GNUTAR) \ -x \ @@ -139,6 +142,9 @@ $(call gb_Helper_abbreviate_dirs,\ done && \ ) \ $(foreach file,$(UNPACKED_FIX_EOL),$(call gb_UnpackedTarball_CONVERTTODOS,$(file)) && ) \ + $(foreach confdir,$(UNPACKED_CONFIG_DIRS),\ + cp -f $(gb_UnpackedTarball_CONFIGDIR)/config.guess $(gb_UnpackedTarball_CONFIGDIR)/config.sub $(confdir) && \ + ) \ $(if $(UNPACKED_POST_ACTION),\ $(UNPACKED_POST_ACTION) && \ ) \ @@ -190,6 +196,7 @@ $(call gb_UnpackedTarball_get_target,$(1)) : UNPACKED_PATCHLEVEL := $(gb_Unpacke $(call gb_UnpackedTarball_get_target,$(1)) : UNPACKED_PATCHFLAGS := $(call gb_UnpackedTarball_get_target,$(1)) : UNPACKED_POST_ACTION := $(call gb_UnpackedTarball_get_target,$(1)) : UNPACKED_PRE_ACTION := +$(call gb_UnpackedTarball_get_target,$(1)) : UNPACKED_CONFIG_DIRS := $(call gb_UnpackedTarball_get_preparation_target,$(1)) : $(gb_Module_CURRENTMAKEFILE) $(call gb_UnpackedTarball_get_preparation_target,$(1)) :| $(dir $(call gb_UnpackedTarball_get_target,$(1))).dir @@ -396,6 +403,23 @@ $(foreach file,$(2),$(call gb_UnpackedTarball_mark_output_file,$(1),$(file))) endef +# Replace project's config.{guess,sub} files by internal copies +# +# This is useful if the project's config files are outdated and don't +# allow build on some new arch. The internal copies are located at +# gb_UnpackedTarball_CONFIGDIR. +# +# If the configs are placed somewhere else than in the top-level dir of +# the project, pass the (relative) dir as second argument. (It can even +# be a list of dirs, if the project contains multiple subprojects, each +# with its own configure.) +# +# gb_UnpackedTarball_update_autoconf_configs unpacked dirs(s)? +define gb_UnpackedTarball_update_autoconf_configs +$(call gb_UnpackedTarball_get_target,$(1)) : UNPACKED_CONFIG_DIRS += $(if $(strip $(2)),$(2),.) + +endef + # force the rebuild of an external target # this only works when running as partial build. # |