Changeset 448


Ignore:
Timestamp:
Oct 19, 2012, 6:27:39 AM (7 years ago)
Author:
ehem
Message:

Merge the FORCE_PATCH version of openwrt/unpatch back in to the general rule.

File:
1 edited

Legend:

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

    r447 r448  
    124124        touch $(TOPDIR)/openwrt/unpatch
    125125
    126 ifndef FORCE_PATCH
    127126openwrt/unpatch: openwrt/patch.applied
    128         if [ -f openwrt/patch ] ; \
     127        if [ -f openwrt/patch -o "$(FORCE_PATCH)" ] ; \
    129128        then \
    130129                targ="-n+1" ; \
     
    147146                then \
    148147                        echo ">> fail: $${pati}" > /dev/stderr ; \
    149                         echo ">> fatal: build in unrecoverable state" > /dev/stderr ; \
     148                        $(if $(FORCE_PATCH),retval=1\
     149                        ,echo ">> fatal: build dir in unrecoverable state" > /dev/stderr ; \
    150150                        rm -f openwrt/checkout "$(OPENWRT_BUILD_DIR)/.debwrt.checkout.stamp" ; \
    151                         exit 127 ; \
     151                        exit 127) ; \
    152152                else \
    153153                        echo ">> success: $${pati}" ; \
     
    155155        done ; \
    156156        rm -f openwrt/patch $< ; \
    157         touch $@
    158 else
    159 openwrt/unpatch: openwrt/checkout
    160         rev=$(call get_svn_revision,$(OPENWRT_BUILD_DIR)) ; \
    161         find \
    162           $(OPENWRT_PATCH_DIRS) \
    163           -name .svn -prune -o \! -type d -printf %f/%p\\n | \
    164         gawk -F / '\
    165           BEGIN { OFS=FS } \
    166           match($$1, "^([[:digit:]])+((-$(OPENWRT_BRANCH))|(-all))?(-([[:digit:]]*):([[:digit:]]*))?_([^/]*)", revs) \
    167             { if(revs[6] <= '$${rev}' && (!length(revs[7]) || revs[7] >= '$${rev}')) \
    168               { $$1=revs[1] "_" revs[8]; print } \
    169             }' | \
    170         sort -r | sed -e's/^[^/]\+\///' | \
    171         while read pat ; \
    172         do \
    173                 pati=$$(echo $${pat} | sed -e's!$(TOPDIR)/!!') ; \
    174                 if ! patch -b -d "$(OPENWRT_BUILD_DIR)" -p1 -R < "$${pat}" ; \
    175                 then \
    176                         echo ">> fail: $${pati}" > /dev/stderr ; \
    177                         retval=1 ; \
    178                 else \
    179                         echo ">> success: $${pati}" ; \
    180                 fi ; \
    181         done ; \
    182         rm -f openwrt/patch openwrt/patch.applied ; \
    183157        touch $@ ; \
    184158        exit $${retval}
    185 endif
    186159
    187160
Note: See TracChangeset for help on using the changeset viewer.