summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2014-11-25 10:29:10 +0100
committerDavid Tardon <dtardon@redhat.com>2014-11-25 10:29:10 +0100
commit761e40251f23b2e66dfe86d329ed6345b272bd89 (patch)
tree2f1dae98133b74d50fa01beeda145082304acf1e
parenta9a81a23009b2fc9b1552f367cb04996a99bf704 (diff)
always use 1 as default for strip-components
Change-Id: Id5f22ac0f9fcfd7ab064111aec9abb00707d3e67
-rw-r--r--solenv/gbuild/UnpackedTarball.mk24
1 files changed, 1 insertions, 23 deletions
diff --git a/solenv/gbuild/UnpackedTarball.mk b/solenv/gbuild/UnpackedTarball.mk
index b9070b50391b..e2e3ce1bcd8a 100644
--- a/solenv/gbuild/UnpackedTarball.mk
+++ b/solenv/gbuild/UnpackedTarball.mk
@@ -15,28 +15,6 @@
# gb_UnpackedTarget_TARFILE_LOCATION
# NOTE: only for commands; targets should use TARFILE_LOCATION directly
-gb_UnpackedTarget_STRIP_COMPONENTS_TAR_DEFAULT := 1
-
-# Note that because of a bug in
-# gb_UnpackedTarget__get_strip_components, this _ZIP_DEFAULT is
-# actually not used, but the above _TAR_DEFAULT is used for .zip
-# archives, too.
-gb_UnpackedTarget_STRIP_COMPONENTS_ZIP_DEFAULT := 0
-
-# gb_UnpackedTarget__get_strip_components target strip-components?
-# Note: the suiffix function returns also the period, like ".zip",
-# so the condition below is never true. I don't dare fix this as this
-# stuff seems to work anyway by accident...
-define gb_UnpackedTarget__get_strip_components
-$(strip $(if $(2),\
- $(2),\
- $(if $(filter zip,$(suffix $(1))),\
- $(gb_UnpackedTarget_STRIP_COMPONENTS_ZIP_DEFAULT),\
- $(gb_UnpackedTarget_STRIP_COMPONENTS_TAR_DEFAULT) \
- ) \
-))
-endef
-
define gb_UnpackedTarget__command_untar
$(GNUTAR) \
-x \
@@ -96,7 +74,7 @@ $(call gb_UnpackedTarget_get_clean_target,%) :
define gb_UnpackedTarget_UnpackedTarget
$(call gb_UnpackedTarget_get_target,$(1)) : UNPACKED_DIR := $(2)
$(call gb_UnpackedTarget_get_target,$(1)) : UNPACKED_TARBALL := $(gb_UnpackedTarget_TARFILE_LOCATION)/$(1)
-$(call gb_UnpackedTarget_get_target,$(1)) : UNPACKED_STRIP_COMPONENTS := $(call gb_UnpackedTarget__get_strip_components,$(1),$(3))
+$(call gb_UnpackedTarget_get_target,$(1)) : UNPACKED_STRIP_COMPONENTS := $(if $(strip $(3)),$(strip $(3)),1)
$(call gb_UnpackedTarget_get_target,$(1)) : $(TARFILE_LOCATION)/$(1)
$(call gb_UnpackedTarget_get_target,$(1)) :| $(dir $(call gb_UnpackedTarget_get_target,$(1))).dir