From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Tue, 29 May 2001 13:21:42 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Tue, 29 May 2001 13:21:32 -0400 Received: from quasar.osc.edu ([192.148.249.15]:53997 "EHLO quasar.osc.edu") by vger.kernel.org with ESMTP id ; Tue, 29 May 2001 13:21:25 -0400 Date: Tue, 29 May 2001 13:21:24 -0400 From: Pete Wyckoff To: Linux Kernel Subject: Re: ctags as generated by make tags Message-ID: <20010529132124.B13723@osc.edu> In-Reply-To: <20010528233004.E3107@somanetworks.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20010528233004.E3107@somanetworks.com>; from mark@somanetworks.com on Mon, May 28, 2001 at 11:30:04PM -0400 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org mark@somanetworks.com said: > Anyone have any good tips on getting tags to generate nicely? > > I'm having some problems with some tags for macros and such being > declared in several places since ctags doesn't honour any CPP #if'ing. > I've currently got my Makefile doing this, which seems to give me some > sanity as the redefinitions tend to be made by drivers and such. Like net_device gets redefined or typedefed in a bunch of drivers striving for backward compatibility. > I'm basically walking the include tree by depth without doing any sorting > of tags and then doing a stable sort on the final tags file. I wrote a little perl script to post-process the tags file to sort duplicate entries that are "more important" to the top, where that means struct >> typedef >> union >> ... >> #define >> ... So vim goes to the "real" definition of net_device first, before any of the overridies in the drivers. See http://www.osc.edu/~pw/index.html#tags for the script, and a more complete set of ignores. -- Pete