[Libreoffice-commits] core.git: Makefile.in solenv/gbuild solenv/PythonTest_solenv_python.mk solenv/qa

Bjoern Michaelsen bjoern.michaelsen at canonical.com
Fri Nov 25 02:05:26 UTC 2016


 Makefile.in                                         |    4 
 solenv/PythonTest_solenv_python.mk                  |    2 
 solenv/gbuild/extensions/post_GbuildToIde.mk        |  121 ----------------
 solenv/gbuild/extensions/post_GbuildToJson.mk       |  123 ++++++++++++++++
 solenv/qa/python/gbuildtoide.py                     |  150 -------------------
 solenv/qa/python/gbuildtojson.py                    |  151 ++++++++++++++++++++
 solenv/qa/python/selftest/Library_gbuildselftest.mk |    2 
 solenv/qa/python/selftest/Module_selftest.mk        |    4 
 8 files changed, 280 insertions(+), 277 deletions(-)

New commits:
commit 1fcd5c48a0ae25822645b83dff42ad3c246e5b28
Author: Bjoern Michaelsen <bjoern.michaelsen at canonical.com>
Date:   Wed Nov 23 01:29:32 2016 +0100

    rename the core parts of this from gbuildtoide to gbuildtojson
    
    - the json stuff is universal and not limited in use to IDEs
    - the IDE stuff should keep its gbuildtoide name
    
    Change-Id: If4f190fc6dffba219334d57a53c826515ed57c34
    Reviewed-on: https://gerrit.libreoffice.org/31093
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Björn Michaelsen <bjoern.michaelsen at canonical.com>

diff --git a/Makefile.in b/Makefile.in
index cf3e71f..c5c8b2e 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -15,7 +15,7 @@ MAKECMDGOALS?=all
 build_goal:=$(if $(filter build check,$(MAKECMDGOALS)),all)\
  $(if $(filter build-nocheck,$(MAKECMDGOALS)),build)\
  $(if $(filter check,$(MAKECMDGOALS)),subsequentcheck)\
- $(filter all build-l10n-only build-non-l10n-only debugrun help showmodules translations $(gb_Top_MODULE_CHECK_TARGETS) check packageinfo gbuildtoide,$(MAKECMDGOALS))
+ $(filter all build-l10n-only build-non-l10n-only debugrun help showmodules translations $(gb_Top_MODULE_CHECK_TARGETS) check packageinfo gbuildtojson,$(MAKECMDGOALS))
 
 SRCDIR := @SRC_ROOT@
 BUILDDIR := @BUILDDIR@
@@ -270,7 +270,7 @@ endif
 
 build-non-l10n-only build-l10n-only build-nocheck check debugrun translations packageinfo $(gb_Top_MODULE_CHECK_TARGETS): build
 
-help showmodules gbuildtoide:
+help showmodules gbuildtojson:
 	$(MAKE) $(PARALLELISM_OPTION) $(GMAKE_OPTIONS) -f $(SRCDIR)/Makefile.gbuild $@
 
 cross-toolset: bootstrap fetch
diff --git a/solenv/PythonTest_solenv_python.mk b/solenv/PythonTest_solenv_python.mk
index bd66715..27145a4 100644
--- a/solenv/PythonTest_solenv_python.mk
+++ b/solenv/PythonTest_solenv_python.mk
@@ -10,7 +10,7 @@
 $(eval $(call gb_PythonTest_PythonTest,solenv_python))
 
 $(eval $(call gb_PythonTest_add_modules,solenv_python,$(SRCDIR)/solenv/qa/python,\
-	gbuildtoide \
+	gbuildtojson \
 ))
 
 $(call gb_PythonTest_get_target,solenv_python): $(call gb_CustomTarget_get_target,solenv/gbuildtesttools)
diff --git a/solenv/gbuild/extensions/post_GbuildToIde.mk b/solenv/gbuild/extensions/post_GbuildToJson.mk
similarity index 85%
rename from solenv/gbuild/extensions/post_GbuildToIde.mk
rename to solenv/gbuild/extensions/post_GbuildToJson.mk
index fd5ca19..04d8807 100644
--- a/solenv/gbuild/extensions/post_GbuildToIde.mk
+++ b/solenv/gbuild/extensions/post_GbuildToJson.mk
@@ -7,21 +7,23 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 #
 
-ifneq ($(filter gbuildtoide,$(MAKECMDGOALS)),)
+ifneq ($(filter gbuildtojson,$(MAKECMDGOALS)),)
 
 # possibly recurse to ensure gbuildtojson was build before running the modded make
-gb_GbuildToIde_prep := $(shell $(MAKE) -f $(SRCDIR)/solenv/Makefile Executable_gbuildtojson)
+gb_GbuildToJson_prep := $(shell $(MAKE) -f $(SRCDIR)/solenv/Makefile Executable_gbuildtojson)
 gb_FULLDEPS:=
 
-gbuildtoide:
+gbuildtojson:
 	@true
 
 .PHONY : foo
 foo:
 	@true
 
+
+
 define gb_LinkTarget__command
-mkdir -p $(WORKDIR)/GbuildToIde/$(dir $(2))
+mkdir -p $(WORKDIR)/GbuildToJson/$(dir $(2))
 mkdir -p $(WORKDIR)/LinkTarget/$(dir $(2))
 $(if $(GBUILDTOJSON_LD_LIBRARY_PATH),LD_LIBRARY_PATH=$(GBUILDTOJSON_LD_LIBRARY_PATH)) \
 $(call gb_Executable_get_command,gbuildtojson) \
@@ -46,11 +48,11 @@ $(call gb_Executable_get_command,gbuildtojson) \
 --include=$(call var2file,$(shell $(gb_MKTEMP)),100,$(INCLUDE)) \
 --linked_libs=$(call var2file,$(shell $(gb_MKTEMP)),100,$(LINKED_LIBS)) \
 --linked_static_libs=$(call var2file,$(shell $(gb_MKTEMP)),100,$(LINKED_STATIC_LIBS)) \
-> $(WORKDIR)/GbuildToIde/$(2)
+> $(WORKDIR)/GbuildToJson/$(2)
 endef
 
 define gb_Postprocess_register_target
-gbuildtoide : $(call gb_LinkTarget_get_target,$(call gb_$(2)_get_linktarget,$(3)))
+gbuildtojson : $(call gb_LinkTarget_get_target,$(call gb_$(2)_get_linktarget,$(3)))
 
 $(call gb_LinkTarget_get_target,$(call gb_$(2)_get_linktarget,$(3))): $(gb_Helper_MISCDUMMY) foo
 endef
@@ -102,7 +104,7 @@ endef
 
 gb_Module_add_l10n_target =
 
-gb_GbuildToIde_BLACKLISTEDMODULES := connectivity compilerplugins cli_ure dictionaries bridges helpcompiler helpcontent2 icon-themes jurt sal shell cppu cppuhelper cpputools extensions external i18npool javaunohelper jurt lingucomponent odk scaddins solenv stoc tools translations udkapi unoidl writerfilter
+gb_GbuildToJson_BLACKLISTEDMODULES := connectivity compilerplugins cli_ure dictionaries bridges helpcompiler helpcontent2 icon-themes jurt sal shell cppu cppuhelper cpputools extensions external i18npool javaunohelper jurt lingucomponent odk scaddins solenv stoc tools translations udkapi unoidl writerfilter
 
 define gb_Module__add_moduledir_impl
 include $(patsubst $(1):%,%,$(filter $(1):%,$(gb_Module_MODULELOCATIONS)))/$(2)/Module_$(2).mk
