Changeset 412
- Timestamp:
- Oct 6, 2012, 11:30:42 PM (10 years ago)
- Location:
- branches/contrib/openwrt
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/contrib/openwrt/openwrt.mk
r411 r412 87 87 touch $@ 88 88 89 openwrt/patch/force: 90 rm -f $(TOPDIR)/openwrt/patch 91 make -C $(TOPDIR) openwrt/patch FORCE_PATCH=1 92 89 93 openwrt/patch: openwrt/checkout 90 94 rev=$(call get_svn_revision,$(OPENWRT_BUILD_DIR)) ; \ … … 98 102 while read pat ; \ 99 103 do \ 104 pati=$$(echo $${pat} | sed 's!$(OPENWRT_PATCHES_DIR)/!!') ; \ 100 105 if ! patch -d "$(OPENWRT_BUILD_DIR)" -p 0 -N < $${pat} ; \ 101 106 then \ 102 echo Failed applying patch: $${pat} > /dev/stderr ; \ 103 rm -f openwrt/checkout "$(OPENWRT_BUILD_DIR)/.debwrt.checkout.stamp" ; \ 104 exit 1 ; \ 107 echo ">> fail: $${pati}" > /dev/stderr ; \ 108 #rm -f openwrt/checkout "$(OPENWRT_BUILD_DIR)/.debwrt.checkout.stamp" ; \ 109 [ $(FORCE_PATCH) != "1" ] && exit 1 || true ; \ 110 else \ 111 echo ">> success: $${pati}" ; \ 105 112 fi ; \ 106 113 done 114 rm -f openwrt/unpatch 107 115 touch $@ 108 116 109 openwrt/unpatch: 110 if [ ! -f openwrt/patch ]; then exit 0; fi; \ 117 openwrt/unpatch/force: 118 rm -f $(TOPDIR)/openwrt/unpatch 119 make -C $(TOPDIR) openwrt/unpatch FORCE_PATCH=1 120 121 openwrt/unpatch: openwrt/patch 111 122 rev=$(call get_svn_revision,$(OPENWRT_BUILD_DIR)) ; \ 112 123 find \ … … 119 130 while read pat ; \ 120 131 do \ 132 pati=$$(echo $${pat} | sed 's!$(OPENWRT_PATCHES_DIR)/!!') ; \ 121 133 if ! patch -d "$(OPENWRT_BUILD_DIR)" -p 0 -R < $${pat} ; \ 122 134 then \ 123 echo Failed removing patch: $${pat} > /dev/stderr ; \ 124 rm -f openwrt/checkout "$(OPENWRT_BUILD_DIR)/.debwrt.checkout.stamp" ; \ 125 exit 1 ; \ 135 echo ">> fail: $${pati}" > /dev/stderr ; \ 136 #rm -f openwrt/checkout "$(OPENWRT_BUILD_DIR)/.debwrt.checkout.stamp" ; \ 137 [ $(FORCE_PATCH) != "1" ] && exit 1 || true; \ 138 else \ 139 echo ">> success: $${pati}" ; \ 126 140 fi ; \ 127 141 done 128 rm openwrt/patch142 rm -f openwrt/patch 129 143 touch $@ 130 131 144 132 145 openwrt/files-copy: openwrt/patch … … 173 186 rm -f openwrt/files-copy 174 187 188 .PHONY: openwrt/patch/force \ 189 openwrt/unpatch/force 190 -
branches/contrib/openwrt/patches/README
r406 r412 25 25 <nnn> is used to set order of application. Lower numbered patches are applied 26 26 first. The ordering is done by running the list of patches through 27 `sort`, as a result, "1000_foo" will be done before "200_bar". 27 `sort`, as a result, "1000_foo" will be done before "200_bar". Note that 28 all patches in all patch directories are listed, sorted and then applied! 28 29 29 30 <desc> contains a functional description of the patch. Usually separated by … … 39 40 40 41 41 Make targets 42 ------------ 43 make openwrt/patch 44 maken openwrt/unpatch 42 Patch make targets 43 ------------------ 44 make openwrt/patch - Exit when a patch fails 45 maken openwrt/unpatch - Exit when an unpatch fails 46 make openwrt/patch/force - Try to apply all patches 47 maken openwrt/unpatch/force - Try to unapply all patches 48 49 The force options are very usefull when developping. 45 50 46 51
Note: See TracChangeset
for help on using the changeset viewer.