aboutsummaryrefslogtreecommitdiffstats
path: root/include/quilt.mk
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2007-06-03 06:54:46 +0000
committerFelix Fietkau <nbd@openwrt.org>2007-06-03 06:54:46 +0000
commit2ded29866913d04d71c1c8d8ce7a66037e2c1ac8 (patch)
tree4f2efbcab11ad0a9ddfd1426d6670f53b4765fef /include/quilt.mk
parent414e3ef71af42ec5a4c18ff0be41f7b794ab28e7 (diff)
downloadupstream-2ded29866913d04d71c1c8d8ce7a66037e2c1ac8.tar.gz
upstream-2ded29866913d04d71c1c8d8ce7a66037e2c1ac8.tar.bz2
upstream-2ded29866913d04d71c1c8d8ce7a66037e2c1ac8.zip
Improve quilt patch handling: All quilt managed patches are checked before the package compile is attempted
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@7472 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'include/quilt.mk')
-rw-r--r--include/quilt.mk18
1 files changed, 13 insertions, 5 deletions
diff --git a/include/quilt.mk b/include/quilt.mk
index ec5acc507e..5fbdda1b9f 100644
--- a/include/quilt.mk
+++ b/include/quilt.mk
@@ -5,24 +5,27 @@
# See /LICENSE for more information.
#
-QUILT?=$(strip $(shell test -f $(PKG_BUILD_DIR)/.quilt_patched && echo y))
+QUILT?=$(strip $(shell test -f $(PKG_BUILD_DIR)/.quilt_used && echo y))
ifneq ($(QUILT),)
STAMP_PREPARED:=$(strip $(STAMP_PREPARED))_q
+ STAMP_PATCHED:=$(PKG_BUILD_DIR)/.quilt_patched
CONFIG_AUTOREBUILD=
PATCHES:=$(shell cd ./patches; ls)
define Build/Patch/Default
rm -rf $(PKG_BUILD_DIR)/patches
mkdir -p $(PKG_BUILD_DIR)/patches
- for patch in $(PATCHES); do ( \
+ @for patch in $(PATCHES); do ( \
cp "./patches/$$$$patch" $(PKG_BUILD_DIR); \
cd $(PKG_BUILD_DIR); \
quilt import -p 1 "$$$$patch"; \
- quilt push; \
- quilt refresh; \
+ quilt push -f >/dev/null 2>/dev/null; \
rm -f "$$$$patch"; \
); done
- touch $(PKG_BUILD_DIR)/.quilt_patched
+ @echo
+ touch $(PKG_BUILD_DIR)/.quilt_used
endef
+ $(STAMP_CONFIGURED): $(STAMP_PATCHED)
+ prepare: $(STAMP_PATCHED)
else
define Build/Patch/Default
@if [ -d ./patches -a "$$$$(ls ./patches | wc -l)" -gt 0 ]; then \
@@ -31,6 +34,11 @@ else
endef
endif
+$(STAMP_PATCHED): $(STAMP_PREPARED)
+ @cd $(PKG_BUILD_DIR); quilt pop -a -f >/dev/null 2>/dev/null || true
+ cd $(PKG_BUILD_DIR); quilt push -a
+ touch $@
+
refresh: $(STAMP_PREPARED)
@[ -f "$(PKG_BUILD_DIR)/patches/series" ] || { \
echo "The source directory was not unpacked using quilt. Please rebuild."; \