Beispiel #1
0
    def sources(self, build):
        if int(build.flags['shoutcast_internal']):
            # Clone our main environment so we don't change any settings in the
            # Mixxx environment
            libshout_env = build.env.Clone()

            if build.toolchain_is_gnu:
                libshout_env.Append(CCFLAGS='-pthread')
                libshout_env.Append(LINKFLAGS='-pthread')

            libshout_env.Append(CPPPATH="#lib/libshout")
            libshout_dir = libshout_env.Dir("#lib/libshout")

            env = libshout_env
            SCons.Export('env')
            SCons.Export('build')
            env.SConscript(env.File('SConscript', libshout_dir))

            build.env.Append(LIBPATH=libshout_dir)
            build.env.Append(LIBS=[
                'shout_mixxx', 'ogg', 'vorbis', 'theora', 'speex', 'ssl',
                'crypto'
            ])

        depends.Qt.uic(build)('src/preferences/dialog/dlgprefbroadcastdlg.ui')
        return [
            'src/preferences/dialog/dlgprefbroadcast.cpp',
            'src/broadcast/broadcastmanager.cpp',
            'src/engine/sidechain/shoutconnection.cpp'
        ]
Beispiel #2
0
def make_debian(packagename, files, env):
	package_file="{}/{}-{}-{}.deb".format(PACKAGE_TMP_DIR,packagename, env["VERSION_STRING"], env["TARGET_ARCH"])
	package_folder=scons.Dir("{}/{}".format(PACKAGE_TMP_DIR,packagename))

	# dirty workaround for http://article.gmane.org/gmane.comp.programming.tools.scons.user/19939
	class DependencyStringWrapper(Value):
		def __init__(*args,**kwargs):
			Value.__init__(*args,**kwargs)
		def get_text_contents(self):
			return self.read()
	dependency_string=DependencyStringWrapper("")
	
	env.Command(target=dependency_string, source=[f[0] for f in files], action=build_library_dependencies)

	controlfile=env.Textfile(target="{}/DEBIAN/control".format(package_folder), source=
		[
			env.File("{}/{}.template".format(PACKAGE_TMP_DIR,packagename)),
			"Version: $VERSION_STRING\nArchitecture: $TARGET_ARCH\nDepends: ",
			dependency_string,
			"\n"
		],TEXTFILESUFFIX="",LINESEPARATOR="")
	

	package_files=[env.Command("{}{}".format(package_folder,f[1]),f[0],scons.Copy("$TARGET","$SOURCE")) for f in files]
	package_dependencies=[package_folder]+package_files+[controlfile
			,scons.Glob("{}/DEBIAN/*".format(package_folder))
			]
	package_file_node=env.Command(package_file, package_dependencies, "fakeroot dpkg-deb --build $SOURCE $TARGET".format(package_folder,package_file))
	return package_file_node
def generate_help(vars, env):
    Script.Help(
        "AFF4 build system configuration.\n\nFollowing are compile time options:\n"
    )
    Script.Help(my_parser.format_help())
    Script.Help("\nThe following variables can be used on the command line:\n")
    Script.Help(vars.GenerateHelpText(env))
Beispiel #4
0
    def __AutoConf(self):
        """This does the equivalent of GNU autoconf - it tries to make the build
        platform independent.

        Note that I've only done the minimum amount necessary to get things to
        compile on Ubuntu and CentOS (and specific versions of those to boot).
        If you want to compile on anything else you will likely need to update
        this."""
        context = scons.Configure(self.env)
        self.__lib_names = {}
        # Check for boost libraries with various names
        boost_libs = [
            'boost_thread', 'boost_regex', 'boost_unit_test_framework'
        ]
        for lib in boost_libs:
            # Prefer the multi-threaded versions (ending in -mt) if available
            if context.CheckLib(lib + '-mt', language='C++'):
                self.__lib_names[lib] = lib + '-mt'
            elif context.CheckLib(lib, language='C++'):
                self.__lib_names[lib] = lib
            else:
                print 'Error. Library %s not available' % lib
                scons.Exit(1)

        self.env = context.Finish()
Beispiel #5
0
 def run_flex(target, source, env):
     start_dir = os.getcwd()
     os.chdir(var_dir)
     res = scons.Execute('flex  ' + src_file, chdir=var_dir)
     if res != 0:
         scons.Exit(1)
     os.chdir(start_dir)
