+ifneq ($(HOST_BUILD_DIR),)
+ HOST_QUILT?=$(strip $(shell test -f $(if $(PKG_BUILD_DIR),$(PKG_BUILD_DIR),$(HOST_BUILD_DIR))/.quilt_used && echo y))
+ ifneq ($(HOST_QUILT),)
+ HOST_STAMP_PATCHED:=$(HOST_BUILD_DIR)/.quilt_patched
+ HOST_STAMP_CHECKED:=$(HOST_BUILD_DIR)/.quilt_checked
+ override CONFIG_AUTOREBUILD=
+ host-prepare: $(HOST_STAMP_PATCHED)
+ host-quilt-check: $(HOST_STAMP_CHECKED)
+ endif
+endif
+
+define Host/Patch/Default
+ $(if $(QUILT),rm -rf $(HOST_BUILD_DIR)/patches; mkdir -p $(HOST_BUILD_DIR)/patches)
+ $(call PatchDir,$(HOST_BUILD_DIR),$(PATCH_DIR),)
+endef
+