From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0056.outbound.protection.outlook.com [104.47.37.56]) by dpdk.org (Postfix) with ESMTP id 4D6FE1396 for ; Mon, 13 Mar 2017 15:18:37 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=613JuBN7MpZjegkd5GgNJKge6+U0xqqLRBRITtDj74Q=; b=Vu5vPh+7DE2A4xtOkN3RXtLCUlBckq+Nr0nRYVBdLbhVZbfJxF1ygzJG2NXzA2jZ/l2XfLM7c6XYC5ROoPYrNdq8SBz0/a0wE4YUfraNHUqxHf1kEPsZGs5r9ZFs5upsULxpDx21aaxF6L7Ys/h98C7D54YaAcdY0G6NVGpBsgw= Authentication-Results: dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=none action=none header.from=caviumnetworks.com; Received: from localhost.localdomain.localdomain (171.76.84.134) by BN3PR0701MB1720.namprd07.prod.outlook.com (10.163.39.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.961.17; Mon, 13 Mar 2017 14:18:31 +0000 From: Jerin Jacob To: dev@dpdk.org Cc: thomas.monjalon@6wind.com, ferruh.yigit@intel.com, Jerin Jacob Date: Mon, 13 Mar 2017 19:48:08 +0530 Message-Id: <1489414688-7780-1-git-send-email-jerin.jacob@caviumnetworks.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1484642507-15952-1-git-send-email-jerin.jacob@caviumnetworks.com> References: <1484642507-15952-1-git-send-email-jerin.jacob@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [171.76.84.134] X-ClientProxiedBy: BM1PR01CA0009.INDPRD01.PROD.OUTLOOK.COM (10.163.198.144) To BN3PR0701MB1720.namprd07.prod.outlook.com (10.163.39.19) X-MS-Office365-Filtering-Correlation-Id: cc0aed66-cd70-4986-31bf-08d46a1bd4f7 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:BN3PR0701MB1720; X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1720; 3:MtPRByFYIXFBwARrR+PjIhbXyFeg+fN1nJwe6tqE6wbUmf+5+Ok8z+/ftcKRntB93NXhLdW4BXvzyZA/fYedUyPSiTYkq640gAFkMIENvjpDbSgnm3GVq5Z8fNMxKvt+Aq3sJC/NS/7GMNQLoLsHNvRqJZtkvoViogntrXXS5UcTRcb8v9guLL5ndfsIb4iUq87LRoLg/+5GmeCZ8qTbjX+8uEy8sUUkFdDfr11GZBXS2mikcLNvdiwT3LUTFkiCNU1pto96apnZqH+5UeFKXA==; 25:ODasrCJ0grHH1WENc0hmQLPybuY243WguedPUSH95UdHrwrCdmVEai9as/WzgwVBkD8uabFCQhRBxA/SguLxkVRq7GrfYxw+czc1hqYd0yMpUC6fraPUa0kVVNREK69BdjLFC+I1hPxJ0VVxFRyM2VvZB1NYQqGSZid+uFBs6bWiqVW0yoectxqcucP482DPCSWdrRFfOyM2avxDky1TwxsuulqM5zcd/nzdgACxkpbATXzhqizN+shjuozJfpxxKbIf4a84aL5eWUmpjGQP+zgDdgYMcqoLAaZbF2xkjNRUwDpKzw/dbtyR4UzRjGt+VIsmMmd40yVCfKFdyLoGv/QJpafwaHsYQs9LFYPV55RwBqCnivTHhIV1tVs5BJ0E67E+PDOJSeQzn+AlXfUr/KKDeZcIUUJmD4mOzYHNJsKYqJevXmY932V9t5LGYJExXKED7KLmbRsomMGEQKzOqw== X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1720; 31:gOvt1rU0Nq36A0GSPO+bshq/rp/5WuGG+exQSO5+pKU0ST4s1zUPn09pMylMdpHRPFEJKigHSHp2HiNaKKDBfJbxM8SUl/yl3vgavM42gzApWgJJ5Y6ctZTVm1jN6ZwufJu33JcZbXzXzpHxif+04RvcESVeEWxpAyzNj2kKd139Mncvwuho8ZgmAqQqEuoBHmdkTLvNovQeRjjQV5mByGIyiaJZOtbxCLSdTxMm1yY=; 20:+fcW6dG7iddPb+iR2hwoo42GAteipA8YRFSxD90L59sFgsPw5dDlx47QYr5IZFGY3Bqd1G5cNHBPe0xVoh0rvZQ0gXc19M3pv5tB7NWXqmdIIOtB1mAFKgdzbnG1F9Ja63+VoSK9wjt9YSZSOfCTi6l7I9Win5d5UdzFe+8LZsG4tYbIUWPxSkLd5dGjBL4qtsPbHaL6uSmHtGpL0sLrYm4wnwTF22VCQtMzWWpuDj8ItbkpC2MeRmHQU6y3jMMsxDlpvMsuKJtUBmcDVnnjh5XRoVNQY0oDIkGUl6e7UZlFqv9QVmJcAtOXrKgBpl3h/KGxJ4CeueNGZK2IvCtjVeDUcAw0yVBbSQMBT+Yka7rR17wkK+2KoN+S+gE9ZMY7hKdZI0z/XuZtnFep2uJt5gfJadW5aRuMozv21ueX9SOLhLDYibJ5dR5WyUzeKf47XPGRIRopDMAeAGRGmrnGGBChmnsKtYbHxpKG5d5oiaOkidvDOzVGKYgoSb8WoIS+bm6UIR+HOmEMdL8ciScxChBC6JzpdixB5bCsK89tLnjsdT2QGRgaTREGn3KdTXPJLRaBVQRyRi2VXbc1HmNLH4YX5o0C0ZWb+qdcxPbIGUw= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6041248)(20161123562025)(20161123560025)(20161123555025)(20161123564025)(20161123558025)(6072148); SRVR:BN3PR0701MB1720; BCL:0; PCL:0; RULEID:; SRVR:BN3PR0701MB1720; X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1720; 4:NkvhQxi/3G1QSo1UU3ApYFUDZvyNRYBQEVV1Xaxe8lSNC50V4YWZ4yyh4pjkM3IKttJ8xh5fcLGBKurhXIeyKa6JAMVNCMdzXPz76j2QDRhlk81z/zFW1GkHsD9QL/jJhQnDqQXpCea2pJoJrLewRmFfrr1KuF59yv9wOMkndVyj7QqbGDgobK4vHbgUuP6vS9pQohBOBZ0lCM5/IAdS5WdGdnZhO6DkAVcrhEPuCysGX6hqseQF6vwxJqBT7Wg4u+riUcr9XW+F6vjeEJnBwpDoduEHODaVmaLEt0/3OzLbLvb0Z6+vJ5qJMCU/byz20pklekrNULcsXCPStSGeZre24bBLnL7l3N0YyRdqlIBpAdqfSELX+YS1BDMKmmRkyCRM3FvrUjIC9DuePkVkQlHaNUSNSmLksb3w50LgdIkJpxT7nb2S/HuFn46WShL4zQEdznTCsDfW9bGBCKMlinMOUzY7gb1z/Zkelrh3CudL7+SIiZvcBARFjiFcyvKsvlAA4C9OlBnv+smCcBQS3mENBnYgDs7q0GPv83YTJ/V4LWDlITfI5REaNLCXt7M5Yxswh0REagXV+O8Ot2eVNBCkOQQ8s2Kb1lVEvWbFwV3vOZs/M84+/ZQ8TVxJXcU12uQD74jfDDVwmrblsI+BEw== X-Forefront-PRVS: 0245702D7B X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6069001)(6009001)(39450400003)(53936002)(7736002)(6916009)(42882006)(8676002)(2950100002)(2351001)(50466002)(5003940100001)(6506006)(6666003)(50226002)(110136004)(107886003)(76176999)(50986999)(38730400002)(4326008)(305945005)(189998001)(25786008)(66066001)(36756003)(3846002)(6116002)(48376002)(2906002)(6486002)(33646002)(6512007)(5660300001)(47776003)(81166006)(42186005); DIR:OUT; SFP:1101; SCL:1; SRVR:BN3PR0701MB1720; H:localhost.localdomain.localdomain; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1720; 23:KiUa6JzC/MLBb5sO6HfqEXHYUiDi/GKI0D13h4lmUihNSCVTyI0k5ejFm9kzhGScraI4xXooqlb/0KjF5nf2BbQY1Z1koiNB48SWgwihGoE6WSMkDOgvyQi8mnIUV5/1qBGhijl3eXVJ9l0hiV6mZj08gXxn6ytRnrocxrNYQEsR9AwrreNDzI0yq46LYN5VYCw7a/TsBLMcIdxOhrKKKrlFlB+t6sHbGnFVDf3hZqMsHpQ0mfyOAKOFx0utTzbvS/J4VjHIAaWO84QEPIfZ4bFjWXanLbpyzNYaGDJs9nlH1o5XeZQupyEdl/qx/17RXgr2DpUzFKXdBzmKZD2KDTNAlexWv8Kv6pVkoRY+0qNQWRUUQkG/Td+EaqcYG0OkV4Cvhhe/UWJ6sClyNeqPH3rC3U9I4nq6OuouH1XXuYbxCTdEEKAEx0Atpym60vH0X9kF04wuXf73WEKMjW17xfFInuCEennVIby9zHshT+YWElIveuTZ6/IaxjmcVZlFREvgmuX7mDdoBHZ2+zeFOw+ho3MgVszIr0fqzY7A/7eSfEo9dgElrSnWC4HucjyFgFeQJ8mef2J9kHcWoA0FFSc9pL4S/AFcm+Ur4i3qck5fzLhGCmH/qyeCfw41kYs2xLnno8ie3gQXwOUM7ffisoYsIHtWFXVjw4uBrEzuEdEUvwnkg7M4FkTc3h13bmnfd3qYRCKhNGPNx9o9qgQ8QN/KQlsYOZPE/US0bCr5REupE9mImU3YConaxS2uIqBrGFFdXqXdwhmanSiBH3mDKQoB8rrGW35LSBTDD5A4in0n4gXAiuXWDWSr6KOeyz4yyHyaMSj2+7T7ga1xkyl+ulWZ+zl2H1b8XyPD5Cjqo1nctue0hqnbo41ftCM1PCGm5/jsqVUt8ZRVgPDSY+dd74eZIF9wGiJU8+fPakmvCZVShZTgG00GHJLZk61GpaaN X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1720; 6:HmdNJlQl1i2iqLSZe1m71uKE+OohXXQ45HCPn7xQhrp389NVK25nJspzyWVS7LHwPDVzHhEdhzB9+6dFilG44wHwxiaIFrttWtbClKqukkaxypitZNASH2RB16svWAXrYqlUROHj4MMrdqS3lykiXCV3mEd55n+UmY7VWsVJJoLnOQSPTXD+aMJpoVK6TzjjwxF/hB1nVO+6HHvVNsFECgICzNTc43+wnIpzlxZFY5plxgRndaScHiiKcqNkFidUlDL+q+9d8zN9fNnyQ77CkvckPNT4Qz63GeDQ2DQ9YzTNkKyQnnWyX5Z8p3fHV4U/+9fVtcvEQbyXYzF18TkMCmbbuTAqiwxEpoqMdsBF0KKinK1RWvwIMBiju3wpr71TTRq1FoNwnoJfLpNA0WLu9A==; 5:EMUkeK2fwAznjMjRIE/2aWKN5qho/pVJ4EIXCiHk/dEmzhR8w+LIgTiOU+cfq/P6AU6oYnDdUBx74VuyPcxHNkjcsN1XMJ1KaQiomB3ZPR0HKXnCbFYuRoL3laVoTKscRhGO86pp3wQrnSYx3F4luu489ZMlPd1uBk4+O8lLwj4=; 24:hRwxvZkqtXt3cVFkf+YRmX8QqBCR5t5gWKoClosF8mX5n4LINofMtdCL6eFfQJ8scUNqsWwg4tKhETi5q8gNCl1cLuWw+77GOqPiLr0VpH0= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1720; 7:ClliECnXQMquINw11ie72p2DU/cyMV/7c4vb/gq8t0Ei1woUT/vRxaJrXzA+cW7tMl9g/Sk1w8N1RBcFU8oSzRXLo+hq1Si0PxhoA49Fzyvxq1A/zOKYq7opJiCErpH5wxEtlZ4G3xhCvU+Vi/ERWKqlKAc6zeRrsYNvs26t2S81kwYY9m1A+7PF8BsDr9/3KZHoBZ6n65HfpDXFzDKETXTB8+GfCnM4ngpijZxCZIQPTPjwpsgqJaCdsCPSvyOKOdH0Vn0wxVb/Y1X92gw/FYZwM+Q5OnpPvZK0y4BPs3A4+9Owx+M1LDgAWGcZ/pJe8NY400gD6R1OVx+SpYmpTQ== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Mar 2017 14:18:31.8525 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR0701MB1720 Subject: [dpdk-dev] [PATCH v3] devtools: add tags and cscope index file generation support X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Mar 2017 14:18:37 -0000 This script generates cscope, gtags, and tags index files based on EAL environment(architecture and OS(linux/bsd)). If EAL environment(config) is not specified, the script generates tag files based on available source code. Usage: build-tags.sh [-h] [-v] tags|cscope|gtags|etags [config] example usage: ./devtools/build-tags.sh cscope ./devtools/build-tags.sh tags x86_64-native-linuxapp-gcc ./devtools/build-tags.sh gtags arm64-armv8a-linuxapp-gcc Signed-off-by: Jerin Jacob Reviewed-by: Yuanhan Liu Reviewed-by: Ferruh Yigit --- v3: - Added etags target for Emacs(John) - EAL environment(config) is optional now(Thomas) - Changed bash shebang to /bin/sh (Thomas) - getopts based -v and -h option (Thomas) - used $() instead of backquotes (Thomas) - Removed "make" based frontend to the script to make it inline with other devtools scripts in DPDK (Jerin) v2: - Moved tag.sh to devtools from scripts - Rebased to master --- .gitignore | 9 ++ devtools/build-tags.sh | 269 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 278 insertions(+) create mode 100755 devtools/build-tags.sh diff --git a/.gitignore b/.gitignore index a722abe..7eade38 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,10 @@ doc/guides/nics/overview_table.txt +cscope.out.po +cscope.out.in +cscope.out +cscope.files +GTAGS +GPATH +GRTAGS +tags +TAGS diff --git a/devtools/build-tags.sh b/devtools/build-tags.sh new file mode 100755 index 0000000..d4a8a98 --- /dev/null +++ b/devtools/build-tags.sh @@ -0,0 +1,269 @@ +#!/bin/sh -e +# Generate tags or gtags or cscope or etags files +# +# BSD LICENSE +# +# Copyright 2017 Cavium Networks +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Cavium networks nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +verbose=false +linuxapp=false +bsdapp=false +x86_64=false +arm=false +arm64=false +ia_32=false +ppc_64=false + +print_usage() +{ + echo "Usage: $(basename $0) [-h] [-v] tags|cscope|gtags|etags [config]" + echo "Valid configs are:" + make showconfigs | sed 's,^,\t,' +} + +while getopts hv ARG ; do + case $ARG in + v ) verbose=true ;; + h ) print_usage; exit 0 ;; + ? ) print_usage; exit 1 ;; + esac +done +shift $(($OPTIND - 1)) + +#ignore version control files +ignore="( -name .svn -o -name CVS -o -name .hg -o -name .git ) -prune -o" + +source_dirs="app buildtools drivers examples lib" + +skip_bsd="( -name bsdapp ) -prune -o" +skip_linux="( -name linuxapp ) -prune -o" +skip_arch="( -name arch ) -prune -o" +skip_sse="( -name *_sse*.[chS] ) -prune -o" +skip_avx="( -name *_avx*.[chS] ) -prune -o" +skip_neon="( -name *_neon*.[chS] ) -prune -o" +skip_altivec="( -name *_altivec*.[chS] ) -prune -o" +skip_arm64="( -name *arm64*.[chS] ) -prune -o" +skip_x86="( -name *x86*.[chS] ) -prune -o" +skip_32b_files="( -name *_32.h ) -prune -o" +skip_64b_files="( -name *_64.h ) -prune -o" + +skiplist="$skip_bsd $skip_linux $skip_arch $skip_sse $skip_avx \ + $skip_neon $skip_altivec $skip_x86 $skip_arm64" + +find_sources() +{ + find $1 $ignore $3 -name $2 -not -type l -print +} + +common_sources() +{ + find_sources "$source_dirs" '*.[chS]' "$skiplist" +} + +linuxapp_sources() +{ + find_sources "lib/librte_eal/linuxapp" '*.[chS]' +} + +bsdapp_sources() +{ + find_sources "lib/librte_eal/bsdapp" '*.[chS]' +} + +arm_common() +{ + find_sources "lib/librte_eal/common/arch/arm" '*.[chS]' + find_sources "$source_dirs" '*neon*.[chS]' +} + +arm_sources() +{ + arm_common + find_sources "lib/librte_eal/common/include/arch/arm" '*.[chS]' \ + "$skip_64b_files" +} + +arm64_sources() +{ + arm_common + find_sources "lib/librte_eal/common/include/arch/arm" '*.[chS]' \ + "$skip_32b_files" + find_sources "$source_dirs" '*arm64.[chS]' +} + +ia_common() +{ + find_sources "lib/librte_eal/common/arch/x86" '*.[chS]' + + find_sources "examples/performance-thread/common/arch/x86" '*.[chS]' + find_sources "$source_dirs" '*_sse*.[chS]' + find_sources "$source_dirs" '*_avx*.[chS]' + find_sources "$source_dirs" '*x86.[chS]' +} + +i686_sources() +{ + ia_common + find_sources "lib/librte_eal/common/include/arch/x86" '*.[chS]' \ + "$skip_64b_files" +} + +x86_64_sources() +{ + ia_common + find_sources "lib/librte_eal/common/include/arch/x86" '*.[chS]' \ + "$skip_32b_files" +} + +ppc64_sources() +{ + find_sources "lib/librte_eal/common/arch/ppc_64" '*.[chS]' + find_sources "lib/librte_eal/common/include/arch/ppc_64" '*.[chS]' + find_sources "$source_dirs" '*altivec*.[chS]' +} + +config_file() +{ + if [ -f $RTE_SDK/$RTE_TARGET/include/rte_config.h ]; then + ls $RTE_SDK/$RTE_TARGET/include/rte_config.h + fi +} + +check_valid_config() +{ + cfgfound=false + allconfigs=$(make showconfigs) + for cfg in $allconfigs + do + if [ "$cfg" = "$1" ] ; then + cfgfound=true + fi + done + $cfgfound || echo "Invalid config: $1" + $cfgfound || print_usage + $cfgfound || exit 0 +} + +if [ -n "$2" ]; then + check_valid_config $2 + + if [ $(echo $2 | grep -c "linuxapp-") -gt 0 ]; then + linuxapp=true + fi + + if [ $(echo $2 | grep -c "bsdapp-") -gt 0 ]; then + bsdapp=true + fi + + if [ $(echo $2 | grep -c "x86_64-") -gt 0 ]; then + x86_64=true + fi + + if [ $(echo $2 | grep -c "i686-") -gt 0 ]; then + ia_32=true + fi + + if [ $(echo $2 | grep -c "x32-") -gt 0 ]; then + ia_32=true + fi + + if [ $(echo $2 | grep -c "arm-") -gt 0 ]; then + arm=true + fi + + if [ $(echo $2 | grep -c "arm64-") -gt 0 ]; then + arm64=true + fi + + if [ $(echo $2 | grep -c "ppc_64-") -gt 0 ]; then + ppc_64=true + fi + +else + linuxapp=true + bsdapp=true + x86_64=true + arm=true + arm64=true + ia_32=true + ppc_64=true +fi + +all_sources() +{ + common_sources + $linuxapp && linuxapp_sources + $bsdapp && bsdapp_sources + $x86_64 && x86_64_sources + $ia_32 && i686_sources + $arm && arm_sources + $arm64 && arm64_sources + $ppc_64 && ppc64_sources + config_file +} + +show_flags() +{ + $verbose && echo "mode: $1" + $verbose && echo "config: $2" + $verbose && echo "linuxapp: $linuxapp" + $verbose && echo "bsdapp: $bsdapp" + $verbose && echo "ia_32: $ia_32" + $verbose && echo "x86_64: $x86_64" + $verbose && echo "arm: $arm" + $verbose && echo "arm64: $arm64" + $verbose && echo "ppc_64: $ppc_64" + $verbose && echo "target: $RTE_SDK/$RTE_TARGET" +} + +case "$1" in + "cscope") + show_flags $1 $2 + all_sources > cscope.files + cscope -q -b -f cscope.out + ;; + "gtags") + show_flags $1 $2 + all_sources | gtags -i -f - + ;; + "tags") + show_flags $1 $2 + rm -f tags + all_sources | xargs ctags -a + ;; + "etags") + show_flags $1 $2 + rm -f TAGS + all_sources | xargs etags -a + ;; + *) + echo "Invalid mode: $1" + print_usage + ;; +esac -- 2.5.5