Beispiel #6
0
    def sources(self, build):
        # Build the gtest library, but don't return any sources.

        # Clone our main environment so we don't change any settings in the
        # Mixxx environment
        test_env = build.env.Clone()

        # -pthread tells GCC to do the right thing regardless of system
        if build.toolchain_is_gnu:
            test_env.Append(CCFLAGS='-pthread')
            test_env.Append(LINKFLAGS='-pthread')

        test_env.Append(CPPPATH="#lib/gtest-1.7.0/include")
        gtest_dir = test_env.Dir("lib/gtest-1.7.0")

        env = test_env
        SCons.Export('env')
        SCons.Export('build')
        env.SConscript(env.File('SConscript', gtest_dir))

        # build and configure gmock
        test_env.Append(CPPPATH="#lib/gmock-1.7.0/include")
        gmock_dir = test_env.Dir("lib/gmock-1.7.0")
        env.SConscript(env.File('SConscript', gmock_dir))

        # Build the benchmark library
        test_env.Append(CPPPATH="#lib/benchmark/include")
        benchmark_dir = test_env.Dir("lib/benchmark")
        env.SConscript(env.File('SConscript', benchmark_dir))

        return []
Beispiel #7
0
def install_python(dir, sources):
    basedir = dir
    scons.Mkdir(basedir)
    for file in sources:
        pyc = basedir + '/' + os.path.splitext(
            os.path.basename(file))[0] + '.pyc'
        scons.Command(pyc, file, _python_compile)
Beispiel #8
0
    def sources(self, build):
        if self.INTERNAL_LINK:
            # Clone our main environment so we don't change any settings in the
            # Mixxx environment
            libshout_env = build.env.Clone()
            libshout_env['LIB_OUTPUT'] = '#lib/libshout/lib'

            if build.toolchain_is_gnu:
                libshout_env.Append(CCFLAGS='-pthread')
                libshout_env.Append(LINKFLAGS='-pthread')

            libshout_env.Append(CPPPATH="#lib/libshout")
            libshout_dir = libshout_env.Dir("#lib/libshout")

            env = libshout_env
            SCons.Export('env')
            SCons.Export('build')
            env.SConscript(env.File('SConscript', libshout_dir),
                           variant_dir="lib/libshout2",
                           duplicate=0,
                           exports=['build'])

            build.env.Append(CPPPATH="#lib/libshout/include")
            build.env.Append(LIBPATH='#lib/libshout/lib')
            build.env.Append(LIBS=[
                'shout_mixxx', 'ogg', 'vorbis', 'theora', 'speex', 'ssl',
                'crypto'
            ])

        depends.Qt.uic(build)('src/preferences/dialog/dlgprefbroadcastdlg.ui')
        return [
            'src/preferences/dialog/dlgprefbroadcast.cpp',
            'src/broadcast/broadcastmanager.cpp',
            'src/engine/sidechain/shoutconnection.cpp'
        ]
Beispiel #9
0
    def install_options(self):
        cachefile = os.path.join(self.get_cache_dir(), 'custom.py')
        vars = Script.Variables(cachefile)
        vars.Add('prefix', 'Set to your install prefix', '/usr/local')
        vars.Add('virtualize',
                 'Dynamically swap out the build directory when switching Git branches.', 1)
        vars.Add('qtdir', 'Set to your QT4 directory', '/usr/share/qt4')
        vars.Add('qt_sqlite_plugin', 'Set to 1 to package the Qt SQLite plugin.'
                 '\n           Set to 0 if SQLite support is compiled into QtSQL.', 0)
        vars.Add('target',
                 'Set the build target for cross-compiling (windows, osx, linux, bsd).', '')
        vars.Add(
            'machine', 'Set the machine type for cross-compiling (x86_64, x86, powerpc, powerpc64).', '')
        vars.Add('toolchain',
                 'Specify the toolchain to use for building (gnu, msvs). Default is gnu.', 'gnu')
        vars.Add('crosscompile_root',
                 'Set the path to the root of a cross-compile sandbox.', '')
        vars.Add('force32', 'Force a 32-bit compile', 0)
        vars.Add('force64', 'Force a 64-bit compile', 0)
        vars.Add('sysroot', 'Specify a custom sysroot', '')
        vars.Add('debug_assertions_fatal',
                 'Whether debug assertions are fatal.', False)

        for feature_class in self.available_features:
            # Instantiate the feature
            feature = feature_class()

            # Add the feature to the feature list
            feature.add_options(self, vars)

        vars.Update(self.env)
        Script.Help(vars.GenerateHelpText(self.env))

        # Save the options to cache
        vars.Save(cachefile, self.env)
