Improve quilt patch handling: All quilt managed patches are checked before the package compile is attempted
SVN-Revision: 7472
This commit is contained in:
parent
cc690d782c
commit
396895e6d8
1 changed files with 13 additions and 5 deletions
|
@ -5,24 +5,27 @@
|
||||||
# See /LICENSE for more information.
|
# 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),)
|
ifneq ($(QUILT),)
|
||||||
STAMP_PREPARED:=$(strip $(STAMP_PREPARED))_q
|
STAMP_PREPARED:=$(strip $(STAMP_PREPARED))_q
|
||||||
|
STAMP_PATCHED:=$(PKG_BUILD_DIR)/.quilt_patched
|
||||||
CONFIG_AUTOREBUILD=
|
CONFIG_AUTOREBUILD=
|
||||||
PATCHES:=$(shell cd ./patches; ls)
|
PATCHES:=$(shell cd ./patches; ls)
|
||||||
define Build/Patch/Default
|
define Build/Patch/Default
|
||||||
rm -rf $(PKG_BUILD_DIR)/patches
|
rm -rf $(PKG_BUILD_DIR)/patches
|
||||||
mkdir -p $(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); \
|
cp "./patches/$$$$patch" $(PKG_BUILD_DIR); \
|
||||||
cd $(PKG_BUILD_DIR); \
|
cd $(PKG_BUILD_DIR); \
|
||||||
quilt import -p 1 "$$$$patch"; \
|
quilt import -p 1 "$$$$patch"; \
|
||||||
quilt push; \
|
quilt push -f >/dev/null 2>/dev/null; \
|
||||||
quilt refresh; \
|
|
||||||
rm -f "$$$$patch"; \
|
rm -f "$$$$patch"; \
|
||||||
); done
|
); done
|
||||||
touch $(PKG_BUILD_DIR)/.quilt_patched
|
@echo
|
||||||
|
touch $(PKG_BUILD_DIR)/.quilt_used
|
||||||
endef
|
endef
|
||||||
|
$(STAMP_CONFIGURED): $(STAMP_PATCHED)
|
||||||
|
prepare: $(STAMP_PATCHED)
|
||||||
else
|
else
|
||||||
define Build/Patch/Default
|
define Build/Patch/Default
|
||||||
@if [ -d ./patches -a "$$$$(ls ./patches | wc -l)" -gt 0 ]; then \
|
@if [ -d ./patches -a "$$$$(ls ./patches | wc -l)" -gt 0 ]; then \
|
||||||
|
@ -31,6 +34,11 @@ else
|
||||||
endef
|
endef
|
||||||
endif
|
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)
|
refresh: $(STAMP_PREPARED)
|
||||||
@[ -f "$(PKG_BUILD_DIR)/patches/series" ] || { \
|
@[ -f "$(PKG_BUILD_DIR)/patches/series" ] || { \
|
||||||
echo "The source directory was not unpacked using quilt. Please rebuild."; \
|
echo "The source directory was not unpacked using quilt. Please rebuild."; \
|
||||||
|
|
Loading…
Reference in a new issue