This patch adds a --cscope option which automatically invokes "make cscope" in the build directory. Signed-off-by: Jeff Mahoney <jeffm@suse.com> --- scripts/sequence-patch.sh | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) --- a/scripts/sequence-patch.sh +++ b/scripts/sequence-patch.sh @@ -41,6 +41,7 @@ usage() { SYNOPSIS: $0 [-qv] [--symbol=...] [--dir=...] [--combine] [--fast] [last-patch-name] [--vanilla] [--fuzz=NUM] [--build-dir=PATH] [--config=ARCH-FLAVOR [--kabi]] [--ctags] + [--cscope] The --build-dir option supports internal shell aliases, like ~, and variable expansion when the variables are properly escaped. Environment variables @@ -64,7 +65,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,build-dir:,config:,kabi,ctags -- "$@"` +options=`getopt -o qvd:F: --long quilt,no-quilt,$arch_opt,symbol:,dir:,combine,fast,vanilla,fuzz,build-dir:,config:,kabi,ctags,cscope -- "$@"` if [ $? -ne 0 ] then @@ -85,6 +86,7 @@ CONFIG_ARCH= CONFIG_FLAVOR= KABI=false CTAGS=false +CSCOPE=false while true; do case "$1" in @@ -140,6 +142,9 @@ while true; do --ctags) CTAGS=true ;; + --cscope) + CSCOPE=true + ;; --) shift break ;; @@ -531,6 +536,15 @@ if $CTAGS; then fi fi +if test -n "$CSCOPE"; then + if cscope -V 2> /dev/null; then + echo "[ Generating cscope db (this may take a while)]" + make -s --no-print-directory -C "$PATCH_DIR" O="$SP_BUILD_DIR" cscope + else + echo "[ Could not generate cscope db: cscope not found ]" + fi +fi + [ $# -gt 0 ] && exit $status if ! $have_defconfig_files || test ! -e config.conf; then -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-kernel+help@opensuse.org