From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0086.outbound.protection.outlook.com [104.47.40.86]) by dpdk.org (Postfix) with ESMTP id 481B42C27 for ; Sat, 29 Apr 2017 12:51:45 +0200 (CEST) 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=+oO1CU4HhIfW90rYOZcanaQxDLUSuYfpODhyLHctzHo=; b=gT2vPPQ1faTlccICJxmtLrSNQKmN1N9RR+RZFLV2QygKWosweSgTeMHtv0TA3/n2tW8UadZs8MkPEHZRpQLWxAUlGcfvnqB9W+Z30qngugaM3h7bBeTHnFmVxRmdUGb4kPAmTD2zqkHYgMEjhpzliYcsEqEz8s/1lJ43232XzxM= Authentication-Results: dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=none action=none header.from=caviumnetworks.com; Received: from jerin.domain.name (106.201.106.215) by CY1PR0701MB1727.namprd07.prod.outlook.com (10.163.21.141) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1047.13; Sat, 29 Apr 2017 10:51:40 +0000 From: Jerin Jacob To: dev@dpdk.org Cc: thomas@monjalon.net, ferruh.yigit@intel.com, Jerin Jacob Date: Sat, 29 Apr 2017 16:21:18 +0530 Message-Id: <20170429105118.23532-1-jerin.jacob@caviumnetworks.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <1490171404-16828-1-git-send-email-jerin.jacob@caviumnetworks.com> References: <1490171404-16828-1-git-send-email-jerin.jacob@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [106.201.106.215] X-ClientProxiedBy: PN1PR01CA0077.INDPRD01.PROD.OUTLOOK.COM (10.174.144.145) To CY1PR0701MB1727.namprd07.prod.outlook.com (10.163.21.141) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 24c1d348-3938-4d33-6870-08d48eedb912 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:CY1PR0701MB1727; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1727; 3:aiDFIdcBxpfyOLXiTVkDvVmNDQRSQ1pJpzFRb3yVA1nIxgPTkf4P13Li9CF6w4o5km+a5ZuA0g7tPbTXkZ/8UEM7Dhl1+JYsVarEtljs6kGDqrgzBlLoOVf4HMSLRjFMIxDhdWSitwdIAdfB/Yi+sZyDbfoUQF3CqDq9qwBEHQ1ltPH1fGVTxmugFp4rx/tb+Wmlup49YhDrjvrcA0WAVMRLIubzPwc24olpdBf5lb046hIfgv1BEpPZ5kvmj/WOhEBYKl9qFhiyN1xxI2Zwj8UditOVGOpPU9Fih2D78N9ByjbwGveBYG4c6tHPw+nn+Vv65XBL57x4C4y/1PmcIg==; 25:C9PNa6mjbo13/ZVU0u5wTNoZTcd3nifpOF/OLU8WhQgwlYa572N3Vzczjo5DgW+WjQXDuh/I2J8M2L862ljGxQx7y5iMEUx6KxS0IKKxvpvaehEinLbrAPuGiqlCMZPzjzwZ56DSwdMNTd6+Y9hA8pERHZywN05lVYkt39dN4yXg0HAaiGoViL9FhR4ULiOHGg52RkWO8amRfwNYwVDnMvitx2oNvwnEw2NkPgC/01QFifKXRiM7ZE+s/mZBnPkT94MYpDEbioFvMwCZl6tU6xN8Gpmb5G+Rr8K4tz7zo7cZdN1R23NIo4fwylc7Gbk29pwS93AF6tpDMF+dQDujkSugR6xE/E7QMr4EptmBDbtA8CFpwYXuNfkO0Raum88J8+OW/3tpXpO4l7rf0RNU9i0i5uaaSaEUw7dzvl5jqAhbsZxwRKMY4aEAV/27yUSwv+emVhojcDbd7/GDXt+fCA== X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1727; 31:GbU0ecm3qWvK7XsVkgBhjjyl54R+jTuLnVfat03kPxK0T4MJDyUs0vaxRcpJ9Tdb7YmjFl0Y/vkDp0XyZ6tbg/UrL6MObUOXd3gKRyMmwZ4R5U8Hw/7dGkgEZ+m0DqcKPe6sEyJM4hU23WvsAdZDmuNTIRneLmLCYMgm/CBQ+oNF7luYtjLAZTHzGLq++ZKrALvl7XX+lI0bQSjbR6uxoxUTchAgVnbxvzvROSsKf3I=; 20:Ntz7DJFz2wtLYw481j4vAqq1275i2VxPgPvhR4ntri6tjV5EUWaQlgj43XucyEn78XDMGNMdV9XQ76sOyv48Nk/DCCM96LwVBrtgrIavDOx4FtA0+Bja0aS8Ql9HV/+iKc3hEAo/gIkMcmcvdjlOu5OiU57xwSwupqij5/zEYhA9q4mqfBq6whOq9fMQtrb/8t87aHjglpze7XCDq5Ok375X16jvzUU2cXXP3UpbYMk1avNdsUvNYC7Dqpq2XiNUAwkFWYyp+zsQG/bjRE5awb4j8gSTA1HsI1uWtCoQzcsf/RTvZ5/9TN60fzqA9xFIoONHOHzFp6jwudinntir7N5P6VDSQXnRFPfsef5YU7IUDAC69RKbU1Vrsg67bafe0IDvgIPihX3knjEPJ7EQakMHUnHll7RxeTAGnEqakmCI7UlOOyqRWCNRWa70DzQR01LSR/tLwAxquiwkOcjnDiwZKMDmKEjoAOhU2TDZst6gDauPnSnZLciRIwJucZycjTBbUVVrCun5amTA2cumtC/6tZGJ00vzuc8sa2LPQSe/ZNmrUPs8/zHWuS+1nwIFo7ubrc+mknL47mxhXv35AUbjuacM/vtIIJpK2BsQFIM= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(8121501046)(5005006)(93006095)(3002001)(10201501046)(6041248)(201703131423075)(201703011903075)(201702281528075)(201703061421075)(20161123564025)(20161123562025)(20161123560025)(20161123555025)(6072148); SRVR:CY1PR0701MB1727; BCL:0; PCL:0; RULEID:; SRVR:CY1PR0701MB1727; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1727; 4:EfFxo4Fx8Eopu1grWvyY8jSjDzdTigRrGqyAuq1vnKWxFHD9NGfyH+aL7b2aj4n7O0FxqIaXciJJNm784Ef4lWlOak06Hen/lSV87bn802EvSNaxiNqxJxpmejelgvOseGwn7dqaAJtHaGTgxzAjOsbARMjV+M58TAgrJUwiBjE70SkjXPnezMg7b2k6Oiah8jYlW2cjrRYSy59ruzYVr9d9cuG0t+sGKh5xHWl0At4W4LK2X2MLVo8HKYjstZO2G1zZmgLqy97R7AeqjUWIvH2U+O4hIOGwy4xGskpMJJDB0/qp0bNWkEb+fJFWSTSrZ5Ni6CmF2t+mFHgLcaP3dRKThLL46gdvbf5ZT/dz1c/mRGllrpwRc7VcAaZQ+8wPA97XeILoZUyIAG3rJIFkgOO4aJ/+fgFdY981NpuiEXM1zc+mohNYVAgwT5LOewb+aKLVDWoG2JIoLakzjeIvPKrxaWxViG7A76wx6xiOACF/PdjNTeQQ/bnSyf4J7E69HjVl6L8A3TQtEFV43Ej2ZgdHy7ggC1cpBPCHylkllpvHYzS8FHreiNvoegD8MNNiaX/+KS3vlRRTKWnz+oJAz7Lb1RGOV31HjtPFD6B2ni1etn3yfnlAzf+bhVMo6RD8VNMRTYGI77zgbFNqFe0k6RV4Rb+JSqGidK0tOZpJEi+utR2awcrIS8QbdR4Uk1r4kVK63s4xNKnmfcVhPt6BKzbvdq/TaC0a6vEqMIdH+qMlTrRuUoPOdDLjLx9PF9oK+bEWRf96/HGUI+u6tyrSvg== X-Forefront-PRVS: 02929ECF07 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(39410400002)(39450400003)(39850400002)(39860400002)(39840400002)(39400400002)(2351001)(2906002)(189998001)(53416004)(42186005)(66066001)(110136004)(36756003)(5009440100003)(53376002)(2361001)(107886003)(38730400002)(4326008)(1076002)(508600001)(33646002)(3846002)(47776003)(48376002)(6116002)(50466002)(25786009)(966004)(76176999)(6306002)(6666003)(6916009)(2950100002)(42882006)(81166006)(6486002)(5660300001)(6506006)(8676002)(53936002)(7736002)(5003940100001)(6512007)(50226002)(50986999)(305945005); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR0701MB1727; H:jerin.domain.name; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR0701MB1727; 23:lDmSgNsRzDYXfPgzO8ImUrKN0ZctUriivAcsvCr?= =?us-ascii?Q?Nev3BAoJS0useDHdACNiBsefMcP784gl9j4IXSrlfmJ54p8mt+iccFaGQ/7v?= =?us-ascii?Q?4icfUk+Vb/YPhh6CIQ01IGvzozw+k4G9zLedpMWdAUMD2Wy1fn12jlvA6377?= =?us-ascii?Q?IjDnG1oRXlUYUpA2O6RdVKr92kkp5ibd1fgAjjyQq0EgLdOqhFvaQn/7ccPR?= =?us-ascii?Q?6jeNZIoQkl8zMzK9m4sRPoBRIKgRnZwbBTmvX56pyeCPl0wqQBcFuwDFI3qY?= =?us-ascii?Q?XxbbcMCjC4/mbtk6Lj7KbwQ9CN5jy+chwJ1xT9MvxOLCd835hbH8nJECZqwn?= =?us-ascii?Q?0rlRQ7qVUQFY1vuoKuD27rzgdWJqkxaz4ENIGwL/6ws3Odho5qRZgcwLB7GB?= =?us-ascii?Q?Sww14IddBRnqlBzqFKAeBdUEKxvn05A8SYOTFrNMZ2hFcsxTfwOcfPF407rc?= =?us-ascii?Q?ua/8ks6aX4wSAwkmqjMndi9lWVbZHuE3peRA/P70gdxfE0iO7ZtsmXIk6E0S?= =?us-ascii?Q?4PI6SN09PWMPgJIfffcmQKGXLClJpp8xGAI6MNmj3shzL/f46SghrHXxUKTA?= =?us-ascii?Q?IHhcEBYbTtiA7dfsWPiMK+AUfmU/k6JDxfr+mrlJD+K9qsw00itNXY6rA9G5?= =?us-ascii?Q?ZODr7wMPzWKH3Yj/DpbLmCSOAKmyb+Qcgq2z47oMrRxLPkcr+AfZ/f5UfsHn?= =?us-ascii?Q?1n5Zmv6u5aOzBoRwghbA7/RhA4gk01AnT8230WlQQdYwTYeVJThySGiE8zNC?= =?us-ascii?Q?t1bKlu/hW9oVu6pgFW3WXfxxp8vHe7/F+K/laHMKXb7jj0eUI76VUSrNKutD?= =?us-ascii?Q?mZsbcgCTBfVaCCFRW3V7teRRzJcySIJRwNvbWALOqlJlo0DEKxNk0DpZp76I?= =?us-ascii?Q?tjKpBmb4uLiHRNI/oQHqpgsfZyoI6iohGyftLHg+AYGTt3zn7+sdiz4yErLP?= =?us-ascii?Q?pYJwZdJOz8IzhtTlqfic2i/l8NkRKUA8T0MK9sIemCO9PK46xF7gRC25jUyf?= =?us-ascii?Q?T42Ke4IQoXr1B6WI8AfY+KToIjtSkBOlLzKW1mxBibBvx11c4rR4PLr0Xmsj?= =?us-ascii?Q?2sXXT9IBq3+kzUqQMLvsWVsbVSHC1S0ex7DV3UsBb0VLutfcnJeCaqZ8o+ns?= =?us-ascii?Q?OXzxTO7LdN4xhsyJONVAxRH5gcmuJ6kqYp2xDiXu6PNsQgIxRdxr1D/OwZo9?= =?us-ascii?Q?F929y9VJX1pGsp3WcUN2lKnD8CneKdXEj241cELp9IcGS6wMbDOL5+NA7d5h?= =?us-ascii?Q?nrAId9dkzIq7f9GY+bpo=3D?= X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1727; 6:JXYUrABXtjApoR3JvuL3+fxxRQae+CSrm9sL6b8qq4ES5l8MOWv5+fhk5yH0PtV/+eiIOF2puEAphmxAqFNHgeUkN1WQSJh89VlPGrJ0UxBM1I1L7kA66U0Fi4VHV+vLOEKsJASS7lK3w08x9WVTIepcohNH7NQay9GtHPLa1ZJX41L5c+xeN0dI1mb+drR4V+3FdiO3Qso+zgJwldz3FrvV+6761aNIAJD4rFJI6Izk6i0V0gN7KhYuBabrFYpHHimIe/3bnm8lc4WkNSmq9ej/Arl+FTDh8VGwwex9ukc7NwehSVI0c/xot61rvsevjlMG1r36ZnuMbirs1MqbiERFMBWJbTlXtdkT/CVWnKMYYSBBYBSHa5cviCs8X0aXJ9jUDSu0V3Pn6zItvM61cEi+lpeWBUjNCK55fix/1tpSgRuT32GI7coK5eyaTaQ3uhGwqRm8K7/xXzjv0NMybwWjHWvKiIjL8S3+xhWFQwuXQCfrA9IwiFgY5Z/EEXTQFUGRw7OB1CfqPZimTJsqoA==; 5:eACk+5tDYKKpPGZpbr7FXY4yDEJGyQH/PO+gr+jQtyrnuoWzkiLwPSTxRg67wMp9QxDq/PJMeh5DHBI+wj+69q7ucxA1Dzf9pX7GCB8sDCfrdHEmHhcDUp0u4f/LusyWjFjMt0Yn3L4/majU26P69Q==; 24:IbLuEAwZiHNbV3x+DZJK7yKWQRficD4aLkqgE39O2nApjI2cyw7g27UFDhfPVZjCwarK1hIo0gtyaW5oXV0pHkDGTyg+/V6LAVEMzrivS0Q= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1727; 7:NNDkkZG6/R3B6n3OAUVcBv2l64zdx4OeAzC3HbYpoIUoU5xUOoFQ2lsC5JTllxtHgH7QOWKc6yyrdKkVzqt8/VGjKuyVgJORSfcJbP5En46feuzv33xXI/5eohBcUD1qTh8F06tyugoooR5rwyjnENz4gQvUmmT7u0H4fh5cjxChJpbefEmvnCkcCwI5cOcACMuAOYCPq1lvsBXsPUgY/iqo5jRp3HBY3cQ+J+6wERkP0WAexM/p70+Stv1X4EsosPAkfgtxHVaBdVIzBudf6OjkaX9AvO0KpviIMuOeAbxMekI5Qd+U0lQ49p/6QE0+NBvxBm0e3ARmV1bVQSMKyw== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Apr 2017 10:51:40.3703 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0701MB1727 Subject: [dpdk-dev] [PATCH v6] 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: Sat, 29 Apr 2017 10:51:46 -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 --- v6: - Addressed all the review comments from Thomas http://dpdk.org/ml/archives/dev/2017-April/064964.html 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 | 233 +++++++++++++++++++++++++++++++++++++++++++++++++ mk/rte.sdkroot.mk | 4 + 3 files changed, 246 insertions(+) create mode 100755 devtools/build-tags.sh diff --git a/.gitignore b/.gitignore index c733967a8..6df5ba068 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,12 @@ doc/guides/cryptodevs/overview_feature_table.txt doc/guides/cryptodevs/overview_cipher_table.txt doc/guides/cryptodevs/overview_auth_table.txt doc/guides/cryptodevs/overview_aead_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 000000000..2b4258972 --- /dev/null +++ b/devtools/build-tags.sh @@ -0,0 +1,233 @@ +#!/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 +linux=true +bsd=true +x86_32=true +x86_64=true +ppc_64=true +arm_32=true +arm_64=true + +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" +} + +linux_sources() +{ + find_sources "lib/librte_eal/linuxapp" '*.[chS]' +} + +bsd_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_32_sources() +{ + arm_common + find_sources "lib/librte_eal/common/include/arch/arm" '*.[chS]' \ + "$skip_64b_files" +} + +arm_64_sources() +{ + arm_common + find_sources "lib/librte_eal/common/include/arch/arm" '*.[chS]' \ + "$skip_32b_files" + find_sources "$source_dirs" '*arm64.[chS]' +} + +x86_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]' +} + +x86_32_sources() +{ + x86_common + find_sources "lib/librte_eal/common/include/arch/x86" '*.[chS]' \ + "$skip_64b_files" +} + +x86_64_sources() +{ + x86_common + find_sources "lib/librte_eal/common/include/arch/x86" '*.[chS]' \ + "$skip_32b_files" +} + +ppc_64_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]' +} + +check_valid_target() +{ + cfgfound=false + allconfigs=$(make showconfigs) + for cfg in $allconfigs ; do + if [ "$cfg" = "$1" ] ; then + cfgfound=true + fi + done + if ! $cfgfound ; then + echo "Invalid config: $1" + print_usage + exit 0 + fi +} + +if [ -n "$2" ]; then + check_valid_target $2 + + echo $2 | grep -q "linuxapp-" || linux=false + echo $2 | grep -q "bsdapp-" || bsd=false + echo $2 | grep -q "x86_64-" || x86_64=false + echo $2 | grep -q "arm-" || arm_32=false + echo $2 | grep -q "arm64-" || arm_64=false + echo $2 | grep -q "ppc_64-" || ppc_64=false + echo $2 | grep -q -e "i686-" -e "x32-" || x86_32=false +fi + +all_sources() +{ + common_sources + if $linux ; then linux_sources ; fi + if $bsd ; then bsd_sources ; fi + if $x86_64 ; then x86_64_sources ; fi + if $x86_32 ; then x86_32_sources ; fi + if $ppc_64 ; then ppc_64_sources ; fi + if $arm_32 ; then arm_32_sources ; fi + if $arm_64 ; then arm_64_sources ; fi +} + +show_flags() +{ + if $verbose ; then + echo "mode: $1" + echo "config: $2" + echo "linux: $linux" + echo "bsd: $bsd" + echo "x86_32: $x86_32" + echo "x86_64: $x86_64" + echo "ppc_64: $ppc_64" + echo "arm_32: $arm_32" + echo "arm_64: $arm_64" + fi +} + +# Move to the root of the git tree +cd $(dirname $0)/.. + +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 685d2f55b..2843b7de1 100644 --- a/mk/rte.sdkroot.mk +++ b/mk/rte.sdkroot.mk @@ -92,6 +92,10 @@ default: all config showconfigs showversion showversionum: $(Q)$(MAKE) -f $(RTE_SDK)/mk/rte.sdkconfig.mk $@ +.PHONY: cscope gtags tags etags +cscope gtags tags etags: + $(Q)$(RTE_SDK)/devtools/build-tags.sh $@ $T + .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.12.2