Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(962)

Side by Side Diff: SConstruct

Issue 119239: Add a check to presubmit.py linting python and SCons files for trailing white... Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | tools/js2c.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2008 the V8 project authors. All rights reserved. 1 # Copyright 2008 the V8 project authors. All rights reserved.
2 # Redistribution and use in source and binary forms, with or without 2 # Redistribution and use in source and binary forms, with or without
3 # modification, are permitted provided that the following conditions are 3 # modification, are permitted provided that the following conditions are
4 # met: 4 # met:
5 # 5 #
6 # * Redistributions of source code must retain the above copyright 6 # * Redistributions of source code must retain the above copyright
7 # notice, this list of conditions and the following disclaimer. 7 # notice, this list of conditions and the following disclaimer.
8 # * Redistributions in binary form must reproduce the above 8 # * Redistributions in binary form must reproduce the above
9 # copyright notice, this list of conditions and the following 9 # copyright notice, this list of conditions and the following
10 # disclaimer in the documentation and/or other materials provided 10 # disclaimer in the documentation and/or other materials provided
(...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after
631 if match: 631 if match:
632 version_components.append(match.group(1).strip()) 632 version_components.append(match.group(1).strip())
633 else: 633 else:
634 version_components.append('0') 634 version_components.append('0')
635 635
636 return version_components 636 return version_components
637 637
638 638
639 def GetVersion(): 639 def GetVersion():
640 version_components = GetVersionComponents() 640 version_components = GetVersionComponents()
641 641
642 if version_components[len(version_components) - 1] == '0': 642 if version_components[len(version_components) - 1] == '0':
643 version_components.pop() 643 version_components.pop()
644 return '.'.join(version_components) 644 return '.'.join(version_components)
645 645
646 646
647 def GetSpecificSONAME(): 647 def GetSpecificSONAME():
648 SONAME_PATTERN = re.compile(r"#define\s+SONAME\s+\"(.*)\"") 648 SONAME_PATTERN = re.compile(r"#define\s+SONAME\s+\"(.*)\"")
649 649
650 source = open(join(root_dir, 'src', 'version.cc')).read() 650 source = open(join(root_dir, 'src', 'version.cc')).read()
651 match = SONAME_PATTERN.search(source) 651 match = SONAME_PATTERN.search(source)
652 652
653 if match: 653 if match:
654 return match.group(1).strip() 654 return match.group(1).strip()
655 else: 655 else:
656 return '' 656 return ''
657 657
658 658
659 def SplitList(str): 659 def SplitList(str):
660 return [ s for s in str.split(",") if len(s) > 0 ] 660 return [ s for s in str.split(",") if len(s) > 0 ]
661 661
662 662
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
923 # version of scons. Also, there's a bug in some revisions that 923 # version of scons. Also, there's a bug in some revisions that
924 # doesn't allow this flag to be set, so we swallow any exceptions. 924 # doesn't allow this flag to be set, so we swallow any exceptions.
925 # Lovely. 925 # Lovely.
926 try: 926 try:
927 SetOption('warn', 'no-deprecated') 927 SetOption('warn', 'no-deprecated')
928 except: 928 except:
929 pass 929 pass
930 930
931 931
932 Build() 932 Build()
OLDNEW
« no previous file with comments | « no previous file | tools/js2c.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698