Changeset 431
- Timestamp:
- Oct 11, 2012, 7:53:34 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/contrib/openwrt/openwrt.mk
r430 r431 93 93 openwrt/patch: openwrt/checkout 94 94 rev=$(call get_svn_revision,$(OPENWRT_BUILD_DIR)) ; \ 95 retval=0 ; \ 95 96 find \ 96 97 $(OPENWRT_PATCH_DIRS) \ … … 102 103 while read pat ; \ 103 104 do \ 105 echo "$${pat}" >> $@ ; \ 104 106 pati=$$(echo $${pat} | sed -e's!$(TOPDIR)/!!') ; \ 105 107 if ! patch -d "$(OPENWRT_BUILD_DIR)" -p1 -N < "$${pat}" ; \ 106 108 then \ 107 109 echo ">> fail: $${pati}" > /dev/stderr ; \ 108 $(if $(FORCE_PATCH),, \ 109 rm -f openwrt/checkout "$(OPENWRT_BUILD_DIR)/.debwrt.checkout.stamp" ; \ 110 exit 1 ; ) \ 110 $(if $(FORCE_PATCH),retval=1,exit 1) ; \ 111 111 else \ 112 112 echo ">> success: $${pati}" ; \ … … 114 114 done ; \ 115 115 rm -f openwrt/unpatch ; \ 116 touch $@116 exit $retval 117 117 118 118 openwrt/unpatch/force: … … 120 120 make -C $(TOPDIR) openwrt/unpatch FORCE_PATCH=1 121 121 122 ifndef FORCE_PATCH 122 123 openwrt/unpatch: openwrt/patch 123 if [ ! -f openwrt/patch ]; then exit 0; fi; \ 124 tac openwrt/patch | \ 125 while read pat ; \ 126 do \ 127 pati=$$(echo $${pat} | sed -e's!$(TOPDIR)/!!') ; \ 128 if ! patch -d "$(OPENWRT_BUILD_DIR)" -p1 -R < "$${pat}" ; \ 129 then \ 130 echo ">> fail: $${pati}" > /dev/stderr ; \ 131 echo ">> fatal: build in unrecoverable state" > /dev/stderr ; \ 132 rm -f openwrt/checkout "$(OPENWRT_BUILD_DIR)/.debwrt.checkout.stamp" ; \ 133 exit 127 ; \ 134 else \ 135 echo ">> success: $${pati}" ; \ 136 fi ; \ 137 done ; \ 138 rm -f openwrt/patch ; \ 139 touch $@ 140 else 141 openwrt/unpatch: 124 142 rev=$(call get_svn_revision,$(OPENWRT_BUILD_DIR)) ; \ 143 retval=0 ; \ 125 144 find \ 126 145 $(OPENWRT_PATCH_DIRS) \ … … 136 155 then \ 137 156 echo ">> fail: $${pati}" > /dev/stderr ; \ 138 $(if $(FORCE_PATCH),, \ 139 rm -f openwrt/checkout "$(OPENWRT_BUILD_DIR)/.debwrt.checkout.stamp" ; \ 140 exit 1 ; ) \ 157 retval=1 ; \ 141 158 else \ 142 159 echo ">> success: $${pati}" ; \ … … 144 161 done ; \ 145 162 rm -f openwrt/patch ; \ 146 touch $@ 163 touch $@ ; \ 164 exit $retval 165 endif 147 166 148 167
Note: See TracChangeset
for help on using the changeset viewer.