libsmb: Add cli_create_send/recv
[Samba.git] / ctdb / wscript
blobf69bf580f71ed03d699e6648d3015235ea99f3e8
1 #!/usr/bin/env python
3 APPNAME = 'ctdb'
5 blddir = 'bin'
7 import sys, os
9 # find the buildtools directory
10 srcdir = '.'
11 while not os.path.exists(srcdir+'/buildtools') and len(srcdir.split('/')) < 5:
12 srcdir = srcdir + '/..'
13 sys.path.insert(0, srcdir + '/buildtools/wafsamba')
15 import wafsamba, samba_dist, Options, Logs
16 import samba_utils, samba_version
18 env = samba_utils.LOAD_ENVIRONMENT()
19 if os.path.isfile('./VERSION'):
20 vdir='.'
21 elif os.path.isfile('../VERSION'):
22 vdir='..'
23 else:
24 Logs.error("VERSION file not found")
26 version = samba_version.samba_version_file('%s/VERSION' % vdir, vdir, env)
27 VERSION = version.STRING.replace('-', '.')
29 Options.default_prefix = '/usr/local'
31 samba_dist.DIST_DIRS('''ctdb:. lib/replace:lib/replace lib/talloc:lib/talloc
32 lib/tevent:lib/tevent lib/tdb:lib/tdb lib/popt:lib/popt
33 lib/socket_wrapper:lib/socket_wrapper
34 buildtools:buildtools''')
36 def set_options(opt):
37 opt.PRIVATE_EXTENSION_DEFAULT('ctdb')
38 opt.RECURSE('lib/replace')
39 opt.RECURSE('lib/talloc')
40 opt.RECURSE('lib/tevent')
41 opt.RECURSE('lib/tdb')
43 opt.add_option('--enable-infiniband',
44 help=("Turn on infiniband support (default=no)"),
45 action="store_true", dest='ctdb_infiniband', default=False)
46 opt.add_option('--enable-pmda',
47 help=("Turn on PCP pmda support (default=no)"),
48 action="store_true", dest='ctdb_pmda', default=False)
50 opt.add_option('--with-logdir',
51 help=("Path to log directory"),
52 action="store", dest='ctdb_logdir', default=None)
53 opt.add_option('--with-socketpath',
54 help=("path to CTDB daemon socket"),
55 action="store_true", dest='ctdb_sockpath', default=False)
57 def configure(conf):
59 # CTDB relies on nested event loops
60 conf.env.TEVENT_DEPRECATED = 1
62 # No need to build python bindings for talloc/tevent/tdb
63 if conf.IN_LAUNCH_DIR():
64 Options.options.disable_python = True
66 conf.RECURSE('lib/replace')
67 conf.RECURSE('lib/popt')
68 conf.RECURSE('lib/talloc')
69 conf.RECURSE('lib/tevent')
70 conf.RECURSE('lib/tdb')
71 conf.RECURSE('lib/socket_wrapper')
73 have_pmda = False
74 if Options.options.ctdb_pmda:
75 pmda_support = True
77 if not conf.CHECK_HEADERS('pcp/pmapi.h pcp/impl.h pcp/pmda.h',
78 together=True):
79 pmda_support = False
80 if not conf.CHECK_FUNCS_IN('pmProgname', 'pcp'):
81 pmda_support = False
82 if not conf.CHECK_FUNCS_IN('pmdaDaemon', 'pcp_pmda'):
83 pmda_support = False
84 if pmda_support:
85 have_pmda = True
86 else:
87 Logs.error("PMDA support not available")
88 if have_pmda:
89 Logs.info('Building with PMDA support')
90 conf.define('HAVE_PMDA', 1)
91 conf.env.CTDB_PMDADIR = os.path.join(conf.env.LOCALSTATEDIR,
92 'lib/pcp/pmdas/ctdb')
94 have_infiniband = False
95 if Options.options.ctdb_infiniband:
96 ib_support = True
98 if not conf.CHECK_HEADERS('infiniband/verbs.h rdma/rdma_cma.h'):
99 ib_support = False
100 if not conf.CHECK_FUNCS_IN('ibv_create_qp', 'ibverbs'):
101 ib_support = False
102 if not conf.CHECK_FUNCS_IN('rdma_connect', 'rdmacm'):
103 ib_support = False
104 if ib_support:
105 have_infiniband = True
106 else:
107 Logs.error("Infiniband support not available")
108 if have_infiniband:
109 Logs.info('Building with Infiniband support')
110 conf.define('HAVE_INFINIBAND', 1)
111 conf.define('USE_INFINIBAND', 1)
113 conf.env.CTDB_BINDIR = os.path.join(conf.env.EXEC_PREFIX, 'bin')
114 conf.env.CTDB_ETCDIR = os.path.join(conf.env.SYSCONFDIR, 'ctdb')
115 conf.env.CTDB_VARDIR = os.path.join(conf.env.LOCALSTATEDIR, 'lib/ctdb')
116 conf.env.CTDB_RUNDIR = os.path.join(conf.env.LOCALSTATEDIR, 'run/ctdb')
118 machine = os.uname()[4]
119 if machine in ['x86_64', 'ppc64', 'powerpc64']:
120 conf.env.LIBDIR = conf.env.LIBDIR + '64'
122 if Options.options.ctdb_logdir:
123 conf.env.CTDB_LOGDIR = Options.options.ctdb_logdir
124 else:
125 conf.env.CTDB_LOGDIR = os.path.join(conf.env.LOCALSTATEDIR, 'log')
127 if Options.options.ctdb_sockpath:
128 conf.env.CTDB_SOCKPATH = Options.options.ctdb_sockpath
129 else:
130 conf.env.CTDB_SOCKPATH = os.path.join(conf.env.CTDB_RUNDIR,
131 'ctdbd.socket')
133 conf.ADD_CFLAGS('''-DBINDIR=\"%s\" -DETCDIR=\"%s\" -DVARDIR=\"%s\"
134 -DLOGDIR=\"%s\" -DSOCKPATH=\"%s\"
135 -DCTDB_VARDIR=\"%s\"''' % (
136 conf.env.CTDB_BINDIR,
137 conf.env.CTDB_ETCDIR,
138 conf.env.CTDB_VARDIR,
139 conf.env.CTDB_LOGDIR,
140 conf.env.CTDB_SOCKPATH,
141 conf.env.CTDB_VARDIR))
143 conf.env.CTDB_TEST_DATADIR = os.path.join(conf.env.EXEC_PREFIX,
144 'share/ctdb-tests')
145 conf.env.CTDB_TEST_LIBDIR = os.path.join(conf.env.LIBDIR, 'ctdb-tests')
147 conf.DEFINE('HAVE_CONFIG_H', 1, add_to_cflags=True)
148 conf.SAMBA_CONFIG_H()
150 def build(bld):
151 bld.RECURSE('lib/replace')
152 bld.RECURSE('lib/popt')
153 bld.RECURSE('lib/talloc')
154 bld.RECURSE('lib/tevent')
155 bld.RECURSE('lib/tdb')
156 bld.RECURSE('lib/socket_wrapper')
158 bld.SAMBA_GENERATOR('ctdb-version-header',
159 target='include/ctdb_version.h',
160 rule='../packaging/mkversion.sh ${TGT} %s' % (VERSION),
161 always=True)
163 bld.SAMBA_SUBSYSTEM('ctdb-util',
164 source=bld.SUBDIR('lib/util',
165 'util.c util_file.c util_time.c'),
166 includes='include include/internal',
167 deps='replace talloc tevent tdb')
169 bld.SAMBA_SUBSYSTEM('ctdb-util-misc',
170 source=bld.SUBDIR('lib/util',
171 '''db_wrap.c debug.c fault.c
172 idtree.c signal.c strlist.c
173 substitute.c'''),
174 includes='include include/internal lib/util',
175 deps='replace talloc tevent tdb')
177 bld.SAMBA_SUBSYSTEM('ctdb-tcp',
178 source=bld.SUBDIR('tcp',
179 'tcp_connect.c tcp_init.c tcp_io.c'),
180 includes='include include/internal',
181 deps='replace tdb talloc tevent')
183 ib_deps = ''
184 if bld.env.HAVE_INFINIBAND:
185 bld.SAMBA_SUBSYSTEM('ctdb-ib',
186 source=bld.SUBDIR('ib',
187 '''ibwrapper.c ibw_ctdb.c
188 ibw_ctdb_init.c'''),
189 includes='include include/internal',
190 deps='replace')
191 ib_deps = ' ctdb-ib rdmacm ibverbs'
193 bld.SAMBA_SUBSYSTEM('ctdb-common',
194 source=bld.SUBDIR('common',
195 '''ctdb_io.c ctdb_util.c ctdb_ltdb.c
196 ctdb_message.c cmdline.c rb_tree.c
197 system_common.c ctdb_fork.c'''),
198 includes='include include/internal common . lib/util',
199 deps='replace popt talloc tevent tdb')
201 bld.SAMBA_SUBSYSTEM('ctdb-common-util',
202 source=bld.SUBDIR('common',
203 'system_util.c ctdb_logging.c'),
204 includes='include include/internal',
205 deps='replace tevent tdb')
207 if sys.platform == 'linux2':
208 CTDB_SYSTEM_SRC = bld.SUBDIR('common', 'system_linux.c')
209 elif sys.platform == 'aix':
210 CTDB_SYSTEM_SRC = bld.SUBDIR('common', 'system_aix.c')
211 elif sys.platform == 'freebsd':
212 CTDB_SYSTEM_SRC = bld.SUBDIR('common', 'system_freebsd.c')
213 elif sys.platform == 'kfreebsd':
214 CTDB_SYSTEM_SRC = bld.SUBDIR('common', 'system_kfreebsd.c')
215 elif sys.platform == 'gnu':
216 CTDB_SYSTEM_SRC = bld.SUBDIR('common', 'system_gnu.c')
217 else:
218 Logs.error("Platform %s not supported" % sys.platform)
220 bld.SAMBA_SUBSYSTEM('ctdb-system',
221 source=CTDB_SYSTEM_SRC,
222 includes='include include/internal',
223 deps='replace talloc tevent tdb')
225 bld.SAMBA_SUBSYSTEM('ctdb-client',
226 source=bld.SUBDIR('client', 'ctdb_client.c'),
227 includes='include include/internal lib/util',
228 public_headers='include/ctdb_client.h',
229 deps='replace popt talloc tevent tdb')
231 bld.SAMBA_SUBSYSTEM('ctdb-server',
232 source='server/ctdbd.c ' +
233 bld.SUBDIR('server',
234 '''ctdb_daemon.c ctdb_recoverd.c
235 ctdb_recover.c ctdb_freeze.c
236 ctdb_tunables.c ctdb_monitor.c
237 ctdb_server.c ctdb_control.c
238 ctdb_call.c ctdb_ltdb_server.c
239 ctdb_traverse.c eventscript.c
240 ctdb_takeover.c ctdb_serverids.c
241 ctdb_persistent.c ctdb_keepalive.c
242 ctdb_logging.c ctdb_uptime.c
243 ctdb_vacuum.c ctdb_banning.c
244 ctdb_statistics.c
245 ctdb_update_record.c
246 ctdb_lock.c'''),
247 includes='include include/internal lib/util',
248 public_headers='''include/ctdb.h
249 include/ctdb_private.h
250 include/ctdb_protocol.h
251 include/ctdb_typesafe_cb.h''',
252 deps='replace popt talloc tevent tdb')
254 bld.SAMBA_BINARY('bin/ctdbd',
255 source='',
256 deps='''ctdb-server ctdb-client ctdb-common
257 ctdb-common-util ctdb-system ctdb-tcp
258 ctdb-util ctdb-util-misc''' +
259 ib_deps,
260 install_path='${SBINDIR}',
261 manpages='doc/ctdbd.1')
263 bld.SAMBA_BINARY('bin/ctdb',
264 source='tools/ctdb.c tools/ctdb_vacuum.c',
265 deps='''ctdb-client ctdb-common ctdb-common-util
266 ctdb-system ctdb-util ctdb-util-misc''',
267 install_path='${BINDIR}',
268 manpages='doc/ctdb.1')
270 bld.SAMBA_BINARY('bin/ltdbtool',
271 source='tools/ltdbtool.c',
272 includes='include',
273 deps='tdb',
274 install_path='${BINDIR}',
275 manpages='doc/ltdbtool.1')
277 bld.SAMBA_BINARY('bin/ctdb_lock_helper',
278 source='server/ctdb_lock_helper.c',
279 deps='ctdb-util ctdb-util-misc ctdb-common-util talloc tdb',
280 install_path='${BINDIR}')
282 bld.SAMBA_BINARY('bin/ctdb_event_helper',
283 source='server/ctdb_event_helper.c',
284 includes='include include/internal',
285 deps='ctdb-util ctdb-util-misc ctdb-common-util replace tdb',
286 install_path='${BINDIR}')
288 bld.SAMBA_GENERATOR('ctdb-smnotify-h',
289 source='utils/smnotify/smnotify.x',
290 target='utils/smnotify/smnotify.h',
291 rule='rpcgen -h ${SRC} > ${TGT}')
293 bld.SAMBA_GENERATOR('ctdb-smnotify-x',
294 source='utils/smnotify/smnotify.x',
295 target='utils/smnotify/gen_xdr.c',
296 rule='rpcgen -c ${SRC} > ${TGT}')
298 bld.SAMBA_GENERATOR('ctdb-smnotify-c',
299 source='utils/smnotify/smnotify.x',
300 target='utils/smnotify/gen_smnotify.c',
301 rule='rpcgen -l ${SRC} > ${TGT}')
303 bld.SAMBA_BINARY('bin/smnotify',
304 source=bld.SUBDIR('utils/smnotify',
305 'smnotify.c gen_smnotify.c gen_xdr.c'),
306 deps='ctdb-smnotify-h ctdb-smnotify-c ctdb-smnotify-x popt',
307 includes='utils utils/smnotify',
308 install_path='${BINDIR}')
310 bld.SAMBA_BINARY('bin/ping_pong',
311 source='utils/ping_pong/ping_pong.c',
312 deps='',
313 install_path='${BINDIR}',
314 manpages='doc/ping_pong.1')
316 if bld.env.HAVE_PMDA:
317 bld.SAMBA_BINARY('bin/pmdactdb',
318 source='utils/pmda/pmda_ctdb.c',
319 includes='include include/internal',
320 deps='''ctdb-client ctdb-common ctdb-system
321 ctdb-util-misc ctdb-util pcp_pmda pcp''',
322 install_path='${CTDB_PMDADIR}')
323 bld.INSTALL_FILES('${CTDB_PMDADIR}', 'utils/pmda/Install',
324 destname='Install')
325 bld.INSTALL_FILES('${CTDB_PMDADIR}', 'utils/pmda/Remove',
326 destname='Remove')
327 bld.INSTALL_FILES('${CTDB_PMDADIR}', 'utils/pmda/pmns',
328 destname='pmns')
329 bld.INSTALL_FILES('${CTDB_PMDADIR}', 'utils/pmda/domain.h',
330 destname='domain.h')
331 bld.INSTALL_FILES('${CTDB_PMDADIR}', 'utils/pmda/help',
332 destname='help')
333 bld.INSTALL_FILES('${CTDB_PMDADIR}', 'utils/pmda/README',
334 destname='README')
336 bld.MANPAGES('''doc/onnode.1 doc/ctdbd_wrapper.1 doc/ctdbd.conf.5
337 doc/ctdb.7 doc/ctdb-tunables.7''', True)
339 bld.INSTALL_FILES('${BINDIR}', 'tools/onnode',
340 destname='onnode', chmod=0755)
341 bld.INSTALL_FILES('${BINDIR}', 'tools/ctdb_diagnostics',
342 destname='ctdb_diagnostics', chmod=0755)
343 bld.INSTALL_FILES('${SBINDIR}', 'config/ctdbd_wrapper',
344 destname='ctdbd_wrapper', chmod=0755)
346 def SUBDIR_MODE_callback(arg, dirname, fnames):
347 for f in fnames:
348 fl = os.path.join(dirname, f)
349 if os.path.isdir(fl) or os.path.islink(fl):
350 continue
351 mode = os.lstat(fl).st_mode & 0777
352 if arg['trim_path']:
353 fl = samba_utils.os_path_relpath(fl, arg['trim_path'])
354 arg['file_list'].append([fl, mode])
356 def SUBDIR_MODE(path, trim_path=None):
357 pd = {'trim_path': trim_path, 'file_list': []}
358 os.path.walk(path, SUBDIR_MODE_callback, pd)
359 return pd['file_list']
361 etc_subdirs = [
362 'events.d',
363 'nfs-rpc-checks.d'
366 for t in etc_subdirs:
367 files = SUBDIR_MODE('config/%s' % t, trim_path='config')
368 for fmode in files:
369 bld.INSTALL_FILES(bld.env.CTDB_ETCDIR, 'config/%s' % fmode[0],
370 destname=fmode[0], chmod=fmode[1])
372 bld.INSTALL_FILES(bld.env.CTDB_ETCDIR, 'config/functions',
373 destname='functions')
375 etc_scripts = [
376 'ctdb-crash-cleanup.sh',
377 'debug-hung-script.sh',
378 'debug_locks.sh',
379 'gcore_trace.sh',
380 'notify.sh',
381 'statd-callout'
384 for t in etc_scripts:
385 bld.INSTALL_FILES(bld.env.CTDB_ETCDIR, 'config/' + t,
386 destname=t, chmod=0755)
388 bld.INSTALL_FILES('${SYSCONFDIR}/sudoers.d', 'config/ctdb.sudoers',
389 destname='ctdb')
391 bld.INSTALL_FILES('${CTDB_ETCDIR}/notify.d', 'config/notify.d.README',
392 destname='README')
394 bld.install_dir(bld.env.CTDB_LOGDIR)
395 bld.install_dir(bld.env.CTDB_RUNDIR)
396 bld.install_dir(bld.env.CTDB_VARDIR)
398 sed_expr = 's/@PACKAGE_VERSION@/%s/g' % VERSION
399 bld.SAMBA_GENERATOR('ctdb-pc',
400 source='ctdb.pc.in',
401 target='ctdb.pc',
402 rule='sed -e "%s" ${SRC} > ${TGT}' % sed_expr)
403 bld.INSTALL_FILES('${LIBDIR}/pkgconfig', 'ctdb.pc')
405 # Test binaries
406 ctdb_tests = [
407 'rb_test',
408 'ctdb_bench',
409 'ctdb_fetch',
410 'ctdb_fetch_one',
411 'ctdb_fetch_readonly_once',
412 'ctdb_fetch_readonly_loop',
413 'ctdb_trackingdb_test',
414 'ctdb_update_record',
415 'ctdb_update_record_persistent',
416 'ctdb_store',
417 'ctdb_traverse',
418 'ctdb_randrec',
419 'ctdb_persistent',
420 'ctdb_porting_tests',
421 'ctdb_transaction',
422 'ctdb_lock_tdb'
425 for t in ctdb_tests:
426 target = 'bin/' + t
427 src = 'tests/src/' + t + '.c'
429 bld.SAMBA_BINARY(target,
430 source=src,
431 deps='''ctdb-client ctdb-common ctdb-common-util
432 ctdb-system ctdb-util ctdb-util-misc''',
433 install_path='${CTDB_TEST_LIBDIR}')
435 bld.SAMBA_BINARY('bin/ctdb_takeover_tests',
436 source='tests/src/ctdb_takeover_tests.c',
437 deps='replace popt tdb tevent talloc ctdb-system' +
438 ib_deps,
439 includes='../include ../include/internal lib/util',
440 install_path='${CTDB_TEST_LIBDIR}')
442 bld.SAMBA_BINARY('bin/ctdb_functest',
443 source='tests/src/ctdb_functest.c',
444 deps='replace tdb tevent talloc popt ctdb-system',
445 includes='../include ../include/internal lib/util',
446 install_path='${CTDB_TEST_LIBDIR}')
448 bld.SAMBA_BINARY('bin/ctdb_stubtest',
449 source='tests/src/ctdb_test.c',
450 deps='replace tdb tevent talloc popt ctdb-system',
451 includes='../include ../include/internal lib/util',
452 install_path='${CTDB_TEST_LIBDIR}')
454 if bld.env.HAVE_INFINIBAND:
455 bld.SAMBA_BINARY('bin/ibwrapper_test',
456 source='ib/ibwrapper_test.c',
457 includes='include include/internal',
458 deps='''replace talloc ctdb-client ctdb-common
459 ctdb-system ctdb-util-misc ctdb-util''' +
460 ib_deps,
461 install_path='${CTDB_TEST_LIBDIR}')
463 test_subdirs = [
464 'complex',
465 'events.d',
466 'eventscripts',
467 'onnode',
468 'scripts',
469 'simple',
470 'takeover',
471 'tool'
474 for t in test_subdirs:
475 files = SUBDIR_MODE('tests/%s' % t, trim_path='tests')
476 for fmode in files:
477 bld.INSTALL_FILES(bld.env.CTDB_TEST_DATADIR, 'tests/%s' % fmode[0],
478 destname=fmode[0], chmod=fmode[1])
480 sed_expr = 's@^TEST_SCRIPTS_DIR=.*@&\\nexport TEST_BIN_DIR=\"%s\"@' % (
481 bld.env.CTDB_TEST_LIBDIR)
482 bld.SAMBA_GENERATOR('ctdb-test-wrap',
483 source='tests/scripts/test_wrap',
484 target='test_wrap',
485 rule='sed -e "%s" ${SRC} > ${TGT}' % sed_expr)
487 sed_expr1 = 's@^test_dir=.*@test_dir=%s\\nexport TEST_BIN_DIR=\"%s\"@' % (
488 bld.env.CTDB_DATA_DIR, bld.env.CTDB_LIBDIR)
489 sed_expr2 = 's@^\(export CTDB_TESTS_ARE_INSTALLED\)=false@\1=true@'
490 bld.SAMBA_GENERATOR('ctdb-test-runner',
491 source='tests/run_tests.sh',
492 target='ctdb_run_tests.sh',
493 rule='sed -e "%s" -e "%s" ${SRC} > ${TGT}' % (
494 sed_expr1, sed_expr2))
495 bld.INSTALL_FILES('${BINDIR}', 'ctdb_run_tests.sh',
496 destname='ctdb_run_tests', chmod=0755)
497 bld.symlink_as(os.path.join(bld.env.BINDIR, 'ctdb_run_cluster_tests'),
498 'ctdb_run_tests')
500 test_eventscript_links = [
501 'events.d',
502 'functions',
503 'nfs-rpc-checks.d'
506 test_link_dir = os.path.join(bld.env.CTDB_TEST_DATADIR,
507 'eventscripts/etc-ctdb')
508 for t in test_eventscript_links:
509 bld.symlink_as(os.path.join(test_link_dir, t),
510 os.path.join(bld.env.CTDB_ETCDIR, t))
513 def testonly(ctx):
514 cmd = 'tests/run_tests.sh -V tests/var'
515 samba_utils.RUN_COMMAND(cmd)
517 def test(ctx):
518 import Scripting
519 Scripting.commands.append('build')
520 Scripting.commands.append('testonly')
522 def autotest(ctx):
523 cmd = 'LD_PRELOAD=bin/shared/libsocket-wrapper.so tests/run_tests.sh -e -S -C'
524 samba_utils.RUN_COMMAND(cmd)
526 def dist():
528 samba_dist.DIST_FILES('VERSION:VERSION', extend=True)
530 t = 'include/ctdb_version.h'
531 out = os.system('packaging/mkversion.sh %s %s' % (t, VERSION))
532 samba_dist.DIST_FILES('ctdb/%s:%s' % (t, t), extend=True)
534 t = 'ctdb.spec'
535 sed_expr1 = 's/@VERSION@/%s/g' % VERSION
536 sed_expr2 = 's/@RELEASE@/%s/g' % '1'
537 os.system('sed -e "%s" -e "%s" packaging/RPM/ctdb.spec.in > %s' %
538 (sed_expr1, sed_expr2, t))
539 samba_dist.DIST_FILES('ctdb/%s:%s' % (t, t), extend=True)
541 manpages = [
542 'ctdb.1',
543 'ctdb.7',
544 'ctdbd.1',
545 'ctdbd.conf.5',
546 'ctdbd_wrapper.1',
547 'ctdb-tunables.7',
548 'ltdbtool.1'
551 os.system('make -C doc')
552 for t in manpages:
553 samba_dist.DIST_FILES('ctdb/doc/%s:doc/%s' % (t, t), extend=True)
554 samba_dist.DIST_FILES('ctdb/doc/%s.html:doc/%s.html' % (t, t),
555 extend=True)
557 samba_dist.dist()
559 def rpmonly(ctx):
560 cmd = 'rpmbuild -ta --clean --rmsource ctdb-%s.tar.gz' % VERSION
561 samba_utils.RUN_COMMAND(cmd)
563 def rpm(ctx):
564 import Scripting
565 Scripting.commands.append('dist')
566 Scripting.commands.append('rpmonly')
568 def ctags(ctx):
569 "build 'tags' file using ctags"
570 import Utils
571 source_root = os.path.dirname(Utils.g_module.root_path)
572 cmd = 'ctags $(find %s/.. -name "*.[ch]" | grep -v "*_proto\.h")' % source_root
573 print("Running: %s" % cmd)
574 os.system(cmd)