config: add fallback to patch order

Add the possibility to fallback to either bundled or local patches
if local or bundled are missing.
This commit is contained in:
Yann E. MORIN" 2009-08-31 12:47:58 +02:00
parent b09e70bda5
commit 2efc2b2319
2 changed files with 25 additions and 0 deletions

View File

@ -94,6 +94,24 @@ config PATCH_LOCAL_BUNDLED
Apply your local patches, then apply the patches
bundled with crosstool-NG.
config PATCH_BUNDLED_FALLBACK_LOCAL
bool
prompt "Bundled only, local if no bundled"
select PATCH_USE_LOCAL
select PATCH_SINGLE
help
Apply the patches bundled with crosstool-NG;
if there's no bundled patches, apply your local patches.
config PATCH_LOCAL_FALLBACK_BUNDLED
bool
prompt "Local only, bundled if no local"
select PATCH_USE_LOCAL
select PATCH_SINGLE
help
Only apply your local patches;
if there's no local patches, apply patches bundled with crosstool-NG.
endchoice
config PATCH_ORDER
@ -103,6 +121,10 @@ config PATCH_ORDER
default "bundled,local" if PATCH_BUNDLED_LOCAL
default "local,bundled" if PATCH_LOCAL_BUNDLED
config PATCH_SINGLE
bool
default n
config PATCH_USE_LOCAL
bool
default n

View File

@ -630,6 +630,9 @@ CT_Patch() {
CT_DoExecLog ALL patch -g0 -F1 -p1 -f <"${p}"
fi
done
if [ "${CT_PATCH_SINGLE}" = "y" ]; then
break
fi
fi
done