~mkas/mixxx/mysql

« back to all changes in this revision

Viewing changes to mixxx/src/SConscript.env

  • Committer: MKas
  • Date: 2012-11-03 12:55:54 UTC
  • Revision ID: mkas@tux.lt-20121103125554-ez5ajqyk7bwehrp2
merge with trunk + sql fixes

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
import SCons.Script
6
6
import logging
7
7
import fnmatch
 
8
import shutil
8
9
 
9
10
from build import util, mixxx, depends
10
11
 
22
23
#env.Append(CPPDEFINES=[('BUILD_REV', '"%s"' % getBZRRevision())]) #doing this forces a rebuild of everything whenever a commit happens -- not much fun
23
24
## instead, embed BZR version into build
24
25
## Put version info into a file, so it doesn't force a rebuild of everything :)
25
 
f = open("build.h","w")
26
 
try:
27
 
    branch_name = util.get_bzr_branch_name()
28
 
    modified = util.get_bzr_modified() > 0
29
 
    # Do not emit BUILD_BRANCH on release branches.
30
 
    if not branch_name.startswith('release'):
31
 
        f.write('#define BUILD_BRANCH "%s"\n' % branch_name)
32
 
    f.write('#define BUILD_REV "%s%s"\n' % (util.get_bzr_revision(),
33
 
                                            '+' if modified else ''))
34
 
finally:
35
 
    f.close()
 
26
 
 
27
if os.path.exists(os.path.join('..', 'build.h')):
 
28
    # If a build.h exists in the project root mixxx/ directory then use that
 
29
    # instead of writing our own. This is mostly since when we build Debian
 
30
    # packages we don't have any of the Bazaar metadata so we can't write one
 
31
    # ourselves.
 
32
    shutil.copy(os.path.join('..', 'build.h'), 'build.h')
 
33
else:
 
34
    util.write_build_header('build.h')
 
35
 
36
36
 
37
37
#Check for dependencies if we're not doing a clean...
38
38
#if not env.GetOption('clean') and not SCons.Util.containsAny(os.sys.argv, ['-h', '--help']):