Beispiel #10
0
    def __init__(self):
        self.env = common.env
        self.__deps = DependancyRegistry()

        self.env['CCFLAGS'].extend(['-Wall'])
        # The no-deprecated-declarations flag is because C++11 deprecates some
        # standard libary class and methods (most notably auto_ptr). Until we
        # convert all our code we'll need this flag.
        self.env['CCFLAGS'].extend(
            ['-Icpp', '-std=c++0x', '-Wno-deprecated-declarations'])
        if scons.GetOption('opt'):
            # Note: -msse2 only works on x86_64. If we ever try to run on other
            # architectures we'll have to disable this.
            self.env['CCFLAGS'].extend([
                '-O2',
                '-DNDEBUG',
                '-ftree-vectorize',
                '-msse2',
            ])
            self.build_dir = 'opt'
        else:
            self.env['CCFLAGS'].extend(['-g'])
            self.build_dir = 'debug'

        if scons.GetOption('gprof'):
            self.env['CCFLAGS'].extend(['-pg'])
            self.env['LINKFLAGS'].extend(['-pg'])
            # output is the concatenation of the normal location (debug or opt)
            # with -profile so the opt-profile directory contains an optimized
            # build with profiling and the debug-profile dir contains debug
            # build with profiling.
            self.build_dir = self.build_dir + '-profile'

        self.__AutoConf()

        common.GenericTestBuilder('cpp_test', 'BoostTest',
                                  self.__RunSingleUnitTest)

        # Scons has trouble keeping track of the current directory when you use
        # VariantDir (the way we put the output of a build in a debug, opt, etc.
        # subdirectory). If using variant dirs simple things like calling
        # os.getcwd() return different results on different runs depending on
        # wheather the variant dir has been created yet or not. Even worse,
        # scons built-ins like File() and Dir() return *incorrect* results in
        # nested dirs and in inconsistent ways dues to race conditions so that
        # one call might return cpp/common/knot-impl/debug (correct), while the
        # next might return cpp/commong/debug/knot-impl/debug (note the extra
        # "debug" in the path name). One thing that *does* seem to consistently
        # work is getting the srcnode() of the sconscript file *before* calling
        # the sconscript file. We therefore use that trick to maintain our own
        # current source and working directory in cur_src_dir and cur_var_dir.
        # As long as you use the SConscript() method of this class to call
        # subsidiary SConstruct files, those files can rely on these variables
        # to give accurate paths.

        # The '#' character means the root directory of the entire scons build.
        # This is the cpp subdirectory of that.
        self.cur_src_dir = os.path.join(str(scons.Dir('#')), 'cpp')
        self.cur_var_dir = os.path.join(self.cur_src_dir, self.build_dir)
Beispiel #11
0
 def SConscript(self, SConscriptFiles):
     if not self.BUILD_DIR:
         Script.SConscript(SConscriptFiles)
     else:
         for sc in SConscriptFiles:
             dir = os.path.dirname(sc)
             build_dir = os.path.join(self.BUILD_DIR, dir)
             Script.SConscript(sc, variant_dir=build_dir, duplicate=False)
Beispiel #12
0
 def run_lemon(target, source, env):
     """The targets, source, and environment are passed by scons but we
     can ignore them as we don't need them."""
     # Copy the .y file into the variant dir
     shutil.copy(src_path, var_dir)
     ret = scons.Execute('lemon ' + var_path)
     if ret != 0:
         scons.Exit(1)
     # now rename the .c file to a .cc file
     shutil.move(generated_c_path, desired_cc_path)
Beispiel #13
0
def setDylibInternalPath(target, source, env):
    # Copy the library file
    srcName = str(source[0])
    tgtName = str(target[0])
    Script.Execute(Script.Copy(tgtName, srcName))
    # Then run install_name_tool
    cmd = "install_name_tool "
    cmd += "-id " + os.path.abspath(tgtName) + " "
    cmd += tgtName
    os.system(cmd)
Beispiel #14
0
def get_mixxx_version():
    """Get Mixxx version number from defs_version.h"""
    # have to handle out-of-tree building, that's why the '#' :(
    defs = Script.File('#src/defs_version.h')
    version = ""

    for line in open(str(defs)).readlines():
        if line.strip().startswith("#define MIXXX_VERSION "):
            version = line
            break

    if version == "":
        raise ValueError("Version not found")

    version = version.split()[-1].replace('"', '')

    # Check if version respect constraints
    # 3 numbers separated by a dot, then maybe a (dash or tilde) and some string
    # See src/defs_version.h comment
    versionMask = '^\d+\.\d+\.\d+([-~].+)?$'
    if not re.match(versionMask, version):
        raise ValueError(
            "Version format mismatch. See src/defs_version.h comment")

    return version
