Mailinglist Archive: opensuse-kernel (131 mails)
| < Previous | Next > |
[opensuse-kernel] Re: [patch 1/5] [PATCH] scripts/sequence-patch.sh: Add --build-dir option
- From: Michal Marek <mmarek@xxxxxxx>
- Date: Wed, 19 Jan 2011 18:57:04 +0100
- Message-id: <4D3725F0.90201@suse.cz>
Dne 19.1.2011 18:29, Jeff Mahoney napsal(a):
I would document in the help text which variables are supposed to be used in the string, so that we do not have to worry about changing or removing truly internal variables in the future.
Michal
--
To unsubscribe, e-mail: opensuse-kernel+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-kernel+help@xxxxxxxxxxxx
I use a separate build directory from the tree in which I expand the source
tree. Some files, such as Module.supported are generated automatically and
placed in the source tree.
This patch adds a --build-dir=PATH option and uses that directory for
generated files. If it doesn't exist, it will create it. If it does exist,
it will not clean it. Except to re-set the source and patches links it
will create.
Signed-off-by: Jeff Mahoney<jeffm@xxxxxxxx>
---
scripts/sequence-patch.sh | 28 +++++++++++++++++++++++++---
1 file changed, 25 insertions(+), 3 deletions(-)
--- a/scripts/sequence-patch.sh
+++ b/scripts/sequence-patch.sh
@@ -37,7 +37,7 @@ sles9* | sles10* | sle10* | 9.* | 10.* |
esac
usage() {
- echo "SYNOPSIS: $0 [-qv] [--symbol=...] [--dir=...] [--combine] [--fast]
[last-patch-name] [--vanilla] [--fuzz=NUM]"
+ echo "SYNOPSIS: $0 [-qv] [--symbol=...] [--dir=...] [--combine] [--fast]
[last-patch-name] [--vanilla] [--fuzz=NUM] [--build-dir=PATH]"
exit 1
}
@@ -49,7 +49,7 @@ if $have_arch_patches; then
else
arch_opt=""
fi
-options=`getopt -o qvd:F: --long
quilt,no-quilt,$arch_opt,symbol:,dir:,combine,fast,vanilla,fuzz -- "$@"`
+options=`getopt -o qvd:F: --long
quilt,no-quilt,$arch_opt,symbol:,dir:,combine,fast,vanilla,fuzz,build-dir: --
"$@"`
if [ $? -ne 0 ]
then
@@ -64,6 +64,7 @@ QUILT=true
COMBINE=
FAST=
VANILLA=false
+SP_BUILD_DIR=
while true; do
case "$1" in
@@ -105,6 +106,10 @@ while true; do
fuzz="-F$2"
shift
;;
+ --build-dir)
+ SP_BUILD_DIR="$2"
+ shift
+ ;;
--)
shift
break ;;
@@ -214,6 +219,13 @@ EXT=${EXTRA_SYMBOLS// /-}
EXT=${EXT//\//}
PATCH_DIR=${PATCH_DIR}${EXT:+-}$EXT
+if [ -n "$SP_BUILD_DIR" ]; then
+ # This allows alias (~) and variable expansion
+ SP_BUILD_DIR=$(eval echo "$SP_BUILD_DIR")
I would document in the help text which variables are supposed to be used in the string, so that we do not have to worry about changing or removing truly internal variables in the future.
Michal
--
To unsubscribe, e-mail: opensuse-kernel+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-kernel+help@xxxxxxxxxxxx
| < Previous | Next > |