replace config.guess and config.sub properly, even if they are in a subdirectory
authorFelix Fietkau <nbd@openwrt.org>
Tue, 5 Aug 2008 18:02:54 +0000 (18:02 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Tue, 5 Aug 2008 18:02:54 +0000 (18:02 +0000)
SVN-Revision: 12148

include/package-defaults.mk

index d72e02b1e0cf278575ebbf6fcc925fc9283b49f5..fd50cb4d81d9c569cefdada108843dd45bd21fba 100644 (file)
@@ -76,10 +76,13 @@ CONFIGURE_VARS = \
 CONFIGURE_PATH = .
 CONFIGURE_CMD = ./configure
 
+replace_script=$(FIND) $(1) -name $(2) | $(XARGS) -n1 cp $(SCRIPT_DIR)/$(2);
+
 define Build/Configure/Default
        (cd $(PKG_BUILD_DIR)/$(CONFIGURE_PATH)/$(strip $(3)); \
        if [ -x $(CONFIGURE_CMD) ]; then \
-               $(CP) $(SCRIPT_DIR)/config.{guess,sub} $(PKG_BUILD_DIR)/$(3)/ && \
+               $(call replace_script,$(PKG_BUILD_DIR)/$(3),config.guess) \
+               $(call replace_script,$(PKG_BUILD_DIR)/$(3),config.sub) \
                $(CONFIGURE_VARS) \
                $(2) \
                $(CONFIGURE_CMD) \