[include] ensure that profile Makefiles are sourced in alphabetical order
authorJo-Philipp Wich <jow@openwrt.org>
Mon, 23 Apr 2012 16:10:25 +0000 (16:10 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Mon, 23 Apr 2012 16:10:25 +0000 (16:10 +0000)
Since make 3.82 does not guarantee file ordering anymore, target profiles might
get included in random order, leading to bad default values when only selecting
the toplevel target and populating the .config with defconfig.
This commit should also fix the ar71xx snapshot builds.

SVN-Revision: 31449

include/target.mk

index 097b275cf2c9ecb93058482227784762659f61cf..e5166fb784e6e096c3740865805f3ed84ba26a63 100644 (file)
@@ -84,12 +84,12 @@ endif
 
 ifneq ($(PLATFORM_DIR),$(PLATFORM_SUBDIR))
   define IncludeProfiles
-    -include $(PLATFORM_DIR)/profiles/*.mk
-    -include $(PLATFORM_SUBDIR)/profiles/*.mk
+    -include $(sort $(wildcard $(PLATFORM_DIR)/profiles/*.mk))
+    -include $(sort $(wildcard $(PLATFORM_SUBDIR)/profiles/*.mk))
   endef
 else
   define IncludeProfiles
-    -include $(PLATFORM_DIR)/profiles/*.mk
+    -include $(sort $(wildcard $(PLATFORM_DIR)/profiles/*.mk))
   endef
 endif