Beispiel #15
0
    def sources(self, build):
        # Build the gtest library, but don't return any sources.

        # Clone our main environment so we don't change any settings in the
        # Mixxx environment
        test_env = build.env.Clone()

        # -pthread tells GCC to do the right thing regardless of system
        test_env.Append(CCFLAGS='-pthread')
        test_env.Append(LINKFLAGS='-pthread')

        test_env.Append(CPPPATH="#lib/gtest-1.7.0/include")
        gtest_dir = test_env.Dir("#lib/gtest-1.7.0")
        # gtest_dir.addRepository(build.env.Dir('#lib/gtest-1.5.0'))
        # build.env['EXE_OUTPUT'] = '#/lib/gtest-1.3.0/bin'  # example,
        # optional
        test_env['LIB_OUTPUT'] = '#/lib/gtest-1.7.0/lib'

        env = test_env
        SCons.Export('env')
        env.SConscript(env.File('SConscript', gtest_dir))

        # build and configure gmock
        test_env.Append(CPPPATH="#lib/gmock-1.7.0/include")
        gmock_dir = test_env.Dir("#lib/gmock-1.7.0")
        # gmock_dir.addRepository(build.env.Dir('#lib/gmock-1.5.0'))
        test_env['LIB_OUTPUT'] = '#/lib/gmock-1.7.0/lib'

        env.SConscript(env.File('SConscript', gmock_dir))

        return []
Beispiel #16
0
def make_vcproject(env, name, target_name):
    if not oshelper.os_is_windows():
        return

    sources = env.FindSourceFiles()
    sourceList = []
    prepend_string = ''

    if env['DEBUG']:
        mode = 'Debug'
    else:
        mode = 'Release'

    for s in sources:
        sourceList.append('..\\' + s.srcnode().path)

    build_target_list = []
    build_target_list.append('check-' + target_name)
    build_target_list.append(target_name)

    variant_list = []
    variant_list.append('Check|Win32')
    variant_list.append(mode + '|Win32')

    project = env.MSVSProject(
        target=name + env['MSVSPROJECTSUFFIX'],
        auto_build_solution=0,
        srcs=sourceList,
        #incs = includes,
        buildtarget=build_target_list,
        variant=variant_list)
    scons.Alias('vcprojects', project)
Beispiel #17
0
 def get_libraries(self):
     if oshelper.os_is_mac():
         # FIXME find proper way to detect this
         return ['Python']
     env = scons.Environment()
     flags = env.ParseFlags(
         distutils.sysconfig.get_config_var('BLDLIBRARY'))
     return flags['LIBS']
Beispiel #18
0
 def get_cache_dir(self):
     # Global cache directory Put all project files in it so a rm -rf cache
     # will clean up the config
     if not self.env.has_key('CACHEDIR'):
         self.env['CACHEDIR'] = str(Script.Dir('#cache/'))
     if not os.path.isdir(self.env['CACHEDIR']):
         os.mkdir(self.env['CACHEDIR'])
     return str(self.env['CACHEDIR'])
Beispiel #19
0
def write_ecf_from_pecf(target, source, env):
    # Converts Pyxis format EC to XML
    pyxis_to_xml_cmd = [
        'el_toolkit', '-pyxis_to_xml', '-no_highlighting', '-in',
        str(source[0])
    ]
    sys.stdout.write(' '.join(pyxis_to_xml_cmd) + '\n')
    if subprocess.call(pyxis_to_xml_cmd) != 0:
        Script.Exit(1)
Beispiel #20
0
def check_C_libraries(env, build):
    print 'Checking for C libraries'
    # Check for availability of C libraries
    conf = Script.Configure(env)
    print 'IMPLICIT', build.implicit_C_libs
    for c_lib in build.implicit_C_libs:
        if not conf.CheckLib(c_lib):
            Script.Exit(1)
    env = conf.Finish()

    print 'EXPLICIT'
    for c_lib in build.explicit_C_libs:
        print 'Checking for C library %s... ' % c_lib,
        if path.exists(c_lib):
            print 'yes'
        else:
            print 'no'
            Script.Exit(1)
