firmware-utils: improve tools for Buffalo DHP series
[openwrt/openwrt.git] / include / quilt.mk
index cd392a7c5dd024ac97c55157900570eb7707be66..88f84f8cff466f69a0af70cd64744d84f34a6440 100644 (file)
@@ -64,6 +64,7 @@ ifneq ($(PKG_BUILD_DIR),)
   ifneq ($(QUILT),)
     STAMP_CHECKED:=$(PKG_BUILD_DIR)/.quilt_checked
     override CONFIG_AUTOREBUILD=
+    override CONFIG_AUTOREMOVE=
     quilt-check: $(STAMP_CHECKED)
   endif
 endif
@@ -73,6 +74,7 @@ ifneq ($(HOST_BUILD_DIR),)
   ifneq ($(HOST_QUILT),)
     HOST_STAMP_CHECKED:=$(HOST_BUILD_DIR)/.quilt_checked
     override CONFIG_AUTOREBUILD=
+    override CONFIG_AUTOREMOVE=
     host-quilt-check: $(HOST_STAMP_CHECKED)
   endif
 endif
@@ -149,7 +151,8 @@ define Quilt/Template
                echo "The source directory contains no quilt patches."; \
                false; \
        }
-       @[ -n "$$$$(ls $(1)/patches/series)" -o "$$$$(cat $(1)/patches/series | md5sum)" = "$$(sort $(1)/patches/series | md5sum)" ] || { \
+       @[ -n "$$$$(ls $(1)/patches/series)" -o \
+          "$$$$(cat $(1)/patches/series | mkhash md5)" = "$$(sort $(1)/patches/series | mkhash md5)" ] || { \
                echo "The patches are not sorted in the right order. Please fix."; \
                false; \
        }