Add support for ctags to scons.

This commit is contained in:
Arthur Britto
2012-03-12 18:08:31 -07:00
parent 29ab1c3065
commit 1aa2f0b85e

View File

@@ -4,14 +4,29 @@
import glob import glob
# Put objects files in their own directory. CTAGS = '/usr/bin/exuberant-ctags'
for dir in ['src', 'database', 'json', 'util']:
VariantDir('obj/'+dir, dir, duplicate=0) #
# scons tools
#
env = Environment( env = Environment(
tools = ['default', 'protoc'] tools = ['default', 'protoc']
) )
#
# Builder for CTags
#
ctags = Builder(action = '$CTAGS $CTAGSOPTIONS -f $TARGET $SOURCES')
env.Append(BUILDERS = { 'CTags' : ctags })
env.Replace(CTAGS = CTAGS, CTAGSOPTIONS = '--tag-relative')
#
# Put objects files in their own directory.
#
for dir in ['src', 'database', 'json', 'util']:
VariantDir('obj/'+dir, dir, duplicate=0)
# Use openssl # Use openssl
env.ParseConfig('pkg-config --cflags --libs openssl') env.ParseConfig('pkg-config --cflags --libs openssl')
@@ -55,5 +70,8 @@ for file in NEWCOIN_SRCS:
NEWCOIN_OBJS += PROTO_SRCS NEWCOIN_OBJS += PROTO_SRCS
env.Program('newcoind', NEWCOIN_OBJS) newcoind = env.Program('newcoind', NEWCOIN_OBJS)
tags = env.CTags('obj/tags', NEWCOIN_SRCS)
Default(newcoind, tags)