build: Add a ctags command to build a ctags-style tags file
authorKai Blin <kai@samba.org>
Fri, 19 Mar 2010 09:10:36 +0000 (10:10 +0100)
committerAndrew Tridgell <tridge@samba.org>
Tue, 6 Apr 2010 10:26:54 +0000 (20:26 +1000)
source4/wscript

index 75e2cc94ea1d9f707a25dc169ecfe5ddc55e82a1..659876793fe67228b9d1e4a4ccadb3a05bad6c0c 100644 (file)
@@ -75,6 +75,14 @@ def etags(ctx):
     print "Running: %s" % cmd
     os.system(cmd)
 
+def ctags(ctx):
+    '''build 'tags' file using ctags'''
+    import Utils
+    source_root = os.path.dirname(Utils.g_module.root_path)
+    cmd = 'ctags $(find %s/.. -name "*.[ch]" | grep -v "*_proto\.h")' % source_root
+    print "Rinning: %s" % cmd
+    os.system(cmd)
+
 # putting this here enabled build in the list
 # of commands in --help
 def build(bld):