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

Unified Diff: site_scons/site_tools/chromium_builders.py

Issue 17603: Generate all chrome .vcproj files: (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « site_scons/site_tools/_Node_MSVS.py ('k') | skia/SConscript » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: site_scons/site_tools/chromium_builders.py
===================================================================
--- site_scons/site_tools/chromium_builders.py (revision 8251)
+++ site_scons/site_tools/chromium_builders.py (working copy)
@@ -53,41 +53,57 @@
import __builtin__
__builtin__.ChromeFileList = ChromeFileList
-def compilable_files(sources):
+non_compilable_suffixes = {
+ 'LINUX' : set([
+ '.h',
+ '.dat',
+ '.rc',
+ ]),
+ 'WINDOWS' : set([
+ '.h',
+ '.dat',
+ ]),
+}
+
+def compilable(env, file):
+ base, ext = os.path.splitext(str(file))
+ if ext in non_compilable_suffixes[env['TARGET_PLATFORM']]:
+ return False
+ return True
+
+def compilable_files(env, sources):
if not hasattr(sources, 'entries'):
- return [x for x in sources if not str(x).endswith('.h')
- and not str(x).endswith('.dat')]
+ return [x for x in sources if compilable(env, x)]
result = []
for top, folders, nonfolders in MSVS.FileListWalk(sources):
- result.extend([x for x in nonfolders if not str(x).endswith('.h')
- and not str(x).endswith('.dat')])
+ result.extend([x for x in nonfolders if compilable(env, x)])
return result
def ChromeProgram(env, target, source, *args, **kw):
- source = compilable_files(source)
+ source = compilable_files(env, source)
result = env.ComponentProgram(target, source, *args, **kw)
if env.get('INCREMENTAL'):
env.Precious(result)
return result
def ChromeTestProgram(env, target, source, *args, **kw):
- source = compilable_files(source)
+ source = compilable_files(env, source)
result = env.ComponentTestProgram(target, source, *args, **kw)
if env.get('INCREMENTAL'):
env.Precious(*result)
return result
def ChromeLibrary(env, target, source, *args, **kw):
- source = compilable_files(source)
+ source = compilable_files(env, source)
return env.ComponentLibrary(target, source, *args, **kw)
def ChromeStaticLibrary(env, target, source, *args, **kw):
- source = compilable_files(source)
+ source = compilable_files(env, source)
kw['COMPONENT_STATIC'] = True
return env.ComponentLibrary(target, source, *args, **kw)
def ChromeSharedLibrary(env, target, source, *args, **kw):
- source = compilable_files(source)
+ source = compilable_files(env, source)
kw['COMPONENT_STATIC'] = False
result = [env.ComponentLibrary(target, source, *args, **kw)[0]]
if env.get('INCREMENTAL'):
« no previous file with comments | « site_scons/site_tools/_Node_MSVS.py ('k') | skia/SConscript » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698