From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0059.outbound.protection.outlook.com [104.47.33.59]) by dpdk.org (Postfix) with ESMTP id AB0AE11C5 for ; Wed, 22 Mar 2017 09:30:26 +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=4lFoyptDsOwrhGH72R7f4htWsjKPKDzvXxOAnLW2HZE=; b=Xj9gm0ub+LLoyE0XALzMvjtbjZFPB25fI0ThM5nraroxNYAezB+/9mls8k0r08JHIbyNhW8wptuxtnIISU9CjKideusoXNZoWkOo9KZHHTN7oJEJx5bK3e7IW1KqPcJfAqXvWniGRdhZ+mktdLD+YSHHkf6JHuZz5pCNBFWRjIE= 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.caveonetworks.com (111.93.218.67) by BLUPR0701MB1716.namprd07.prod.outlook.com (10.163.85.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.977.11; Wed, 22 Mar 2017 08:30:23 +0000 From: Jerin Jacob To: dev@dpdk.org Cc: thomas.monjalon@6wind.com, Jerin Jacob Date: Wed, 22 Mar 2017 14:00:04 +0530 Message-Id: <1490171404-16828-1-git-send-email-jerin.jacob@caviumnetworks.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1489920738-16247-1-git-send-email-jerin.jacob@caviumnetworks.com> References: <1489920738-16247-1-git-send-email-jerin.jacob@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: PN1PR01CA0004.INDPRD01.PROD.OUTLOOK.COM (10.164.137.11) To BLUPR0701MB1716.namprd07.prod.outlook.com (10.163.85.142) X-MS-Office365-Filtering-Correlation-Id: 8a1c3d36-1808-4307-a0c1-08d470fdafc6 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:BLUPR0701MB1716; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1716; 3:Ul5VQ/hSqgWJtW/yAB1KWQd+/mPvhRyaICqUESicEiWrx88WGoilcUUqfYjih6xk2zsoMjFLeshDwzbmRkzOZSmTc05m2QxoDeCnFiBzTJ8vxyZIK9HECtgNq0DWuZegUO7Rq2j0/+mNpvTeYmDhHRhxuQ1FVKWPGrN8uuXFvyTgzOUbXzG8Zqi4Vj1V/1hSWYnxTjl6JeFd3aaTfjJTQEvCPs5oms+5H0ltuvi165Pw7SqROt8QZ+bs3EVqgACC8i04K6g9sq3ifUGRaXwwZQ==; 25:3ZAehMEf4erx9JPJT7ixZmyL27Glu9LFobtQjPuG6bTRV7xwcIRcd9zxVxiaFmVaf/L92ZJ0YuXKIOnLKioTatbepmPAS1iSNxjykKc6DiB0dGyi+6TQ5yOHEOggW89d2/CUSwhwUe4DUeZlNVlb35eg/++RBhIzSg2Uf3T/2EzQODKUm4vCIa7jrDI1mA3aHv5gFLIikKKLf6xRCwi+dFUPauM9SCiW/zYqLKI66w8e6iPnA7Vx2e5MCNebrjl7clhlInILXe4euSmA5jhNyq7AlVKznsT2klu1+iCeeclAiLZSJ/iiBCdk4kkel159XMUoPTsH+XXF6xZ5vg+WU829N6SmTkY6sMq+GBPZVMGbUcHS5OJ2/VKbLzZaoK7d4USmMEPmgUI7kFj1Bnaesc1WYgSO9oSPae31AVOKUTKHg/7QgeFCar0wXW6V39+TQbEwNJoEwarNShGNIAV9Jw== X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1716; 31:q6ShFw7JOFWXh72eSy/4lvIZ9g25zfMs+Wl/u7OX+qHhssL7TqjphXwDk8tUrVbo7FtzS4xS+PrS42aN/k2+ifYcz1s0nbG3s4i6XRqY3kePzTJJekqA4m8KbV6S7nwQ1DK3YGt69Je8+l/NII954PMp/wIPHNLWt+hueKG4I9saiGdLr4oHtkD7fInXpzS37bdxagSYHN3Xehcf8JKjJgRwO7EQEderEkIMl9Bv1eM=; 20:vOK4qfc4S79n+5hq4Eoz7F5m5LcXrVLoZ89QvJWVGKweykhHgGL8hiEng+zqzkwp1ygkKH2p/wc52gwbYN0N7YQSleEBjF8WWBJ44y6t/KdGLldHxyFBkt5O5qdGldEoMTensN8NLrATAPn0lNj0Rl2pMsrG1K5noKP9zKC6hiWPAv+9HKqtINnSG9JtDN70pFkRctPUNhhiQ3KdY3PHIdsRmWzezyMxXhhjeou51zu7Uyh4bDv2LFt78meBkoMEgI0ECKbQPfj5G2N/4zXpNFd3BelUIb75YUJK3tRWv6sfOnphVaLIjYJ7H1a2N8LIyqBJUiE+DgrWu4ED67XyK5JbE2BKjqNgPXiWHckDnyGjc09l8acq0e5Q9BCNJz+trrqy/LPo3lZ37vFRhxgqfYBJavw7dpfqnQXZMiIq0cMTf8mvfH8QnWkyhZ7iuzKr6rCmrz+Mc2YkluEbz8AGiDPelDhvlCX7pjoBrERXuSqZw+cBNQKIr14hbZ4dFE+srCV8kgkFdooaku2UU33ISkAO0S5/DV3ZY376Az1S3kEVa1eFOwTpxORZD5b9PGItV9G3zQNlUYRnvDtex6AOihcEhqvn/3Ue1tdBI/qsDME= 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)(10201501046)(3002001)(6041248)(20161123558025)(20161123562025)(20161123555025)(20161123564025)(20161123560025)(6072148); SRVR:BLUPR0701MB1716; BCL:0; PCL:0; RULEID:; SRVR:BLUPR0701MB1716; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1716; 4:EmgbBi6x3EkLl+o0YnzyKhYOWBIbVl0PRj6IFQHiqVPlglkuQLyCEuNnLegTJjYYnp5oT/QTOscuOA0Kpua/RyCXlvrCmt0mutaL7Sf208gcTwgtuIOK94jka3UnO5Rd4pd6r13bP01/PMer+Yt6FsRvN5Lk0wM2Zkg+hAAsvSJt9FznAH6z3rn/PUlzdBxdQ0qhHGt9hIlLO0W7MeNextyDID6iqP89tTaORSRKaRlKcTZYzZv6PWu5VRj54iOTYOnL17tDxN2E283KF3NtTBo6J6S0TpLdRajKhDUhxIsNI0IhC4jwy16O1QjExpNEBqd6xZhXHWE9dfhM2hNAhwp0k6qVqm4AgCfKaD7o0t+G0K99h9lxKuN6B5yP8RnKYUr+RoA70qpg92TeNYCyKSJIIByHELgb9reDQJZl7gts4yHgLsIE65em8Q4N7HZEDvW2IbpLITon7jYqaTcH+92nDOIEKXsQRyI3byrFnt0WYoin5+d6UYu1SqRDlhvf/2iD2ztw/02ylH0RjH7sOs5wKZ1ThyQUOrpZwfaTQVDqxlWDy7B7pAgePDTIT2MY8jntnAAUA+G5r8RBXslFEvya8cSk5gtbHgLuSb07kHbOek0S0cIWzmm6Dv74mg2RWhfPiLoL4Ac1fr4vKpRYGA== X-Forefront-PRVS: 02543CD7CD X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(39830400002)(39410400002)(39450400003)(2361001)(3846002)(66066001)(5660300001)(6116002)(76176999)(50986999)(53936002)(50226002)(2906002)(81166006)(8676002)(6512007)(47776003)(5009440100003)(42186005)(305945005)(25786009)(42882006)(6916009)(6666003)(2950100002)(33646002)(189998001)(53416004)(76506005)(107886003)(36756003)(110136004)(6506006)(5003940100001)(38730400002)(4326008)(2351001)(7736002)(50466002)(6486002); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR0701MB1716; H:localhost.caveonetworks.com; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR0701MB1716; 23:Mli6IkxX61uiil7/9notS0A/FTHyG+Jfo7d72zl?= =?us-ascii?Q?jy107N8nYn/ZFJ88P8Ik4PD5Uns+IiLeGE89fvxyrMToCZIkhqNYFlpYWtyI?= =?us-ascii?Q?LNgX61exhIRKSR/qtTQwFPwWDdO9zKMYnX/LWAfHbrxgJbg/frFqJM3uquTl?= =?us-ascii?Q?AuxxPQAgy6X19+hjx4dCuCjOJoU5ZSZ7SCstEojDVCqd0kAYYnDGsjWoKNU4?= =?us-ascii?Q?z7i4eTqcoXpJ3/KzdK55Sdrk8qMwKpGDso4CxWRStxTfFM29tGX0vrjpV0tm?= =?us-ascii?Q?ZBLqfhKUiHxN3tl0hMjSZtQ9Utd2rtSMxM1vZoiBlcaLBt1NE0UaGiVIJLLd?= =?us-ascii?Q?Rwvoslv5g0Jru1sHWpQyu/q0RkKY8wKsiCfwUiwfmeYCWYhxOfyaSilmyGAD?= =?us-ascii?Q?VcHzXEQzJBAdVminUaExGRwJ2DDIu7GbnAzDWp5zsV16EroK+RckX2/03ibU?= =?us-ascii?Q?iz6yJ/kK6w06udWyRoDna1Kkvp0B3whtkFKBnzcxwyeL9CFc2pDbkSqmOSoL?= =?us-ascii?Q?73RSH8ecwdSJWED/wMbLa5s7Rz1/SgQCExbmKTQF1jIBxNdVOhQtIrQrTrCT?= =?us-ascii?Q?5Xr9HFoXY7Vi8mapx+H5oT19WHgPkYXOUmHTTPDJju3v7QdDyG5NFXXQiYov?= =?us-ascii?Q?mFhriGDCEnZlMWhG4DcdYnjOzsKHI4Dweav9yiiz6F9b1inRXEtqHw41nayt?= =?us-ascii?Q?nUbnsafV3QnU2IMzMoWzZz09jHzMSNBnntr3AZ0EPd6t46xSHyW9IhCy1qBe?= =?us-ascii?Q?581REHXIT4I+FW2hq55J3m9s2GVs+2FWyWmDiF7U2Lkn7KkPKciCE8GS/RSa?= =?us-ascii?Q?4pcxdV+Tfptrc0ULeINdvDJB843pu3y1/IbPdOGxHfVgo3QRKJiDX8llJEnk?= =?us-ascii?Q?ySgDeRc7nECuLBph8Mkm5P94lck+/VyY2KzbxPeQmlC8qMmBsiYcijBj9i3x?= =?us-ascii?Q?i8iZvrfKdhZ+nse6FlOGco1BZRYZdSxQOe8JaLjoi1JKnKIJ71FPZAk/+MVH?= =?us-ascii?Q?tYhQ7bo2fqft6nv5wTzSYx8JH6HNBnbtaYCMNdQ3X8JkkGf9y8rffpXjQqHv?= =?us-ascii?Q?wOA4TvYM=3D?= X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1716; 6:2Rb5im0pyQOUDARgtLsE9Y0bL/B+XYU7lNdRmIcKvby1ltL4MMCwJpcSqWa4j85VQ73uLRZo8a+3xB/A6IYjKchkDyEHc1pbzgPNax9+RAgt3QwS7/ewNyB9LNv43dbm2oXsW+Bg7UkJ67IJkiy8seVv3UHxntgeX6H3z8PfO8OMQu5FhopiybT8kEsWUn+hZxFAXZK36aje241YXot8WjvY4Vx8y2rqLQkYDxGIk/LmEeqnPA/jawHr429JAsgJqhlLhXqLu1kIvd93UIGbootM6+jlEvoKyAbq3OVMsCNSokTNOgTewWtSO468XHKViFadSiXf+G7Fz830DMthj8ViKXuBS0SowRPHsM6lRVrq944AvfJzRsNF0fB2by8N9Jc5kvi+CZyY0gfrcALU4A==; 5:Ngsd5QE469R1VvPUioUqbQnVE3CIXrL+wFwqZ1vLHvGDSGSaMfivh4YNMfI1aRfuDYADm/mAu4Zi3OF4z72DF5niXRx4xwE0Lq3o7S1nlSxAu8KR5bxmHdseE/W4PfJHnAMZkxYbKnV8hS7MMECzSQ==; 24:+eyAdzCLPDrMX4SE6DWtmlvfiT9o+VMsQ8lptCshr2Qfb8z6BsOXAxNhvkN3Q4n9suh8ayngMorlsKqKBq5IZc8Kqz6RQm2dds3qdZip/fY= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1716; 7:0HW/aXs2KOWxSDfTErOHvASUYL+PQAOKSe1CWP2Qu+T/TXeWDOxSwP6aMPKC36QxmGbOJhIbIsXu6aaZXDEfDA6a95jgJAADTqQdMOGdvqCEIZsMiybsQu6/TIYAaFRg2q/mp2dMGjaqEEO6aNRUgF3jDRrlfkTJPD0CfJdP4H16PbZPAJU1uX8Kfuz9R1yXh/cHoUlOBGXFplEtORau14BfSV2br1dUWe3wMrYmoQKdAb2S/t78NzyAgvxZrHUCBdqNmo8PSVDLYdIZKWSQMnrsvQmfmaziUVXPqnI/mCTz0KSSw8gpR17LsW9LZAOTKXys+CDM/8jfYrTNaz6Dhg== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Mar 2017 08:30:23.2999 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR0701MB1716 Subject: [dpdk-dev] [PATCH v5] 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: Wed, 22 Mar 2017 08:30:27 -0000 This script generates cscope, gtags, and tags index files based on EAL environment(architecture and OS(linux/bsd)). Selection of the architecture and OS environment is based on dpdk configuration target(T=).If EAL environment(T=) is not specified, the script generates tag files based on available source code. Usage: make tags|cscope|gtags|etags [T=config] example usage: make cscope make tags T=x86_64-native-linuxapp-gcc make gtags T=arm64-armv8a-linuxapp-gcc Signed-off-by: Jerin Jacob Reviewed-by: Yuanhan Liu Reviewed-by: Ferruh Yigit --- v5: - Added cscope,tags,gtags,etags makefile targets (Cristian) 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 +++++++++++++++++++++++++++++++++++++++++++++++++ mk/rte.sdkroot.mk | 8 ++ 3 files changed, 288 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 diff --git a/mk/rte.sdkroot.mk b/mk/rte.sdkroot.mk index 7598bde..6f9bfc5 100644 --- a/mk/rte.sdkroot.mk +++ b/mk/rte.sdkroot.mk @@ -92,6 +92,14 @@ default: all config showconfigs showversion showversionum: $(Q)$(MAKE) -f $(RTE_SDK)/mk/rte.sdkconfig.mk $@ +.PHONY: cscope gtags tags etags +cscope gtags tags etags: +ifdef T + $(Q)$(RTE_SDK)/devtools/build-tags.sh $@ ${T} +else + $(Q)$(RTE_SDK)/devtools/build-tags.sh $@ +endif + .PHONY: test test-basic test-fast test-ring test-mempool test-perf coverage test test-basic test-fast test-ring test-mempool test-perf coverage: $(Q)$(MAKE) -f $(RTE_SDK)/mk/rte.sdktest.mk $@ -- 2.5.5