proper series file support for regular packages
[openwrt.git] / include / quilt.mk
index a7aac91..c156d30 100644 (file)
@@ -5,6 +5,9 @@
 # See /LICENSE for more information.
 #
 
+ifneq ($(__quilt_inc),1)
+__quilt_inc:=1
+
 ifeq ($(TARGET_BUILD),1)
   PKG_BUILD_DIR:=$(LINUX_DIR)
 endif
@@ -41,7 +44,12 @@ ifneq ($(QUILT),)
 else
   define Build/Patch/Default
        @if [ -d $(PATCH_DIR) -a "$$$$(ls $(PATCH_DIR) | wc -l)" -gt 0 ]; then \
-               $(PATCH) $(PKG_BUILD_DIR) $(PATCH_DIR); \
+               if [ -f $(PATCH_DIR)/series ]; then \
+                       grep -vE '^#' $(PATCH_DIR)/series | xargs -n1 \
+                               $(PATCH) $(PKG_BUILD_DIR) $(PATCH_DIR); \
+               else \
+                       $(PATCH) $(PKG_BUILD_DIR) $(PATCH_DIR); \
+               fi; \
        fi
   endef
 endif
@@ -134,3 +142,4 @@ refresh: quilt-check
 update: quilt-check
        $(if $(KERNEL_BUILD),$(Quilt/Refresh/Kernel),$(Quilt/Refresh/Package))
 
+endif
This page took 0.02391 seconds and 4 git commands to generate.