Kaydet (Commit) dd753926 authored tarafından jan Iversen's avatar jan Iversen

gbuildtojson prepare for new filetypes.

gbuild-to-ide now contains a dict with json name -> file extension
post_GbuildToJson.ml contains a todo list (missing files, new arguments)
gbuildtojson.cxx made resistent (no extra argument list to maintain)

Change-Id: I7f346f606ed5fba0a1eaffdd38454b484cecfcf5
üst dd70861f
......@@ -87,15 +87,23 @@ class GbuildParser:
def parse(self):
# Relation between json object and file extension
# Missing relations: .hxx .hpp .hrc .src .java .py .h .s .c .pl .S .ui .l .cpp
jsonSrc = {'ASMOBJECTS': '.asm',
jsonSrc = {
'CXXOBJECTS': '.cxx',
'GENCOBJECTS': '?',
'GENCXXOBJECTS': '.cxx', # this does not sound right
'GENCXXOBJECTS': '.cxx', # remark is in workdir/GenCxxObject
'OBJCOBJECTS': '.m',
'OBJCXXOBJECTS': '.mm',
'YACCOBJECTS': '.y'
}
# gbuildtojson defines but does not fill these:
'ASMOBJECTS': '.s',
'GENCOBJECTS': '.c',
'YACCOBJECTS': '.y',
# gbuildtojson need to be extended to fill these:
'COBJECTS': '.c',
'FLEXOBJECTS': '.l',
'JAVAOBJECTS': '.java',
'PYTHONOBJECTS': '.py'
}
moduleDict = {}
......
......@@ -7,6 +7,24 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# Outstanding work:
#
# fill files names in:
# --ASMOBJECTS
# --GENCOBJECTS
# --YACCOBJECTS
#
# add new arguments:
# --COBJECTS
# --FLEXOBJECTS
# --JAVAOBJECTS
# --PYTHONOBJECTS
#
# Add black listed modules a json files (--BLACKLIST)
#
# Reduce number of blacklisted modules
ifneq ($(filter gbuildtojson,$(MAKECMDGOALS)),)
ifeq ($(MAKE_VERSION),3.81)
......
......@@ -17,30 +17,6 @@
#include <stdio.h>
using namespace std;
static const list<string> validargs = {
"makefile",
"linktarget",
"ilibtarget",
"cxxobjects",
"yaccobjects",
"objcobjects",
"objcxxobjects",
"asmobjects",
"gencobjects",
"gencxxobjects",
"cflags",
"cflagsappend",
"cxxflags",
"cxxflagsappend",
"objcflags",
"objcflagsappend",
"objcxxflags",
"objcxxflagsappend",
"defs",
"include",
"linked_libs",
"linked_static_libs"
};
int main(int argc, char** argv)
{
......@@ -61,11 +37,6 @@ int main(int argc, char** argv)
return 2;
}
const string argname(arg.substr(2, eqpos-2));
if(find(validargs.begin(), validargs.end(), argname) == validargs.end())
{
cerr << "Option" << argname << "invalid." << endl;
return 3;
}
vartofile[argname] = arg.substr(eqpos+1, string::npos);
}
cout << "{";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment