UCI contrib patch handling
authorSteven Barth <steven@midlink.org>
Mon, 26 Oct 2009 13:33:44 +0000 (13:33 +0000)
committerSteven Barth <steven@midlink.org>
Mon, 26 Oct 2009 13:33:44 +0000 (13:33 +0000)
contrib/uci/Makefile

index 19625aa723241363e47193247100ecf0a6e8393a..04aa38b3ac9561bf06c41d666eff5c53515fa369 100644 (file)
@@ -23,9 +23,12 @@ $(UCI_FILE):
 $(UCI_PATCHDIR)/series:
        (cd $(UCI_PATCHDIR); ls *.patch | sort > series)
 
-$(UCI_DIR)/.prepared: $(UCI_FILE)
+$(UCI_DIR)/.prepared: $(UCI_PATCHDIR)/series $(UCI_FILE)
        rm -rf $(UCI_DIR)
        tar xvfz $(UCI_FILE)
+       [ -f "$(UCI_PATCHDIR)/series" ] && while read patch; do \
+               patch -d $(UCI_DIR) -p1 < $(UCI_PATCHDIR)/$$patch; \
+       done < $(UCI_PATCHDIR)/series || true
        touch $@
 
 compile: $(UCI_DIR)/.prepared