Beispiel #21
0
def get_mixxx_mod_version():
    """
    Parses defs_version_mod.h to figure out the modified Mixxx version.
    """
    #have to handle out-of-tree building, that's why the '#' :(
    if Script.FindFile('defs_version_mod.h', '#src') == None:
        return ''

    defs = Script.File('#src/defs_version_mod.h')

    for line in open(str(defs)).readlines():
        if line.strip().startswith("#define VERSION_MOD"):
            version = line.split()[-1].replace('"', '')
            break
    else:
        version = ''

    return version
Beispiel #22
0
 def sources(self, build):
     ladspa_plugins = SCons.SConscript(SCons.File('#lib/ladspa/SConscript'))
     #build.env.Alias('plugins', ladspa_plugins)
     sources = SCons.Split("""engine/engineladspa.cpp
                         ladspa/ladspaloader.cpp
                         ladspa/ladspalibrary.cpp
                         ladspa/ladspaplugin.cpp
                         ladspa/ladspainstance.cpp
                         ladspa/ladspacontrol.cpp
                         ladspa/ladspainstancestereo.cpp
                         ladspa/ladspainstancemono.cpp
                         ladspaview.cpp
                         ladspa/ladspapreset.cpp
                         ladspa/ladspapresetmanager.cpp
                         ladspa/ladspapresetknob.cpp
                         ladspa/ladspapresetinstance.cpp
                         dlgladspa.cpp
                         ladspa/ladspapresetslot.cpp
                         """)
     return ladspa_plugins + sources
Beispiel #23
0
def get_osx_min_version():
    """Gets the minimum required OS X version from product_definition.plist."""
    # Mixxx 2.0 supported OS X 10.6 and up.
    # Mixxx >2.0 requires C++11 which is only available with libc++ and OS X
    # 10.7 onwards. std::promise/std::future requires OS X 10.8.
    # Mixxx >2.2 switched to Qt 5, which requires macOS 10.11.
    # Use SCons to get the path relative to the repository root.
    product_definition = str(Script.File('#build/osx/product_definition.plist'))
    p = os.popen("/usr/libexec/PlistBuddy -c 'Print os:0' %s" % product_definition)
    min_version = p.readline().strip()
    result_code = p.close()
    assert result_code is None, "Can't read macOS min version: %s" % min_version
    return min_version
Beispiel #24
0
    def install_options(self):
        cachefile = os.path.join(self.get_cache_dir(), 'custom.py')
        vars = Script.Variables(cachefile)
        vars.Add('prefix', 'Set to your install prefix', '/usr/local')
        vars.Add('qtdir', 'Set to your QT4 directory', '/usr/share/qt4')
        if self.platform_is_windows:
            vars.Add(
                'sqlitedll', 'Set to 1 to enable including QSQLite.dll.\
\n           Set to 0 if SQLite support is compiled into QtSQL.dll.', 1)
        vars.Add(
            'target',
            'Set the build target for cross-compiling (windows, osx, linux, bsd).',
            '')
        vars.Add(
            'machine',
            'Set the machine type for cross-compiling (x86_64, x86, powerpc, powerpc64).',
            '')
        vars.Add(
            'toolchain',
            'Specify the toolchain to use for building (gnu, msvs). Default is gnu.',
            'gnu')
        vars.Add('crosscompile_root',
                 'Set the path to the root of a cross-compile sandbox.', '')
        vars.Add('force32', 'Force a 32-bit compile', 0)
        vars.Add('force64', 'Force a 64-bit compile', 0)

        for feature_class in self.available_features:
            # Instantiate the feature
            feature = feature_class()

            # Add the feature to the feature list
            feature.add_options(self, vars)

        vars.Update(self.env)
        Script.Help(vars.GenerateHelpText(self.env))

        #Save the options to cache
        vars.Save(cachefile, self.env)
Beispiel #25
0
def setupHeaderInstall(env):
    targets = []
    for (path, dirs, files) in os.walk(export):
        try:
            dirs.remove(".svn")
        except:
	        pass
        currentDir = "/".join(path.split("/")[1:])
        headerDir = os.path.join(installDir(env), include, pvrName)
        if len(currentDir) > 0:
            headerDir = os.path.join(headerDir, currentDir)
        headerFiles = Script.Glob(os.path.join(path, "*.h"))
        targets += env.Install(headerDir, headerFiles)
    return targets
