X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=SConstruct;h=1ed23dd3aa97671556976b0a86bdeca0e6d78b5e;hb=fd289ac9677d93f816038871440e52f20dd891fb;hp=605c4f164251e5bec26309a841bb362d8b23fced;hpb=638336eee5c7ce79faa526f2890634dc82785d62;p=ardour.git diff --git a/SConstruct b/SConstruct index 605c4f1642..1ed23dd3aa 100644 --- a/SConstruct +++ b/SConstruct @@ -238,12 +238,7 @@ def fetch_svn_revision (path): cmd += " | awk '/^Revision:/ { print $2}'" return commands.getoutput (cmd) -def recreate_stored_revision(target = None, source = None, env = None): - os.unlink ('svn_revision.h') - print "===========> Forcing recreation of svn_revision.h" - create_stored_revision () - -def create_stored_revision(target = None, source = None, env = None): +def create_stored_revision (target = None, source = None, env = None): if os.path.exists('.svn'): rev = fetch_svn_revision ('.'); try: @@ -259,20 +254,10 @@ def create_stored_revision(target = None, source = None, env = None): print "Could not open svn_revision.h for writing\n" sys.exit (-1) else: - if os.path.exists ('svn_revision.h') == False: - print "\n\nYou are missing svn_revision.h, which should have been included." - print "This is caused either by a packaging error, " - print " or a configuration error with your system." - print "Please report this issue to the ardour-dev mailing list." - print "(See http://ardour.org/support for details)\n\n" - sys.exit (-1) + print "You cannot use \"scons revision\" on without using a checked out" + print "copy of the Ardour source code repository" + sys.exit (-1) -# -# if it exists, do not remove it -# - -Precious('svn_revision.h') - # # A generic builder for version.cc files # @@ -393,7 +378,7 @@ env.Append (BUILDERS = {'Tarball' : tarball_bld}) # if env['VST']: - sys.stdout.write ("Are you building Ardour for personal use (rather than distributiont to others)? [no]: ") + sys.stdout.write ("Are you building Ardour for personal use (rather than distribution to others)? [no]: ") answer = sys.stdin.readline () answer = answer.rstrip().strip() if answer != "yes" and answer != "y": @@ -612,7 +597,8 @@ if env['SYSLIBS']: gtk_subdirs = [ # 'libs/flowcanvas', 'libs/gtkmm2ext', - 'gtk2_ardour' + 'gtk2_ardour', + 'libs/clearlooks' ] else: @@ -681,8 +667,9 @@ else: 'libs/gtkmm2/gtk', 'libs/libgnomecanvasmm', # 'libs/flowcanvas', - 'libs/gtkmm2ext', - 'gtk2_ardour' + 'libs/gtkmm2ext', + 'gtk2_ardour', + 'libs/clearlooks' ] # @@ -967,13 +954,9 @@ env = conf.Finish() rcbuild = env.SubstInFile ('ardour.rc','ardour.rc.in', SUBST_DICT = subst_dict) -# -# making this into an Alias directly prevents scons from understanding how to build -# svn_revision.h -# - -the_revision = env.Command ('svn_revision.h', [], create_stored_revision) +the_revision = env.Command ('frobnicatory_decoy', [], create_stored_revision) +env.Alias('revision', the_revision) env.Alias('install', env.Install(os.path.join(config_prefix, 'ardour2'), 'ardour_system.rc')) env.Alias('install', env.Install(os.path.join(config_prefix, 'ardour2'), 'ardour.rc')) @@ -984,7 +967,7 @@ Default (rcbuild) Precious (env['DISTTREE']) env.Distribute (env['DISTTREE'], - [ 'SConstruct', 'svn_revision.h', + [ 'SConstruct', 'svn_revision.h', 'COPYING', 'PACKAGER_README', 'README', 'ardour.rc.in', 'ardour_system.rc', @@ -1008,7 +991,7 @@ env.Distribute (env['DISTTREE'], glob.glob ('DOCUMENTATION/README*') ) -srcdist = env.Tarball(env['TARBALL'], env['DISTTREE']) +srcdist = env.Tarball(env['TARBALL'], [ env['DISTTREE'], the_revision ]) env.Alias ('srctar', srcdist) # @@ -1016,7 +999,6 @@ env.Alias ('srctar', srcdist) # env.AddPreAction (env['DISTTREE'], Action ('rm -rf ' + str (File (env['DISTTREE'])))) -env.AddPreAction (srcdist, Action (recreate_stored_revision)) env.AddPostAction (srcdist, Action ('rm -rf ' + str (File (env['DISTTREE'])))) #