Skip to content
Permalink
Browse files

Makefile: adapt unpatch target

  • Loading branch information...
SvenRoederer committed Jun 20, 2019
1 parent 37a4a3a commit 7b43cc7b243e731d23c1054a5be7305b7689e86a
Showing with 14 additions and 2 deletions.
  1. +14 −2 Makefile
@@ -244,12 +244,24 @@ stamp-clean-%:
stamp-clean:
rm -f .stamp-*

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

# unpatch needs "patches/" in openwrt
unpatch: $(OPENWRT_DIR)/patches
unpatch-openwrt:
ifneq ($(wildcard $(OPENWRT_DIR)/.pc),)
# RC = 2 of quilt --> nothing to be done
cd $(OPENWRT_DIR); quilt pop -a -f || [ $$? = 2 ] && true
rm -rf $(OPENWRT_DIR)/tmp
rm -f .stamp-patched
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

clean: stamp-clean .stamp-openwrt-cleaned

0 comments on commit 7b43cc7

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