X-Git-Url: http://git.rohieb.name/openwrt.git/blobdiff_plain/800e84cc0ff36cfbc254ec9681d8731a4fd480f1..8e52b00c08077ea9d8a8c7dac30be9c98d0ad833:/include/quilt.mk diff --git a/include/quilt.mk b/include/quilt.mk index 358b64ba0..0d63e62fd 100644 --- a/include/quilt.mk +++ b/include/quilt.mk @@ -3,9 +3,8 @@ # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. -# -ifneq ($(__quilt_inc),1) +ifneq ($(if $(DUMP),1,$(__quilt_inc)),1) __quilt_inc:=1 ifeq ($(TARGET_BUILD),1) @@ -13,6 +12,8 @@ ifeq ($(TARGET_BUILD),1) endif PATCH_DIR?=./patches FILES_DIR?=./files +HOST_PATCH_DIR?=$(PATCH_DIR) +HOST_FILES_DIR?=$(FILES_DIR) ifeq ($(MAKECMDGOALS),refresh) override QUILT=1 @@ -55,7 +56,7 @@ $(call PatchDir/$(if $(strip $(QUILT)),Quilt,Default),$(strip $(1)),$(strip $(2) endef ifneq ($(PKG_BUILD_DIR),) - QUILT?=$(strip $(shell test -f $(PKG_BUILD_DIR)/.quilt_used && echo y)) + QUILT?=$(if $(wildcard $(PKG_BUILD_DIR)/.quilt_used),y) ifneq ($(QUILT),) STAMP_PATCHED:=$(PKG_BUILD_DIR)/.quilt_patched STAMP_CHECKED:=$(PKG_BUILD_DIR)/.quilt_checked @@ -66,7 +67,7 @@ ifneq ($(PKG_BUILD_DIR),) endif ifneq ($(HOST_BUILD_DIR),) - HOST_QUILT?=$(strip $(shell test -f $(if $(PKG_BUILD_DIR),$(PKG_BUILD_DIR),$(HOST_BUILD_DIR))/.quilt_used && echo y)) + HOST_QUILT?=$(if $(wildcard $(if $(PKG_BUILD_DIR),$(PKG_BUILD_DIR),$(HOST_BUILD_DIR))/.quilt_used),y) ifneq ($(HOST_QUILT),) HOST_STAMP_PATCHED:=$(HOST_BUILD_DIR)/.quilt_patched HOST_STAMP_CHECKED:=$(HOST_BUILD_DIR)/.quilt_checked @@ -78,12 +79,14 @@ 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),) + $(call PatchDir,$(HOST_BUILD_DIR),$(HOST_PATCH_DIR),) + $(if $(QUILT),touch $(HOST_BUILD_DIR)/.quilt_used) endef define Build/Patch/Default $(if $(QUILT),rm -rf $(PKG_BUILD_DIR)/patches; mkdir -p $(PKG_BUILD_DIR)/patches) $(call PatchDir,$(PKG_BUILD_DIR),$(PATCH_DIR),) + $(if $(QUILT),touch $(PKG_BUILD_DIR)/.quilt_used) endef kernel_files=$(foreach fdir,$(GENERIC_FILES_DIR) $(FILES_DIR),$(fdir)/.) @@ -122,7 +125,7 @@ define Quilt/Refresh/Kernel $(call Quilt/RefreshDir,$(PKG_BUILD_DIR),$(PATCH_DIR),platform/) endef -define Build/Quilt +define Quilt/Template $($(2)STAMP_PATCHED): $($(2)STAMP_PREPARED) @( \ cd $(1)/patches; \