Skip to content
Permalink
Browse files

MAkefile: prefix some targetst with .stamp, fix cleanup

  • Loading branch information...
SvenRoederer committed Jun 23, 2019
1 parent 7f2f971 commit 5a27e9aa8eb8c1824a4759fbd03b96be648c5c51
Showing with 9 additions and 9 deletions.
  1. +9 −9 Makefile
@@ -99,24 +99,24 @@ pre-patch: stamp-clean-pre-patch .stamp-pre-patch

# patch openwrt working copy
patch: stamp-clean-patched .stamp-patched
.stamp-patched: patch-openwrt patch-feeds
.stamp-patched: .stamp-patch-openwrt .stamp-patch-feeds
touch $@

patch-openwrt: .stamp-pre-patch
.stamp-patch-openwrt: .stamp-pre-patch
cd $(OPENWRT_DIR); quilt push -a
rm -rf $(OPENWRT_DIR)/tmp
$(UMASK); cd $(OPENWRT_DIR); ./scripts/feeds update
$(UMASK); cd $(OPENWRT_DIR); ./scripts/feeds install -a
touch $@

patch-feeds: $(OPENWRT_DIR)/feeds.conf $(PATCH_FEEDS_TARGET)
.stamp-patch-feeds: $(addprefix .stamp-patch-feed-,$(FEEDS))
$(info patching all feeds: $(FEEDS))
touch .stamp-patch-feeds
touch $@

patch-feed-%: $(wildcard patches/packages/%/*) patch-openwrt .stamp-feeds-updated $(OPENWRT_DIR)/feeds/%/patches
.stamp-patch-feed-%: $(wildcard patches/packages/%/*) patch-openwrt .stamp-feeds-updated $(OPENWRT_DIR)/feeds/%/patches
$(info this is $@)
cd $(OPENWRT_DIR)/feeds/$*; quilt push -a
$(OPENWRT_DIR)/feeds/$*/.pc
if [ -f $(OPENWRT_DIR)/feeds/$*/patches/series ]; then cd $(OPENWRT_DIR)/feeds/$*; quilt push -a; fi
touch $@

.stamp-build_rev: .FORCE
ifneq (,$(wildcard .stamp-build_rev))
@@ -270,8 +270,8 @@ 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 -rf $(OPENWRT_DIR)/.pc
endif
rm -f .stamp-patch-openwrt

unpatch-feeds: $(OPENWRT_DIR)/feeds.conf $(UNPATCH_FEEDS_TARGET)
$(info unpatching all feeds: $(FEEDS))
@@ -281,7 +281,7 @@ unpatch-feed-%: $(OPENWRT_DIR)/feeds/%
$(info this is $@)
[ ! -d $(OPENWRT_DIR)/feeds/$*/.pc ] || \
(cd $(OPENWRT_DIR)/feeds/$*; quilt pop -a -f || [ $$? = 2 ] && true)
#rm -rf $(OPENWRT_DIR)/feeds/$*/.pc
rm .stamp-patch-feed-$*


clean: stamp-clean .stamp-openwrt-cleaned

0 comments on commit 5a27e9a

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