Beispiel #26
0
    def sources(self, build):
        # Build the gtest library, but don't return any sources.

        # Clone our main environment so we don't change any settings in the
        # Mixxx environment
        env = build.env.Clone()
        SCons.Export('env')
        SCons.Export('build')

        # -pthread tells GCC to do the right thing regardless of system
        if build.toolchain_is_gnu:
            env.Append(CCFLAGS='-pthread')
            env.Append(LINKFLAGS='-pthread')

        # Build gtest
        env.Append(CPPPATH="#lib/googletest-1.8.x/googletest/include")
        gtest_dir = env.Dir("lib/googletest-1.8.x/googletest")
        env.SConscript(env.File('SConscript', gtest_dir))
        build.env.Append(LIBPATH=gtest_dir)
        build.env.Append(LIBS=['gtest'])

        # Build gmock
        env.Append(CPPPATH="#lib/googletest-1.8.x/googlemock/include")
        gmock_dir = env.Dir("lib/googletest-1.8.x/googlemock")
        env.SConscript(env.File('SConscript', gmock_dir))
        build.env.Append(LIBPATH=gmock_dir)
        build.env.Append(LIBS=['gmock'])

        # Build the benchmark library
        env.Append(CPPPATH="#lib/benchmark/include")
        benchmark_dir = env.Dir("lib/benchmark")
        env.SConscript(env.File('SConscript', benchmark_dir))
        build.env.Append(LIBPATH=benchmark_dir)
        build.env.Append(LIBS=['benchmark'])

        return []
Beispiel #27
0
    def __RunSingleUnitTest(test, log_file):
        """This is called by the GenericTestBuilder to run a single unit
        test."""
        test_str = test + ' --log_level=test_suite'
        if scons.GetOption('valgrind'):
            command_str = \
                    'valgrind --error-exitcode=1 --leak-check=yes ' + test_str
        else:
            command_str = test_str

        ret = subprocess.call(command_str,
                              stdout=log_file,
                              stderr=subprocess.STDOUT,
                              shell=True)
        return ret
Beispiel #28
0
    def SConscript(self, sconscript_path, exports=''):
        """Run the build rules specified in the subdirectory specified by
        sconscript_path. Export the variables listed in exports to that
        SConscript file in addition to exporting builder."""

        builder = self
        exports += ' builder'
        src_sconscript_dir = os.path.abspath(
            os.path.dirname(str(scons.File(sconscript_path).srcnode())))
        var_sconscript_dir = os.path.join(src_sconscript_dir, self.build_dir)
        sconscript_filename = os.path.basename(sconscript_path)

        # See the comments on these instance variables in __init__.
        old_src_dir = self.cur_src_dir
        self.cur_src_dir = src_sconscript_dir
        old_var_dir = self.cur_var_dir
        self.cur_var_dir = var_sconscript_dir

        scons.VariantDir(var_sconscript_dir, src_sconscript_dir, duplicate=0)
        scons.SConscript(os.path.join(var_sconscript_dir, sconscript_filename),
                         exports)

        self.cur_src_dir = old_src_dir
        self.cur_var_dir = old_var_dir
Beispiel #29
0
    def get_cache_dir(self):
        # Global cache directory Put all project files in it so a rm -rf cache
        # will clean up the config
        if not self.env.has_key('CACHEDIR'):
            self.env['CACHEDIR'] = str(Script.Dir('#cache/'))
        if not os.path.isdir(self.env['CACHEDIR']):
            os.mkdir(self.env['CACHEDIR'])

        ## Avoid spreading .sconsign files everywhere
        #env.SConsignFile(env['CACHEDIR']+'/scons_signatures')
        ## WARNING - We found that the above line causes SCons to randomly not find
        ##           dependencies for some reason. It might not happen right away, but
        ##           a good number of users found that it caused weird problems - Albert (May 15/08)

        return str(self.env['CACHEDIR'])
Beispiel #30
0
def get_mixxx_version():
    """Get Mixxx version number from defs_version.h"""
    # have to handle out-of-tree building, that's why the '#' :(
    defs = Script.File('#src/defs_version.h')
    version = ""

    for line in open(str(defs)).readlines():
        if line.strip().startswith("#define VERSION "):
            version = line
            break

    if version == "":
        raise ValueError("Version not found")

    version = version.split()[-1].replace('"', '')
    return version
Beispiel #31
0
def scons(args=None):
    import sys
    from SCons import Script
    sys.argv = ['scons'] + (args or list())
    Script.main()