Skip to content
Permalink
Browse files

Makefile: an pattern-target to unpatch the feeds

  • Loading branch information...
SvenRoederer committed Jun 21, 2019
1 parent 7b43cc7 commit 3319bc55fbfaabc9f52e0d8e3d17c541e106b33c
Showing with 14 additions and 7 deletions.
  1. +14 −7 Makefile
@@ -40,6 +40,10 @@ PROFILES=$(shell cat $(FW_DIR)/profiles/$(MAINTARGET)-$(SUBTARGET).profiles)

FW_REVISION=$(shell $(REVISION))

FEEDS=$(shell cd $(OPENWRT_DIR); ./scripts/feeds list -n)
PATCH_FEEDS_TARGET = $(addprefix patch-feed-, $(FEEDS))
UNPATCH_FEEDS_TARGET = $(addprefix unpatch-feed-, $(FEEDS))

default: firmwares

# clone openwrt
@@ -244,7 +248,7 @@ stamp-clean-%:
stamp-clean:
rm -f .stamp-*

unpatch: unpatch-openwrt unpatch-luci
unpatch: unpatch-openwrt unpatch-feeds
rm -f .stamp-patched

# unpatch needs "patches/" in openwrt
@@ -256,12 +260,15 @@ ifneq ($(wildcard $(OPENWRT_DIR)/.pc),)
rm -rf $(OPENWRT_DIR)/.pc
endif

unpatch-luci:
ifneq ($(wildcard $(OPENWRT_DIR)/feeds/luci/.pc),)
# $(error luci was patched!)
cd $(OPENWRT_DIR)/feeds/luci; quilt pop -a
rm -rf $(OPENWRT_DIR)/feeds/luci/.pc
endif
unpatch-feeds: $(OPENWRT_DIR)/feeds.conf $(UNPATCH_FEEDS_TARGET)
$(info unpatching all feeds: $(FEEDS))
rm -f .stamp-patch-feeds

unpatch-feed-%: $(OPENWRT_DIR)/feeds/%
$(info this is $@)
cd $(OPENWRT_DIR)/feeds/$*; quilt pop -a -f || [ $$? = 2 ] && true
#rm -rf $(OPENWRT_DIR)/feeds/$*/.pc


clean: stamp-clean .stamp-openwrt-cleaned

0 comments on commit 3319bc5

Please sign in to comment.
You can’t perform that action at this time.