build: added 'waf etags' target
authorAndrew Tridgell <tridge@samba.org>
Thu, 18 Mar 2010 02:17:43 +0000 (13:17 +1100)
committerAndrew Tridgell <tridge@samba.org>
Tue, 6 Apr 2010 10:26:52 +0000 (20:26 +1000)
source4/wscript

index fe5df0d959a47d1bfef2cb5581eb5015a110fb20..10ea2b02a42b3013baab50d52dc16f962abcb998 100644 (file)
@@ -3,7 +3,7 @@
 srcdir = '..'
 blddir = 'bin'
 
-import sys
+import sys, os
 sys.path.insert(0, srcdir+"/buildtools/wafsamba")
 import wafsamba, Options
 
@@ -67,3 +67,11 @@ def configure(conf):
     conf.SAMBA_CONFIG_H('include/config.h')
 
 
+def etags(ctx):
+    '''build TAGS file using etags'''
+    import Utils
+    source_root = os.path.dirname(Utils.g_module.root_path)
+    cmd = 'etags $(find %s/.. -name "*.[ch]")' % source_root
+    print "Running: %s" % cmd
+    os.system(cmd)
+