From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0065.outbound.protection.outlook.com [104.47.33.65]) by dpdk.org (Postfix) with ESMTP id C0EF611DE for ; Sun, 19 Mar 2017 11:52:59 +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=VE6JhdaXPGjgxK/0aru0BZWwWhMHh+aw36fxBPxfSkI=; b=j2nT+eqDktcRsxX98TJMP9urBY2jhPApNlwDGhfTAfurUnMZ0W3S86v0gX1rnQJQRlglm4kkdosap6OcHpB8lVcnip//omPvSEofS/PFxjFWQu/UrY8mTFkh+L/SIjc/KDA3fXQvKPUGWxlCclDQCII/Kx8F7fLh98Jm0EGjnWI= 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 (106.201.104.48) by CY1PR0701MB1725.namprd07.prod.outlook.com (10.163.21.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.977.11; Sun, 19 Mar 2017 10:52:55 +0000 From: Jerin Jacob To: dev@dpdk.org Cc: thomas.monjalon@6wind.com, ferruh.yigit@intel.com, Jerin Jacob Date: Sun, 19 Mar 2017 16:22:18 +0530 Message-Id: <1489920738-16247-1-git-send-email-jerin.jacob@caviumnetworks.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1489414688-7780-1-git-send-email-jerin.jacob@caviumnetworks.com> References: <1489414688-7780-1-git-send-email-jerin.jacob@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [106.201.104.48] X-ClientProxiedBy: PN1PR01CA0062.INDPRD01.PROD.OUTLOOK.COM (10.164.136.162) To CY1PR0701MB1725.namprd07.prod.outlook.com (10.163.21.14) X-MS-Office365-Filtering-Correlation-Id: 9b88653b-3351-447e-0d07-08d46eb61a84 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:CY1PR0701MB1725; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1725; 3:HnnDBOPkp99K17bRf1DcL2XESvsUKNZjDblT7CHHPdY1mGTT/SsKH/HYT2Py5Ywc4K5omSWW+sQeMlysGyZT0SQkoImA7AoY7WZhP6YHhGE+CAGub4qRfGPuCc9BDIMRvZT12kab8WQvPZD7gr2e0zLEahulGMVoFo0TUb38uxzBQxYj/2sRIG6+LGBdyT5/D2W3WnyXTQ1xYluI/lCBp1yVrIBO5nK336It008jXPLs6zt3oZmb9uNRF4MUrASk98tHMobYXai8B45GuZMDlg==; 25:+PvGTZ2HG8/BaXgwLgZGFfhKTwGGiM8LPoQ/afD1O++DgTM1tBQWjeFZOYvc2Wn7I/W/VlwJXuNv51jia5giLGNuILsWEJy9zrJFbJDtIlPTb16qWD2l47yKtac+3HJMQViq1iRtNEfaOazpKXRMKzzYS2fCT3jnysbecSPSOJAjx3S4iQce0Se7RhohP7rilrUP6GLacHFqP05c4BJZblVTDSSpiY1b+XiJhKnlCgedovkgVyJquEUdQbUH/iemfXCT0HrZgPd/WOc5QxBYApAiwms9w+vVYbStEN4V50fFKgQOtkXO0ln16QC6vNUzIVex4p4o21wAAA3C+8iSUTLM2t4Lumm8XQkopsdbq4Ej1wpGMk52W5BV6kZdRLiWj7fFcP9PXK3+kSu7Y69HBuqsWsY9TxGRmAKhTGGBXVCKE6s7nmyGT9MSl5NVi3kp0jkSwRW7ajgMumlwsR3KVg== X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1725; 31:1Yaqy2KIxT9SddsN4L11kdJHi8ZGe/oXYzXvIoRfLWkYJza5U0tGWBM8n6pYIR0r3G78gWOokQOmrO47mGKryiwU4VZUthsmbMhAmm1mgoN9gQPhZIllfaZVbASY+1ejlBAz4n4uK+GuodMIoUr/2NK/G7IGvahG7/RGuPOaXKqA+2l7Qi4CoDH1zueS6cyqnqaGajmPW9XBPzDAbwvbXVe//V7OnnA6XzR/Z1rmnlA=; 20:hHB2RASh5QH8uIXrB/pgW0DPCUYZGszcbTaWuXzhLzZdqC43FADPBSAVCw6NDD8rb5ud/u7aD2g+D3NIOC/u5GD1F9kt9hbJkQgV1Hy7phv8tBn1b9s18EMmblrNlQMmbo93VTkotqVverHUTxVDlH7dmaN1viIlo5oh8aKB5PwJNHOPnUcms0ftPhC2PxKJ5l42YhfmnX9k1FS9Rgu9EjybCQ6im/HZ/FwjAAgPyFmIQl4yuhp6+etHnJRZgE3b94qnqrzW3OFPR+TyZ6GTaAZgd2dj/3a+pHNu7VlmbqQcgLQIKPAC7qRIxI+Q0GhbIJm3xZmFR8xTL9lUHmW/60vRnBuxfrfTYdZ6hYmVqKUMhtURSO/zTpxjj5fqMEY2jFbxFSaQphFPwq1FLc0lDN/cr7JjyX5Wc1aC4dvWDerDNHl5cVi3bOorn2973Ihg8KNwKqXGcN6Sb4hDfOIorLwCx4yz5n6pCYvKdacGLkoRBF4Hgvexs1ar3/ldXmGbL4k5l3IfQVC99Sf5e3JKG2AKLbMeeHhV3aj2kyar6rat3VTa3XHyDkFeEAEKzt4k9NVpQCrTIbtMwch0PTL+HZd5jomQ4ZOcIxBo5JwsOGI= 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)(5005006)(8121501046)(3002001)(10201501046)(6041248)(20161123560025)(20161123562025)(20161123564025)(20161123555025)(20161123558025)(6072148); SRVR:CY1PR0701MB1725; BCL:0; PCL:0; RULEID:; SRVR:CY1PR0701MB1725; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1725; 4:6Qt4oTi/iifk4FI3n6iynxIuLyCA5k0rWUzqAf8ikRK54ogJkrqYD1YE7tBVQg7H6yaN1aWzkMTp8EGrP/8bimXYVFwqNxIYMWYq+5474PVTepksADp2aiYMFUe1AUer1u46/z+Gh59C4ETcnCaaai3UfyYFuUYnvz0tMmCFRrdazARezIL3j/UjkCTfYR6pDSMQ8ouD7LZEoeksh2K3afnHN5jW+L0YPdzCvkisYeSedd6X1wsOQ4X4o6onLJAXRzj8Wo9yNWRD8rZoOur9Ru0oiZpZtNGzmvBo4ubLNSTBc3hCccvT3YEPDQLMFZoHODSnn+795/sc03eZdzY41tVfZd7JjjqZ6QMUPa92M1Eq/kpOvaxUFMoAxxRyBk7pATShapCpw+xm9oSNDFt5DZfZpx2xixuD93QHEdFd7OwO/9i5+4kRCKK04r/EJdmmRSdS8/8She+sR0py0/DReAcLBJy2JFMOnninYYSPReBnzd5tARMK9f0OnQfdc9ah3Llgl3314ap70Xry4v0RG8dGcpeoI1fEJkNGjqPWVI0WrF9p+4yIh0xNFb+F3wemy9Si4lzs9/Wof+jc4leVMs4ZNud2YD/hpCj7dV49B06QWLpgkSlaIMFtf66ZOgDSSfjzsD6lyeFHpe5HVfeHXA== X-Forefront-PRVS: 025100C802 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6069001)(6009001)(39450400003)(6512007)(53936002)(2361001)(2906002)(7736002)(33646002)(6506006)(25786008)(3846002)(6116002)(6486002)(50466002)(48376002)(5003940100001)(42186005)(2351001)(305945005)(36756003)(38730400002)(110136004)(107886003)(47776003)(66066001)(6666003)(81166006)(5660300001)(189998001)(8676002)(2950100002)(42882006)(6916009)(5009440100003)(76176999)(4326008)(50986999)(50226002); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR0701MB1725; H:localhost.localdomain; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR0701MB1725; 23:rGimUICnCSc7lpqIfbfoezQbGD3vYSs+CI6deUh?= =?us-ascii?Q?TCE+8SFpPN6y3Gy/PcwP406MC8jn8T0+0UqGAG2KASOukqQBZbjTtOizI2wg?= =?us-ascii?Q?iq5EcqoeUFVP717NkWUj/FGvh0/sog1YIrofirF2OQH/1O6l0IvTi8O7BwHW?= =?us-ascii?Q?NPRKDqjT/eMhyzPziYG0Z7IPV4hfatMgCJGgg2zbu1W3rIsx4a6UIitJ0mIN?= =?us-ascii?Q?5EXN1799UIJKb8Hb7cm/wsHxK2zJhyVFy0NyMWkRBM0Jh9u4uHz54EIOgFzV?= =?us-ascii?Q?teXRuzVm9Ld0m+U3Q7zccRID80RzPLsyI/rrUVlJPqbl/Df5GPfXZ1poW5TS?= =?us-ascii?Q?/E8pJ4hEYb/HI+Tz3yDK+J/HIEkYH5ywV+CTV9g5aKSpztlIBBLkUrjI4K/5?= =?us-ascii?Q?nHoPV5gb/et4ew4OTG5M8HqxUXK0ZhqV6t9M45uVb6/HxFN1QKxQr4hCo0/C?= =?us-ascii?Q?HGtwt5IGIwyXPYVA62hiBOCRAPacfG0uv045aUFP207bKXsSgq6qSx2QX7eN?= =?us-ascii?Q?SEvi/IsNr4GD6w/5MLZPgDIoqgi+fE/1Ac9hAKUPc5XuUlP15BxZdaGSVrgL?= =?us-ascii?Q?E2ZM9WxvKfjLz5xDa2/UrjMKatA63VloCgyHi0zaFmpMI2dFFKvyjn/+124D?= =?us-ascii?Q?s7xYo2WVFkVDN1asP9irQNvZcewDywX8y86k0N6CiIosOQunl+axbzK4+AD9?= =?us-ascii?Q?XVEMszw5WpKwkiQdsaz8Yn7uEEsKEcbufI3G5xsTF+kUYJ5slWeFCw1c1Wxd?= =?us-ascii?Q?8aVeY7GNIqeu+rVA7J3J15NvPexFbqGMdNkkw9WdpbTb/VVcRG9kGFQRyjmK?= =?us-ascii?Q?YQwj7Bqf2+daQ8ZLcrQA5evK+A03pmRxHlaBqsRtYiR5E9zRbHVnwktpfETX?= =?us-ascii?Q?HzIAltVZNGTShHYXbg7NafVSWVfTE/qmHAdyDyMjb4lr01V4prwrGxMxdTmM?= =?us-ascii?Q?0ioHO/LChQ9v5mTb1dyml5vIHCd+eum2ucyAy3KyvYOzuK1FGwMC4lHndDOL?= =?us-ascii?Q?70FaNJq2lBULIoyBStfKdfnO9?= X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1725; 6:314PuOHyvO+rOt40WHpqEr5IqDc9z0/6xY9IO1BTjjPMaYqAW+xTlSI5X0qAqH2wMy1kpPYlxGn+oQpBZMwLNWxz9mWSn+7uT0uoHNeNwK0tbevFfXpjnsk94U4JPdZfPP7U4qJXZY2bqTSFtRXapxCjU02kWnyMw9wo73l0abTBQ/WdoPcsqV4ukh7R230V1ga38O1E3zzoAt0WoVEdNLuRt66A4x1HmJY79zEJBkk/Q+inG6IzUALNpeaEud/XaB0Zcl/UjrqDF1CAJFDaR4jQNt35J+ruXs1EfSFkasLQP/tazVDKa6v7DTT+xbCRxnVYSw8ewAwZlmLt7juiznhSH0z5IiJJ5vdDIhkxC0GsLarhRh95G2EoVWnIHDlovTZ//39W202Dfooa8DUC4w==; 5:7ICNYgHQosw4dKEkI3bYrTvip/w7GUUs5OcJhlEEoyuyF3oAiKBkleE25tG/eeIpisbNDh+hdWYSEKMjX1oFWar/6A7ZVE7WISmOpuRtQ5TzgA1+sIhAyiadveqbgM3rbBbhF1qu+x4mhwFMC5PzLg==; 24:QNLQhbyhU1seH+kLMwhHv6GL0od0nV6W36y9do/sWvtj9EP7DdWZGoiQqB40e4GUEAbUt2w7KLJoZCZBiP7RMyZUTovwQGqO5wkz6oToF3k= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1725; 7:bK6Z68xuu6bput6Ihz6wmcIvS/QH5tVD/t1fXmYvapeTyqvgfgbCUUIqf57X1Gg/sqIOJARI9j8AM4W4geumwyJo5+KHfZTW3WZb1+qyhCq8KSkET3IZJCJEDv5WSjP7arGQIpBIQmbItvxWbKhfn8s5FZf+WauiVnMlkqM9ue/345q0o9Xu/fa3xBxZvlW0bL4VNwvJHhPMJP0lSt6kBmJ0iUUKFcozHKbPuLQCDH9STNf4JOnhbNzkYCp/ZMXACaXmC/f8IlwMjwD1PthTwue1yoIXsTFHYmM3TZajs/QdyaYdUY9LWgsF6tTVTsrmm4zQg8wdP3t56KL0j98PpA== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Mar 2017 10:52:55.5612 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0701MB1725 Subject: [dpdk-dev] [PATCH v4] 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: Sun, 19 Mar 2017 10:53:00 -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 --- v4: - Accommodate the latest "test" directory rework change in master 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 | 271 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 280 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..ca5317f --- /dev/null +++ b/devtools/build-tags.sh @@ -0,0 +1,271 @@ +#!/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="test 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" + if [ -f $RTE_SDK/$RTE_TARGET/include/rte_config.h ]; then + $verbose && echo "target: $RTE_SDK/$RTE_TARGET" + fi +} + +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