peterphonic

graphicsWindow.sc

Jun 26th, 2019
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.85 KB | None | 0 0
  1. Import('envService')
  2. Import('parentEnv')
  3. import os
  4.  
  5. envService.validate_supported_platform('posix')
  6.  
  7. env = parentEnv.Clone()
  8.  
  9. libTgt = env.buildLibrary(envService, env.Glob('*.c*', exclude='*_test*'))
  10.  
  11.  
  12. srcDir =  env.Dir('.').srcnode().path
  13. sourceFile = os.path.join('#', srcDir, '..', 'VERSION.txt')
  14.  
  15. if env.GetOption('svnRev') != None:
  16.     svn_version = env.GetOption('svnRev')
  17. else:
  18.     svn_version = os.popen('svnversion -n ' + env['LOCALROOT']).read()
  19.  
  20. env.Command(target = 'gwversion.h',
  21.             source = sourceFile,
  22.             action = ['echo creating $TARGET',
  23.                       'echo "#define SVN_REVISION \\"' + svn_version + '\\" "> $TARGET',
  24.                       'grep VERSION $SOURCE | awk -F"=" \'{printf ( "#define GW_VERSION \\"%s\\"\\n", $2)}\' >> $TARGET '
  25.                      ])
  26.                      
  27. Return('libTgt')
Advertisement
Add Comment
Please, Sign In to add comment