cleanup
[openwrt.git] / toolchain / kernel-headers / Makefile
index 7897b10..6e02fe9 100644 (file)
@@ -12,6 +12,7 @@ BUILD_DIR := $(KERNEL_BUILD_DIR)
 STAGING_DIR_HOST:=$(TOOLCHAIN_DIR)
 BUILD_DIR_HOST:=$(BUILD_DIR_TOOLCHAIN)
 override QUILT:=
+override CONFIG_AUTOREBUILD=
 
 include $(INCLUDE_DIR)/kernel.mk
 
@@ -32,9 +33,11 @@ define Build/Configure/cris
 endef
 
 define Build/Configure/powerpc
-       $(CP) $(PKG_BUILD_DIR)/include/asm-ppc/* $(PKG_BUILD_DIR)/include/asm-powerpc/
-       rm -rf $(PKG_BUILD_DIR)/include/asm-ppc
-       ln -s $(PKG_BUILD_DIR)/include/asm-powerpc $(PKG_BUILD_DIR)/include/asm-ppc
+       if [ -d $(PKG_BUILD_DIR)/include/asm-ppc ]; then \
+               $(CP) $(PKG_BUILD_DIR)/include/asm-ppc/* $(PKG_BUILD_DIR)/include/asm-powerpc/; \
+               rm -rf $(PKG_BUILD_DIR)/include/asm-ppc; \
+               ln -s $(PKG_BUILD_DIR)/include/asm-powerpc $(PKG_BUILD_DIR)/include/asm-ppc; \
+       fi
 endef
 
 ifneq (,$(findstring uml,$(BOARD)))
@@ -52,6 +55,11 @@ define Build/Prepare
        ln -sf linux-$(LINUX_VERSION) $(LINUX_HEADERS_DIR)
        yes '' | $(KMAKE) oldconfig
        $(KMAKE) include/linux/version.h include/asm
+       if [ -d $(PKG_BUILD_DIR)/arch/$(LINUX_KARCH)/include/asm ]; then \
+               $(CP) \
+                       $(PKG_BUILD_DIR)/arch/$(LINUX_KARCH)/include/asm/. \
+                       $(PKG_BUILD_DIR)/include/asm-$(LINUX_KARCH)/; \
+       fi
        $(call Build/Configure/$(ARCH))
 endef
 
This page took 0.020217 seconds and 4 git commands to generate.