From 95793fb9c7813de4faa2e4ab82128eb90a896e43 Mon Sep 17 00:00:00 2001 From: David Tardon Date: Mon, 27 Aug 2012 07:03:13 +0200 Subject: make the makefile dep more robust Change-Id: Iabf62eb089530dff97c0a920b2be9c239b02d5b8 --- solenv/gbuild/UnpackedTarball.mk | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'solenv') diff --git a/solenv/gbuild/UnpackedTarball.mk b/solenv/gbuild/UnpackedTarball.mk index 0bd912802278..44048a9ead71 100644 --- a/solenv/gbuild/UnpackedTarball.mk +++ b/solenv/gbuild/UnpackedTarball.mk @@ -167,6 +167,11 @@ $(call gb_UnpackedTarball_get_clean_target,%) : $(call gb_UnpackedTarball_get_dir,$*) \ ) +define gb_UnpackedTarball__get_makefile +$(lastword $(foreach makefile,$(MAKEFILE_LIST),$(if $(filter UnpackedTarball_%,$(notdir $(makefile))),$(makefile)))) + +endef + # Initialize unpacked tarball define gb_UnpackedTarball_UnpackedTarball_internal $(call gb_UnpackedTarball_get_target,$(1)) : UNPACKED_CXX_SUFFIX := @@ -177,7 +182,7 @@ $(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_POST_ACTION := -$(call gb_UnpackedTarball_get_preparation_target,$(1)) : $(lastword $(MAKEFILE_LIST)) +$(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_target,$(1)) : $(call gb_UnpackedTarball_get_preparation_target,$(1)) $(call gb_UnpackedTarball_get_target,$(1)) :| $(dir $(call gb_UnpackedTarball_get_target,$(1))).dir -- cgit