summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2010-11-11 11:59:32 +0100
committerMichael Olbrich <m.olbrich@pengutronix.de>2010-11-12 08:31:32 +0100
commitff8bdefef993fbe48660e8bc6d3aff7a52b9fa94 (patch)
tree7c1b47784bdd15a9eb8df8807a9baec2b03abdfb
parentd1355b60202628e2ee8dc3b55f5829586b3f6234 (diff)
downloadptxdist-ff8bdefef993fbe48660e8bc6d3aff7a52b9fa94.tar.gz
ptxdist-ff8bdefef993fbe48660e8bc6d3aff7a52b9fa94.tar.xz
[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 <m.olbrich@pengutronix.de> (cherry picked from commit a1f643c5c863e940cd50ab278b51bb0a20fc25d1) Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rw-r--r--rules/other/Definitions.make4
-rw-r--r--rules/other/Toplevel.make4
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)