Add menuconfig option for enabling profiling in the kernel.
[openwrt/svn-archive/archive.git] / include / quilt.mk
index c569231173ed63cc0ab0890ed330a7c0e2e524fc..8a63442dd2ae0aa00eb09e60f69ffede68acb036 100644 (file)
@@ -66,9 +66,10 @@ define Build/Patch/Default
        $(call PatchDir,$(PATCH_DIR),)
 endef
 
+kernel_files=$(foreach fdir,$(GENERIC_FILES_DIR) $(FILES_DIR),$(fdir)/.)
 define Kernel/Patch/Default
        rm -rf $(PKG_BUILD_DIR)/patches; mkdir -p $(PKG_BUILD_DIR)/patches
-       $(CP) $(foreach fdir,$(GENERIC_FILES_DIR) $(FILES_DIR),$(fdir)/.) $(LINUX_DIR)/
+       $(if $(kernel_files),$(CP) $(kernel_files) $(LINUX_DIR)/)
        find $(LINUX_DIR)/ -name \*.rej -or -name \*.orig | $(XARGS) rm -f
        $(call PatchDir,$(GENERIC_PATCH_DIR),generic/)
        $(call PatchDir,$(PATCH_DIR),platform/)
@@ -125,7 +126,7 @@ define Build/Quilt
 
   $(STAMP_CONFIGURED): $(STAMP_CHECKED) FORCE
   $(STAMP_CHECKED): $(STAMP_PATCHED)
-       if [ -s "$(PKG_BUILD_DIR)/patches/series" ]; then (cd $(PKG_BUILD_DIR); quilt next >/dev/null 2>&1 && quilt push -a || quilt top >/dev/null 2>&1); fi
+       if [ -s "$(PKG_BUILD_DIR)/patches/series" ]; then (cd $(PKG_BUILD_DIR); if quilt next >/dev/null 2>&1; then quilt push -a; else quilt top >/dev/null 2>&1; fi); fi
        touch $$@
 
   quilt-check: $(STAMP_PREPARED) FORCE