From ff8bdefef993fbe48660e8bc6d3aff7a52b9fa94 Mon Sep 17 00:00:00 2001 From: Michael Olbrich Date: Thu, 11 Nov 2010 11:59:32 +0100 Subject: [rules] reverse order when including pre/post rules This fixes a bug introduced by 9333a284047a6c5551fdd1bff006fd51b3948422 ${PTXDIST_TOPDIR}/rules/pre/ was included last makeing it impossible to overwrite variables with files in ${PTXDIST_WORKSPACE}/rules/pre/ Signed-off-by: Michael Olbrich (cherry picked from commit a1f643c5c863e940cd50ab278b51bb0a20fc25d1) Signed-off-by: Michael Olbrich --- rules/other/Definitions.make | 4 ++++ rules/other/Toplevel.make | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/rules/other/Definitions.make b/rules/other/Definitions.make index a76956dae..da6132288 100644 --- a/rules/other/Definitions.make +++ b/rules/other/Definitions.make @@ -56,5 +56,9 @@ define tr_sh $(strip $(shell echo $(1) | sed 'y%*+%pp%;s%[^_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789]%_%g')) endef +define reverse +$(if $(1),$(call reverse,$(wordlist 2,$(words $(1)),$(1)))) $(firstword $(1)) +endef + # vim600:set foldmethod=marker: # vim600:set syntax=make: diff --git a/rules/other/Toplevel.make b/rules/other/Toplevel.make index 6f1616bac..35c2c272d 100644 --- a/rules/other/Toplevel.make +++ b/rules/other/Toplevel.make @@ -39,7 +39,7 @@ include $(PTX_MAP_ALL_MAKE) include $(RULESDIR)/other/Namespace.make # might be non existent -include $(wildcard $(addsuffix /*.make,$(subst :,$(space),$(PTXDIST_PATH_PRERULES)))) +include $(wildcard $(addsuffix /*.make,$(call reverse,$(subst :,$(space),$(PTXDIST_PATH_PRERULES))))) include $(PTX_DGEN_DEPS_PRE) include $(PTX_DGEN_RULESFILES_MAKE) @@ -95,7 +95,7 @@ PTX_PACKAGES_INSTALL := \ $(PACKAGES-b) # might be non existent -include $(wildcard $(addsuffix /*.make,$(subst :,$(space),$(PTXDIST_PATH_POSTRULES)))) +include $(wildcard $(addsuffix /*.make,$(call reverse,$(subst :,$(space),$(PTXDIST_PATH_POSTRULES))))) # install_alternative and install_copy has some configuration defined # dependencies. include the files specifying these dependencies. include $(wildcard $(STATEDIR)/*.deps) -- cgit v1.2.3