Changeset 405


Ignore:
Timestamp:
Oct 5, 2012, 11:10:41 PM (8 years ago)
Author:
ehem
Message:

Minor tweaks to openwrt.mk. Allow for "-all" to indicate a patch for all
branches (adds symetry with "all" directory). Turn list of patch
directories into a variable, allows for plugins to use system by adding
to value. openwrt/unpatch shouldn't fail if the branch hasn't been
checked out, nor should it fail if run multiple times, fixed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/contrib/openwrt/openwrt.mk

    r404 r405  
    2222
    2323OPENWRT_PATCHES_DIR=$(TOPDIR)/openwrt/patches
     24
     25OPENWRT_PATCH_DIRS= "$(OPENWRT_PATCHES_DIR)/all" \
     26        "$(OPENWRT_PATCHES_DIR)/$(OPENWRT_BRANCH)"
     27
     28
    2429
    2530openwrt/all: openwrt/build
     
    8590        rev=$(call get_svn_revision,$(OPENWRT_BUILD_DIR)) ; \
    8691        find \
    87           "$(OPENWRT_PATCHES_DIR)/all" "$(OPENWRT_PATCHES_DIR)/$(OPENWRT_BRANCH)" \
     92          $(OPENWRT_PATCH_DIRS) \
    8893          -name .svn -prune -o \! -type d -printf %f/%p\\n | \
    8994        gawk \
    90           'match($$1, "^[[:digit:]]+(-$(OPENWRT_BRANCH))?(-([[:digit:]]*):([[:digit:]]*))?_", revs) \
    91           { if(revs[3] <= '$${rev}' && (!length(revs[4]) || revs[4] >= '$${rev}')) print }' | \
     95          'match($$1, "^[[:digit:]]+((-$(OPENWRT_BRANCH))|(-all))?(-([[:digit:]]*):([[:digit:]]*))?_", revs) \
     96          { if(revs[5] <= '$${rev}' && (!length(revs[6]) || revs[6] >= '$${rev}')) print }' | \
    9297        sort | sed -e's/^[^/]\+\///' | \
    9398        while read pat ; \
     
    102107        touch $@
    103108
    104 openwrt/unpatch: openwrt/checkout
     109openwrt/unpatch:
     110        if [ ! -f openwrt/patch ]; then exit 0; fi; \
    105111        rev=$(call get_svn_revision,$(OPENWRT_BUILD_DIR)) ; \
    106112        find \
    107           "$(OPENWRT_PATCHES_DIR)/all" "$(OPENWRT_PATCHES_DIR)/$(OPENWRT_BRANCH)" \
     113          $(OPENWRT_PATCH_DIRS) \
    108114          -name .svn -prune -o \! -type d -printf %f/%p\\n | \
    109115        gawk \
    110           'match($$1, "^[[:digit:]]+(-$(OPENWRT_BRANCH))?(-([[:digit:]]*):([[:digit:]]*))?_", revs) \
    111           { if(revs[3] <= '$${rev}' && (!length(revs[4]) || revs[4] >= '$${rev}')) print }' | \
     116          'match($$1, "^[[:digit:]]+((-$(OPENWRT_BRANCH))|(-all))?(-([[:digit:]]*):([[:digit:]]*))?_", revs) \
     117          { if(revs[5] <= '$${rev}' && (!length(revs[6]) || revs[6] >= '$${rev}')) print }' | \
    112118        sort -r | sed -e's/^[^/]\+\///' | \
    113119        while read pat ; \
Note: See TracChangeset for help on using the changeset viewer.