[Libreoffice-commits] core.git: bin/gbuild-to-ide solenv/gbuild solenv/gbuildtojson

jan Iversen jani at documentfoundation.org
Mon Jan 16 17:25:58 UTC 2017


 bin/gbuild-to-ide                             |   20 ++++++++++++-----
 solenv/gbuild/extensions/post_GbuildToJson.mk |   18 ++++++++++++++++
 solenv/gbuildtojson/gbuildtojson.cxx          |   29 --------------------------
 3 files changed, 32 insertions(+), 35 deletions(-)

New commits:
commit dd7539262d5d1a25da0856f8e1965cf0e4351ff9
Author: jan Iversen <jani at documentfoundation.org>
Date:   Mon Jan 16 18:23:00 2017 +0100

    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

diff --git a/bin/gbuild-to-ide b/bin/gbuild-to-ide
index 7186ed4..cf44d5e 100755
--- a/bin/gbuild-to-ide
+++ b/bin/gbuild-to-ide
@@ -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 = {}
diff --git a/solenv/gbuild/extensions/post_GbuildToJson.mk b/solenv/gbuild/extensions/post_GbuildToJson.mk
index d0e8611..89a4c84 100644
--- a/solenv/gbuild/extensions/post_GbuildToJson.mk
+++ b/solenv/gbuild/extensions/post_GbuildToJson.mk
@@ -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)
diff --git a/solenv/gbuildtojson/gbuildtojson.cxx b/solenv/gbuildtojson/gbuildtojson.cxx
index 96d38ea..7c2429e 100644
--- a/solenv/gbuildtojson/gbuildtojson.cxx
+++ b/solenv/gbuildtojson/gbuildtojson.cxx
@@ -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 << "{";


More information about the Libreoffice-commits mailing list