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

Unified Diff: tools/gcmole/gcmole.lua

Issue 14320024: Switch GCMole to use GYP build file instead of SCons. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 8 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 | « no previous file | tools/gyp/v8.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gcmole/gcmole.lua
diff --git a/tools/gcmole/gcmole.lua b/tools/gcmole/gcmole.lua
index 09db54754f8e9099bad568610f29018ea85f31db..60ad010775edaf6379fd213dc35e8a42248bd52b 100644
--- a/tools/gcmole/gcmole.lua
+++ b/tools/gcmole/gcmole.lua
@@ -117,31 +117,25 @@ function InvokeClangPluginForEachFile(filenames, cfg, func)
end
-------------------------------------------------------------------------------
--- SConscript parsing
+-- GYP file parsing
-local function ParseSConscript()
- local f = assert(io.open("src/SConscript"), "failed to open SConscript")
- local sconscript = f:read('*a')
+local function ParseGYPFile()
+ local f = assert(io.open("tools/gyp/v8.gyp"), "failed to open GYP file")
+ local gyp = f:read('*a')
f:close()
- local SOURCES = sconscript:match "SOURCES = {(.-)}";
+ local result = {}
- local sources = {}
-
- for condition, list in
- SOURCES:gmatch "'([^']-)': Split%(\"\"\"(.-)\"\"\"%)" do
+ for condition, sources in
+ gyp:gmatch "'sources': %[.-### gcmole%((.-)%) ###(.-)%]" do
local files = {}
- for file in list:gmatch "[^%s]+" do table.insert(files, file) end
- sources[condition] = files
- end
-
- for condition, list in SOURCES:gmatch "'([^']-)': %[(.-)%]" do
- local files = {}
- for file in list:gmatch "'([^']-)'" do table.insert(files, file) end
- sources[condition] = files
+ for file in sources:gmatch "'%.%./%.%./src/([^']-%.cc)'" do
+ table.insert(files, file)
+ end
+ result[condition] = files
end
- return sources
+ return result
end
local function EvaluateCondition(cond, props)
@@ -165,7 +159,7 @@ local function BuildFileList(sources, props)
return list
end
-local sources = ParseSConscript()
+local sources = ParseGYPFile()
local function FilesForArch(arch)
return BuildFileList(sources, { os = 'linux',
« no previous file with comments | « no previous file | tools/gyp/v8.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698