wscript: fix and improve dist target (waf 1.6)
[ladish.git] / wscript
blobf8e5c34d7719aa17783e593235d9d08e89e14e70
1 #! /usr/bin/env python
2 # encoding: utf-8
4 import os
5 import Options
6 import Utils
7 import shutil
8 import re
9 import waflib
10 from waflib.Scripting import Dist
12 parallel_debug = False
14 APPNAME='ladish'
15 VERSION='0.3-rc'
16 DBUS_NAME_BASE = 'org.ladish'
17 RELEASE = False
19 # these variables are mandatory ('/' are converted automatically)
20 top = '.'
21 out = 'build'
23 from Logs import pprint
25 def display_msg(conf, msg="", status = None, color = None):
26 if status:
27 conf.msg(msg, status, color)
28 else:
29 pprint('NORMAL', msg)
31 def display_raw_text(conf, text, color = 'NORMAL'):
32 pprint(color, text, sep = '')
34 def display_line(conf, text, color = 'NORMAL'):
35 pprint(color, text, sep = os.linesep)
37 def yesno(bool):
38 if bool:
39 return "yes"
40 else:
41 return "no"
43 def options(opt):
44 opt.load('compiler_c')
45 opt.load('compiler_cxx')
46 opt.load('boost')
47 opt.load('python')
48 opt.add_option('--enable-pkg-config-dbus-service-dir', action='store_true', default=False, help='force D-Bus service install dir to be one returned by pkg-config')
49 opt.add_option('--enable-liblash', action='store_true', default=False, help='Build LASH compatibility library')
50 opt.add_option('--enable-pylash', action='store_true', default=False, help='Build python bindings for LASH compatibility library')
51 opt.add_option('--debug', action='store_true', default=False, dest='debug', help="Build debuggable binaries")
52 opt.add_option('--doxygen', action='store_true', default=False, help='Enable build of doxygen documentation')
53 opt.add_option('--distnodeps', action='store_true', default=False, help="When creating distribution tarball, don't package git submodules")
54 opt.add_option('--distname', type='string', default=None, help="Name for the distribution tarball")
55 opt.add_option('--distsuffix', type='string', default="", help="String to append to the distribution tarball name")
56 opt.add_option('--tagdist', action='store_true', default=False, help='Create of git tag for distname')
57 if parallel_debug:
58 opt.load('parallel_debug')
60 def add_cflag(conf, flag):
61 conf.env.append_unique('CXXFLAGS', flag)
62 conf.env.append_unique('CFLAGS', flag)
64 def add_linkflag(conf, flag):
65 conf.env.append_unique('LINKFLAGS', flag)
67 def check_gcc_optimizations_enabled(flags):
68 gcc_optimizations_enabled = False
69 for flag in flags:
70 if len(flag) < 2 or flag[0] != '-' or flag[1] != 'O':
71 continue
72 if len(flag) == 2:
73 gcc_optimizations_enabled = True;
74 else:
75 gcc_optimizations_enabled = flag[2] != '0';
76 return gcc_optimizations_enabled
78 def create_service_taskgen(bld, target, opath, binary):
79 bld(
80 features = 'subst', # the feature 'subst' overrides the source/target processing
81 source = os.path.join('daemon', 'dbus.service.in'), # list of string or nodes
82 target = target, # list of strings or nodes
83 install_path = bld.env['DBUS_SERVICES_DIR'] + os.path.sep,
84 # variables to use in the substitution
85 dbus_object_path = opath,
86 daemon_bin_path = os.path.join(bld.env['PREFIX'], 'bin', binary))
88 def configure(conf):
89 conf.load('compiler_c')
90 conf.load('compiler_cxx')
91 conf.load('boost')
92 conf.load('python')
93 if parallel_debug:
94 conf.load('parallel_debug')
96 # dladdr() is used by daemon/sigsegv.c
97 # dlvsym() is used by the alsapid library
98 conf.check_cc(msg="Checking for libdl", lib=['dl'], uselib_store='DL')
100 # forkpty() is used by ladishd
101 conf.check_cc(msg="Checking for libutil", lib=['util'], uselib_store='UTIL')
103 conf.check_cfg(
104 package = 'jack',
105 mandatory = True,
106 errmsg = "not installed, see http://jackaudio.org/",
107 args = '--cflags --libs')
109 conf.check_cfg(
110 package = 'dbus-1',
111 atleast_version = '1.0.0',
112 mandatory = True,
113 errmsg = "not installed, see http://dbus.freedesktop.org/",
114 args = '--cflags --libs')
116 dbus_dir = conf.check_cfg(package='dbus-1', args='--variable=session_bus_services_dir', msg="Retrieving D-Bus services dir")
117 if not dbus_dir:
118 return
120 dbus_dir = dbus_dir.strip()
121 conf.env['DBUS_SERVICES_DIR_REAL'] = dbus_dir
123 if Options.options.enable_pkg_config_dbus_service_dir:
124 conf.env['DBUS_SERVICES_DIR'] = dbus_dir
125 else:
126 conf.env['DBUS_SERVICES_DIR'] = os.path.join(os.path.normpath(conf.env['PREFIX']), 'share', 'dbus-1', 'services')
128 conf.env['LIBDIR'] = os.path.join(os.path.normpath(conf.env['PREFIX']), 'lib')
130 conf.env['BUILD_DOXYGEN_DOCS'] = Options.options.doxygen
132 conf.check_cfg(
133 package = 'uuid',
134 mandatory = True,
135 errmsg = "not installed, see http://e2fsprogs.sourceforge.net/",
136 args = '--cflags --libs')
138 conf.check(
139 header_name='expat.h',
140 mandatory = True,
141 errmsg = "not installed, see http://expat.sourceforge.net/")
143 conf.env['LIB_EXPAT'] = ['expat']
145 build_gui = True
147 if build_gui and not conf.check_cfg(
148 package = 'glib-2.0',
149 mandatory = False,
150 errmsg = "not installed, see http://www.gtk.org/",
151 args = '--cflags --libs'):
152 build_gui = False
154 if build_gui and not conf.check_cfg(
155 package = 'dbus-glib-1',
156 mandatory = False,
157 errmsg = "not installed, see http://dbus.freedesktop.org/",
158 args = '--cflags --libs'):
159 build_gui = False
161 if build_gui and not conf.check_cfg(
162 package = 'gtk+-2.0',
163 mandatory = False,
164 atleast_version = '2.20.0',
165 errmsg = "not installed, see http://www.gtk.org/",
166 args = '--cflags --libs'):
167 build_gui = False
169 if build_gui and not conf.check_cfg(
170 package = 'flowcanvas',
171 mandatory = False,
172 atleast_version = '0.6.4',
173 errmsg = "not installed, see http://drobilla.net/software/flowcanvas/",
174 args = '--cflags --libs'):
175 build_gui = False
177 if build_gui:
178 # We need the boost headers package (e.g. libboost-dev)
179 # shared_ptr.hpp and weak_ptr.hpp
180 build_gui = conf.check_boost(errmsg="not found, see http://boost.org/")
182 conf.env['BUILD_GLADISH'] = build_gui
184 conf.env['BUILD_LIBLASH'] = Options.options.enable_liblash
185 conf.env['BUILD_PYLASH'] = Options.options.enable_pylash
186 if conf.env['BUILD_PYLASH'] and not conf.env['BUILD_LIBLASH']:
187 conf.fatal("pylash build was requested but liblash was not")
188 conf.env['BUILD_PYLASH'] = False
189 if conf.env['BUILD_PYLASH']:
190 conf.check_python_version()
191 conf.check_python_headers()
193 conf.env['BUILD_WERROR'] = not RELEASE
194 if conf.env['BUILD_WERROR']:
195 add_cflag(conf, '-Wall')
196 add_cflag(conf, '-Werror')
197 # for pre gcc-4.4, enable optimizations so use of uninitialized variables gets detected
198 try:
199 is_gcc = conf.env['CC_NAME'] == 'gcc'
200 if is_gcc:
201 gcc_ver = []
202 for n in conf.env['CC_VERSION']:
203 gcc_ver.append(int(n))
204 if gcc_ver[0] < 4 or gcc_ver[1] < 4:
205 #print "optimize force enable is required"
206 if not check_gcc_optimizations_enabled(conf.env['CFLAGS']):
207 if Options.options.debug:
208 print "C optimization must be forced in order to enable -Wuninitialized"
209 print "However this will not be made because debug compilation is enabled"
210 else:
211 print "C optimization forced in order to enable -Wuninitialized"
212 conf.env.append_unique('CFLAGS', "-O")
213 except:
214 pass
216 conf.env['BUILD_DEBUG'] = Options.options.debug
217 if conf.env['BUILD_DEBUG']:
218 add_cflag(conf, '-g')
219 add_cflag(conf, '-O0')
220 add_linkflag(conf, '-g')
222 conf.env['DATA_DIR'] = os.path.normpath(os.path.join(conf.env['PREFIX'], 'share', APPNAME))
224 # write some parts of the configure environment to the config.h file
225 conf.define('DATA_DIR', conf.env['DATA_DIR'])
226 conf.define('PACKAGE_VERSION', VERSION)
227 conf.define('DBUS_NAME_BASE', DBUS_NAME_BASE)
228 conf.define('DBUS_BASE_PATH', '/' + DBUS_NAME_BASE.replace('.', '/'))
229 conf.define('BASE_NAME', APPNAME)
230 conf.define('_GNU_SOURCE', 1)
231 conf.write_config_header('config.h')
233 display_msg(conf)
235 display_msg(conf, "==================")
236 version_msg = APPNAME + "-" + VERSION
238 if os.access('version.h', os.R_OK):
239 data = file('version.h').read()
240 m = re.match(r'^#define GIT_VERSION "([^"]*)"$', data)
241 if m != None:
242 version_msg += " exported from " + m.group(1)
243 elif os.access('.git', os.R_OK):
244 version_msg += " git revision will checked and eventually updated during build"
246 display_msg(conf, version_msg)
248 display_msg(conf)
249 display_msg(conf, "Install prefix", conf.env['PREFIX'], 'CYAN')
251 display_msg(conf, 'Build gladish', yesno(conf.env['BUILD_GLADISH']))
252 display_msg(conf, 'Build liblash', yesno(Options.options.enable_liblash))
253 display_msg(conf, 'Build pylash', yesno(conf.env['BUILD_PYLASH']))
254 display_msg(conf, 'Treat warnings as errors', yesno(conf.env['BUILD_WERROR']))
255 display_msg(conf, 'Debuggable binaries', yesno(conf.env['BUILD_DEBUG']))
256 display_msg(conf, 'Build doxygen documentation', yesno(conf.env['BUILD_DOXYGEN_DOCS']))
258 if conf.env['DBUS_SERVICES_DIR'] != conf.env['DBUS_SERVICES_DIR_REAL']:
259 display_msg(conf)
260 display_line(conf, "WARNING: D-Bus session services directory as reported by pkg-config is", 'RED')
261 display_raw_text(conf, "WARNING:", 'RED')
262 display_line(conf, conf.env['DBUS_SERVICES_DIR_REAL'], 'CYAN')
263 display_line(conf, 'WARNING: but service file will be installed in', 'RED')
264 display_raw_text(conf, "WARNING:", 'RED')
265 display_line(conf, conf.env['DBUS_SERVICES_DIR'], 'CYAN')
266 display_line(conf, 'WARNING: You may need to adjust your D-Bus configuration after installing ladish', 'RED')
267 display_line(conf, 'WARNING: You can override dbus service install directory', 'RED')
268 display_line(conf, 'WARNING: with --enable-pkg-config-dbus-service-dir option to this script', 'RED')
270 display_msg(conf, 'C compiler flags', repr(conf.env['CFLAGS']))
271 display_msg(conf, 'C++ compiler flags', repr(conf.env['CXXFLAGS']))
273 if not conf.env['BUILD_GLADISH']:
274 display_msg(conf)
275 display_line(conf, "WARNING: The GUI frontend will not built", 'RED')
277 display_msg(conf)
279 def git_ver(self):
280 bld = self.generator.bld
281 header = self.outputs[0].abspath()
282 if os.access('./version.h', os.R_OK):
283 header = os.path.join(os.getcwd(), out, "version.h")
284 shutil.copy('./version.h', header)
285 data = file(header).read()
286 m = re.match(r'^#define GIT_VERSION "([^"]*)"$', data)
287 if m != None:
288 self.ver = m.group(1)
289 pprint('BLUE', "tarball from git revision " + self.ver)
290 else:
291 self.ver = "tarball"
292 return
294 if bld.srcnode.find_node('.git'):
295 self.ver = bld.cmd_and_log("LANG= git rev-parse HEAD", quiet=waflib.Context.BOTH).splitlines()[0]
296 if bld.cmd_and_log("LANG= git diff-index --name-only HEAD", quiet=waflib.Context.BOTH).splitlines():
297 self.ver += "-dirty"
299 pprint('BLUE', "git revision " + self.ver)
300 else:
301 self.ver = "unknown"
303 fi = open(header, 'w')
304 fi.write('#define GIT_VERSION "%s"\n' % self.ver)
305 fi.close()
307 def build(bld):
308 if not bld.env['DATA_DIR']:
309 raise "DATA_DIR is emtpy"
311 bld(rule=git_ver, target='version.h', update_outputs=True, always=True, ext_out=['.h'])
313 daemon = bld.program(source = [], features = 'c cprogram', includes = [bld.path.get_bld()])
314 daemon.target = 'ladishd'
315 daemon.uselib = 'DBUS-1 UUID EXPAT DL UTIL'
316 daemon.ver_header = 'version.h'
317 # Make backtrace function lookup to work for functions in the executable itself
318 daemon.env.append_value("LINKFLAGS", ["-Wl,-E"])
320 for source in [
321 'main.c',
322 'loader.c',
323 'log.c',
324 'sigsegv.c',
325 'proctitle.c',
326 'appdb.c',
327 'procfs.c',
328 'control.c',
329 'studio.c',
330 'graph.c',
331 'client.c',
332 'port.c',
333 'virtualizer.c',
334 'dict.c',
335 'graph_dict.c',
336 'escape.c',
337 'studio_jack_conf.c',
338 'studio_list.c',
339 'save.c',
340 'load.c',
341 'cmd_load_studio.c',
342 'cmd_new_studio.c',
343 'cmd_rename_studio.c',
344 'cmd_save_studio.c',
345 'cmd_start_studio.c',
346 'cmd_stop_studio.c',
347 'cmd_unload_studio.c',
348 'cmd_new_app.c',
349 'cmd_change_app_state.c',
350 'cmd_remove_app.c',
351 'cmd_create_room.c',
352 'cmd_delete_room.c',
353 'cmd_save_project.c',
354 'cmd_unload_project.c',
355 'cmd_load_project.c',
356 'cmd_exit.c',
357 'cqueue.c',
358 'app_supervisor.c',
359 'room.c',
360 'room_save.c',
361 'room_load.c',
362 'recent_store.c',
363 'recent_projects.c',
365 daemon.source.append(os.path.join("daemon", source))
367 for source in [
368 'jack_proxy.c',
369 'graph_proxy.c',
370 'a2j_proxy.c',
371 "jmcore_proxy.c",
372 "notify_proxy.c",
373 "conf_proxy.c",
375 daemon.source.append(os.path.join("proxies", source))
377 for source in [
378 'signal.c',
379 'method.c',
380 'error.c',
381 'object_path.c',
382 'interface.c',
383 'helpers.c',
385 daemon.source.append(os.path.join("dbus", source))
387 for source in [
388 'time.c',
389 'dirhelpers.c',
390 'catdup.c',
392 daemon.source.append(os.path.join("common", source))
394 daemon.source.append(os.path.join("alsapid", "helper.c"))
396 # process dbus.service.in -> ladish.service
397 create_service_taskgen(bld, DBUS_NAME_BASE + '.service', DBUS_NAME_BASE, daemon.target)
399 #####################################################
400 # jmcore
401 jmcore = bld.program(source = [], features = 'c cprogram', includes = [bld.path.get_bld()])
402 jmcore.target = 'jmcore'
403 jmcore.uselib = 'DBUS-1 JACK'
404 jmcore.defines = ['LOG_OUTPUT_STDOUT']
405 jmcore.source = ['jmcore.c']
407 for source in [
408 #'signal.c',
409 'method.c',
410 'error.c',
411 'object_path.c',
412 'interface.c',
413 'helpers.c',
415 jmcore.source.append(os.path.join("dbus", source))
417 create_service_taskgen(bld, DBUS_NAME_BASE + '.jmcore.service', DBUS_NAME_BASE + ".jmcore", jmcore.target)
419 #####################################################
420 # conf
421 ladiconfd = bld.program(source = [], features = 'c cprogram', includes = [bld.path.get_bld()])
422 ladiconfd.target = 'ladiconfd'
423 ladiconfd.uselib = 'DBUS-1'
424 ladiconfd.defines = ['LOG_OUTPUT_STDOUT']
425 ladiconfd.source = ['conf.c']
427 for source in [
428 'dirhelpers.c',
429 'catdup.c',
431 ladiconfd.source.append(os.path.join("common", source))
433 for source in [
434 'signal.c',
435 'method.c',
436 'error.c',
437 'object_path.c',
438 'interface.c',
439 'helpers.c',
441 ladiconfd.source.append(os.path.join("dbus", source))
443 create_service_taskgen(bld, DBUS_NAME_BASE + '.conf.service', DBUS_NAME_BASE + ".conf", ladiconfd.target)
445 #####################################################
446 # alsapid
447 bld.shlib(source = [os.path.join("alsapid", 'lib.c'), os.path.join("alsapid", "helper.c")], target = 'alsapid', uselib = 'DL')
449 #####################################################
450 # liblash
451 if bld.env['BUILD_LIBLASH']:
452 liblash = bld.shlib(source = [], features = 'c cshlib', includes = [bld.path.get_bld()])
453 liblash.uselib = 'DBUS-1'
454 liblash.target = 'lash'
455 liblash.vnum = "1.1.1"
456 liblash.defines = ['LOG_OUTPUT_STDOUT']
457 liblash.source = [os.path.join("lash_compat", "liblash", 'lash.c'), os.path.join("common", "catdup.c")]
459 bld.install_files('${PREFIX}/include/lash', bld.path.ant_glob('lash_compat/liblash/lash/*.h'))
461 # process lash-1.0.pc.in -> lash-1.0.pc
462 bld(
463 features = 'subst', # the feature 'subst' overrides the source/target processing
464 source = os.path.join("lash_compat", 'lash-1.0.pc.in'), # list of string or nodes
465 target = 'lash-1.0.pc', # list of strings or nodes
466 install_path = '${LIBDIR}/pkgconfig/',
467 # variables to use in the substitution
468 prefix = bld.env['PREFIX'],
469 exec_prefix = bld.env['PREFIX'],
470 libdir = bld.env['LIBDIR'],
471 includedir = os.path.normpath(bld.env['PREFIX'] + '/include'))
473 #####################################################
474 # pylash
475 if bld.env['BUILD_PYLASH']:
476 pylash = bld.shlib(features = 'c cshlib pyext', source = [])
477 pylash.target = '_lash'
478 pylash.use = 'lash'
479 pylash.install_path = '${PYTHONDIR}'
481 for source in [
482 'lash.c',
483 'lash_wrap.c',
485 pylash.source.append(os.path.join("lash_compat", "pylash", source))
487 bld.install_files('${PYTHONDIR}', os.path.join("lash_compat", "pylash", "lash.py"))
489 #####################################################
490 # gladish
491 if bld.env['BUILD_GLADISH']:
492 gladish = bld.program(source = [], features = 'c cxx cxxprogram', includes = [bld.path.get_bld()])
493 gladish.target = 'gladish'
494 gladish.defines = ['LOG_OUTPUT_STDOUT']
495 gladish.uselib = 'DBUS-1 DBUS-GLIB-1 FLOWCANVAS'
497 gladish.source = []
499 for source in [
500 'main.c',
501 'load_project_dialog.c',
502 'save_project_dialog.c',
503 'world_tree.c',
504 'graph_view.c',
505 'canvas.cpp',
506 'graph_canvas.c',
507 'gtk_builder.c',
508 'ask_dialog.c',
509 'create_room_dialog.c',
510 'menu.c',
511 'dynmenu.c',
512 'toolbar.c',
513 'about.c',
514 'dbus.c',
515 'studio.c',
516 'studio_list.c',
517 'dialogs.c',
518 'jack.c',
519 'control.c',
520 'pixbuf.c',
521 'room.c',
522 'statusbar.c',
523 'action.c',
524 'settings.c',
525 'zoom.c',
527 gladish.source.append(os.path.join("gui", source))
529 for source in [
530 'jack_proxy.c',
531 'graph_proxy.c',
532 'studio_proxy.c',
533 'control_proxy.c',
534 'app_supervisor_proxy.c',
535 "room_proxy.c",
536 "conf_proxy.c",
538 gladish.source.append(os.path.join("proxies", source))
540 for source in [
541 'method.c',
542 'helpers.c',
544 gladish.source.append(os.path.join("dbus", source))
546 for source in [
547 'catdup.c',
548 'file.c',
550 gladish.source.append(os.path.join("common", source))
552 # GtkBuilder UI definitions (XML)
553 bld.install_files('${DATA_DIR}', 'gui/gladish.ui')
555 # Help text
556 bld.install_files('${DATA_DIR}/help', 'gui/help/default.txt')
558 bld.install_files('${PREFIX}/bin', 'ladish_control', chmod=0755)
560 # 'Desktop' file (menu entry, icon, etc)
561 bld.install_files('${PREFIX}/share/applications/', 'gui/gladish.desktop', chmod=0644)
563 # Icons
564 icon_sizes = ['16x16', '22x22', '24x24', '32x32', '48x48', '256x256']
565 for icon_size in icon_sizes:
566 bld.path.ant_glob('art/' + icon_size + '/apps/*.png')
567 bld.install_files('${PREFIX}/share/icons/hicolor/' + icon_size + '/apps/', 'art/' + icon_size + '/apps/gladish.png')
569 status_images = []
570 for status in ["down", "unloaded", "started", "stopped", "warning", "error"]:
571 status_images.append("art/status_" + status + ".png")
573 bld.install_files('${DATA_DIR}', status_images)
574 bld.install_files('${DATA_DIR}', "art/ladish-logo-128x128.png")
575 bld.install_files('${DATA_DIR}', ["COPYING", "AUTHORS", "README", "NEWS"])
577 if bld.env['BUILD_DOXYGEN_DOCS'] == True:
578 html_docs_source_dir = "build/default/html"
579 if bld.cmd == 'clean':
580 if os.access(html_docs_source_dir, os.R_OK):
581 pprint('CYAN', "Removing doxygen generated documentation...")
582 shutil.rmtree(html_docs_source_dir)
583 pprint('CYAN', "Removing doxygen generated documentation done.")
584 elif bld.cmd == 'build':
585 if not os.access(html_docs_source_dir, os.R_OK):
586 os.popen("doxygen").read()
587 else:
588 pprint('CYAN', "doxygen documentation already built.")
590 def get_tags_dirs():
591 source_root = os.path.dirname(Utils.g_module.root_path)
592 if 'relpath' in os.path.__all__:
593 source_root = os.path.relpath(source_root)
594 paths = source_root
595 paths += " " + os.path.join(source_root, "common")
596 paths += " " + os.path.join(source_root, "dbus")
597 paths += " " + os.path.join(source_root, "proxies")
598 paths += " " + os.path.join(source_root, "daemon")
599 paths += " " + os.path.join(source_root, "gui")
600 paths += " " + os.path.join(source_root, "example-apps")
601 paths += " " + os.path.join(source_root, "lib")
602 paths += " " + os.path.join(source_root, "lash_compat", "liblash")
603 paths += " " + os.path.join(source_root, "lash_compat", "liblash", "lash")
604 return paths
606 def gtags(ctx):
607 '''build tag files for GNU global'''
608 cmd = "find %s -mindepth 1 -maxdepth 1 -name '*.[ch]' -print | gtags --statistics -f -" % get_tags_dirs()
609 #print("Running: %s" % cmd)
610 os.system(cmd)
612 def etags(ctx):
613 '''build TAGS file using etags'''
614 cmd = "find %s -mindepth 1 -maxdepth 1 -name '*.[ch]' -print | etags -" % get_tags_dirs()
615 #print("Running: %s" % cmd)
616 os.system(cmd)
617 os.system("stat -c '%y' TAGS")
619 class ladish_dist(waflib.Scripting.Dist):
620 cmd = 'dist'
621 fun = 'dist'
623 def __init__(self):
624 Dist.__init__(self)
625 if Options.options.distname:
626 self.base_name = Options.options.distname
627 else:
628 try:
629 self.base_name = self.cmd_and_log("LANG= git describe --tags", quiet=waflib.Context.BOTH).splitlines()[0]
630 except:
631 self.base_name = APPNAME + '-' + VERSION
632 self.base_name += Options.options.distsuffix
634 #print self.base_name
636 if Options.options.distname and Options.options.tagdist:
637 ret = self.exec_command("LANG= git tag " + self.base_name)
638 if ret != 0:
639 raise waflib.Errors.WafError('git tag creation failed')
641 def get_base_name(self):
642 return self.base_name
644 def get_excl(self):
645 excl = Dist.get_excl(self)
647 excl += ' .gitmodules'
648 excl += ' GTAGS'
649 excl += ' GRTAGS'
650 excl += ' GPATH'
651 excl += ' GSYMS'
653 if Options.options.distnodeps:
654 excl += ' laditools'
655 excl += ' flowcanvas'
656 excl += ' jack2'
657 excl += ' a2jmidid'
659 #print repr(excl)
660 return excl
662 def execute(self):
663 shutil.copy('./build/version.h', "./")
664 try:
665 super(ladish_dist, self).execute()
666 finally:
667 os.remove("version.h")