@@ -112,7 +114,7 @@ gb_Module_TARGETSTACK := $$(wordlist 2,$$(words $$(gb_Module_TARGETSTACK)),$$(gb
 endef
 
 define gb_Module_add_moduledir
-$(if $(filter $(gb_GbuildToIde_BLACKLISTEDMODULES),$(2)),,$(call gb_Module__add_moduledir_impl,$(1),$(2)))
+$(if $(filter $(gb_GbuildToJson_BLACKLISTEDMODULES),$(2)),,$(call gb_Module__add_moduledir_impl,$(1),$(2)))
 
 endef
 
diff --git a/solenv/qa/python/gbuildtoide.py b/solenv/qa/python/gbuildtojson.py
similarity index 90%
rename from solenv/qa/python/gbuildtoide.py
rename to solenv/qa/python/gbuildtojson.py
index 501c5c5..67782d5 100644
--- a/solenv/qa/python/gbuildtoide.py
+++ b/solenv/qa/python/gbuildtojson.py
@@ -35,7 +35,7 @@ def clearmakevars():
             del os.environ[makeenvvar]
 
 
-class CheckGbuildToIde(unittest.TestCase):
+class CheckGbuildToJson(unittest.TestCase):
     def setUp(self):
         getgbuildtesttools(self)
         clearmakevars()
@@ -44,21 +44,21 @@ class CheckGbuildToIde(unittest.TestCase):
     def tearDown(self):
         shutil.rmtree(self.tempwork)
 
-    def test_gbuildtoide(self):
+    def test_gbuildtojson(self):
         os.makedirs(os.path.join(self.tempwork, 'LinkTarget', 'Executable'))
         shutil.copy(self.gbuildtojson, os.path.join(self.tempwork, 'LinkTarget', 'Executable'))
         (bashscripthandle, bashscriptname) = tempfile.mkstemp()
         bashscript = os.fdopen(bashscripthandle, 'w', newline='\n')
         bashscript.write("set -e\n")
         bashscript.write("cd %s/solenv/qa/python/selftest\n" % os.environ['SRCDIR'])
-        bashscript.write("%s gbuildtoide WORKDIR=%s\n" % (self.make, self.tempwork.replace('\\', '/')))
+        bashscript.write("%s gbuildtojson WORKDIR=%s\n" % (self.make, self.tempwork.replace('\\', '/')))
         bashscript.close()
         subprocess.check_call([self.bash, bashscriptname.replace('\\', '/')])
         os.remove(bashscriptname)
-        jsonfiles = os.listdir(os.path.join(self.tempwork, 'GbuildToIde', 'Library'))
+        jsonfiles = os.listdir(os.path.join(self.tempwork, 'GbuildToJson', 'Library'))
         gbuildlibs = []
         for jsonfilename in jsonfiles:
-            with open(os.path.join(self.tempwork, 'GbuildToIde', 'Library', jsonfilename), 'r') as f:
+            with open(os.path.join(self.tempwork, 'GbuildToJson', 'Library', jsonfilename), 'r') as f:
                 gbuildlibs.append(json.load(f))
         foundlibs = set()
         for lib in gbuildlibs:
@@ -67,7 +67,7 @@ class CheckGbuildToIde(unittest.TestCase):
                 foundlibs.add('gbuildselftestdep')
             elif lib['LINKTARGET'].find('gbuildselftest') != -1:
                 foundlibs.add('gbuildselftest')
-                self.assertIn('-Igbuildtoidetestinclude', lib['INCLUDE'].split())
+                self.assertIn('-Igbuildtojsontestinclude', lib['INCLUDE'].split())
                 self.assertIn('gbuildselftestdep', lib['LINKED_LIBS'].split())
                 self.assertIn('solenv/qa/python/selftest/selftestobject', lib['CXXOBJECTS'].split())
                 self.assertIn('-DGBUILDSELFTESTDEF', lib['DEFS'].split())
@@ -77,10 +77,10 @@ class CheckGbuildToIde(unittest.TestCase):
                 self.assertTrue(False)
         self.assertEqual(foundlibs, set(['gbuildselftest', 'gbuildselftestdep']))
         self.assertEqual(len(foundlibs), 2)
-        jsonfiles = os.listdir(os.path.join(self.tempwork, 'GbuildToIde', 'Executable'))
+        jsonfiles = os.listdir(os.path.join(self.tempwork, 'GbuildToJson', 'Executable'))
         gbuildexes = []
         for jsonfilename in jsonfiles:
-            with open(os.path.join(self.tempwork, 'GbuildToIde', 'Executable', jsonfilename), 'r') as f:
+            with open(os.path.join(self.tempwork, 'GbuildToJson', 'Executable', jsonfilename), 'r') as f:
                 gbuildexes.append(json.load(f))
         foundexes = set()
         for exe in gbuildexes:
@@ -91,7 +91,7 @@ class CheckGbuildToIde(unittest.TestCase):
         self.assertEqual(foundexes, set(['gbuildselftestexe']))
         self.assertEqual(len(foundexes), 1)
 
-class CheckGbuildToIdeModules(unittest.TestCase):
+class CheckGbuildToJsonModules(unittest.TestCase):
     def setUp(self):
         getgbuildtesttools(self)
         clearmakevars()
@@ -119,7 +119,7 @@ class CheckGbuildToIdeModules(unittest.TestCase):
         shutil.rmtree(self.tempsrc)
         shutil.rmtree(self.tempwork)
 
-    def test_gbuildtoide(self):
+    def test_gbuildtojson(self):
         modules = ['accessibility', 'android', 'animations', 'apple_remote', 'avmedia', 'basctl', 'basegfx', 'basic', 'bean', 'canvas', 'chart2', 'codemaker', 'comphelper', 'cppcanvas', 'cui', 'dbaccess', 'desktop', 'drawinglayer', 'dtrans', 'editeng', 'embeddedobj', 'embedserv', 'eventattacher', 'extras', 'filter', 'forms', 'formula', 'fpicker', 'framework', 'hwpfilter', 'i18nlangtag', 'i18nutil', 'idl', 'idlc', 'instsetoo_native', 'io', 'ios', 'jvmaccess', 'jvmfwk', 'l10ntools', 'librelogo', 'libreofficekit', 'linguistic', 'lotuswordpro', 'mysqlc', 'nlpsolver', 'o3tl', 'offapi', 'officecfg', 'onlineupdate', 'oovbaapi', 'oox', 'opencl', 'package', 'postprocess', 'pyuno', 'registry', 'remotebridges', 'reportbuilder', 'reportdesign', 'ridljar', 'rsc', 'salhelper', 'sax', 'sc', 'sccomp', 'scp2', 'scripting', 'sd', 'sdext', 'setup_native', 'sfx2', 'slideshow', 'smoketest', 'soltools', 'sot', 'starmath', 'store', 'svgio', 'svl', 'svtools', 'svx', 'sw', 'swext', 'sysui', 'test', 'testtoo
 ls', 'toolkit', 'tubes', 'ucb', 'ucbhelper', 'udkapi', 'uitest', 'UnoControls', 'unodevtools', 'unoidl', 'unoil', 'unotest', 'unotools', 'unoxml', 'ure', 'uui', 'vbahelper', 'vcl', 'winaccessibility', 'wizards', 'writerperfect', 'xmerge', 'xmlhelp', 'xmloff', 'xmlreader', 'xmlscript', 'xmlsecurity']
         if os.environ['OS'] == 'WNT':
             # for now, use a limited subset for testing on windows as it is so annoyingly slow on this
@@ -134,16 +134,17 @@ class CheckGbuildToIdeModules(unittest.TestCase):
             bashscript = os.fdopen(bashscripthandle, 'w', newline='\n')
             bashscript.write("set -e\n")
             bashscript.write("cd %s/%s\n" % (self.tempsrc.replace('\\','/'), module))
-            bashscript.write("%s gbuildtoide WORKDIR=%s SRCDIR=%s\n" % (self.make, self.tempwork.replace('\\', '/'), self.tempsrc.replace('\\','/')))
+            bashscript.write("%s gbuildtojson WORKDIR=%s SRCDIR=%s\n" % (self.make, self.tempwork.replace('\\', '/'), self.tempsrc.replace('\\','/')))
             bashscript.close()
             subprocess.check_call([self.bash, bashscriptname.replace('\\', '/')])
             os.remove(bashscriptname)
-        jsonfiles = os.listdir(os.path.join(self.tempwork, 'GbuildToIde', 'Library'))
+        jsonfiles = os.listdir(os.path.join(self.tempwork, 'GbuildToJson', 'Library'))
         gbuildlibs = []
         for jsonfilename in jsonfiles:
-            with open(os.path.join(self.tempwork, 'GbuildToIde', 'Library', jsonfilename), 'r') as f:
+            with open(os.path.join(self.tempwork, 'GbuildToJson', 'Library', jsonfilename), 'r') as f:
                 gbuildlibs.append(json.load(f))
 
+
 if __name__ == "__main__":
     unittest.main()
 
diff --git a/solenv/qa/python/selftest/Library_gbuildselftest.mk b/solenv/qa/python/selftest/Library_gbuildselftest.mk
index d1b3919..bed015c 100644
--- a/solenv/qa/python/selftest/Library_gbuildselftest.mk
+++ b/solenv/qa/python/selftest/Library_gbuildselftest.mk
@@ -10,7 +10,7 @@
 $(eval $(call gb_Library_Library,gbuildselftest))
 
 $(eval $(call gb_Library_set_include,gbuildselftest,\
-    -Igbuildtoidetestinclude\
+    -Igbuildtojsontestinclude\
     $$(INCLUDE) \
 ))
 
diff --git a/solenv/qa/python/selftest/Module_selftest.mk b/solenv/qa/python/selftest/Module_selftest.mk
index f4fb030..37c53fd 100644
--- a/solenv/qa/python/selftest/Module_selftest.mk
+++ b/solenv/qa/python/selftest/Module_selftest.mk
@@ -7,9 +7,9 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 #
 
-$(eval $(call gb_Module_Module,gbuildtoidetest))
+$(eval $(call gb_Module_Module,gbuildtojsontest))
 
-$(eval $(call gb_Module_add_targets,gbuildtoidetest,\
+$(eval $(call gb_Module_add_targets,gbuildtojsontest,\
 	Library_gbuildselftestdep \
 	Library_gbuildselftest \
 	Executable_gbuildselftestexe \


More information about the Libreoffice-commits mailing list