Makefile.in                                  |    4 -
 dev/null                                     |binary
 solenv/Module_solenv.mk                      |    6 ++
 solenv/PythonTest_solenv_python.mk           |   16 +++++++
 solenv/gbuild/extensions/post_GbuildToIde.mk |   50 ++++++++++++++++++++++++
 solenv/qa/python/gbuildtoide.py              |   56 +++++++++++++++++++++++++++
 6 files changed, 130 insertions(+), 2 deletions(-)

New commits:
commit da47c37c59ce8ce8c56f396ec79361c19b4bdb51
Author: Bjoern Michaelsen <bjoern.michael...@canonical.com>
Date:   Thu Oct 13 00:32:20 2016 +0200

    installoffice{,_impress}.oxt seem to be long dead code
    
    Change-Id: Idf11c19d861a95e0f4a0a2d9c7c7cd8739e71282
    Reviewed-on: https://gerrit.libreoffice.org/29745
    Reviewed-by: Björn Michaelsen <bjoern.michael...@canonical.com>
    Tested-by: Björn Michaelsen <bjoern.michael...@canonical.com>

diff --git a/solenv/bin/installoffice.oxt b/solenv/bin/installoffice.oxt
deleted file mode 100644
index feb1d87..0000000
Binary files a/solenv/bin/installoffice.oxt and /dev/null differ
diff --git a/solenv/bin/installoffice_impress.oxt 
b/solenv/bin/installoffice_impress.oxt
deleted file mode 100755
index 31c7bfa4..0000000
Binary files a/solenv/bin/installoffice_impress.oxt and /dev/null differ
commit f2061f85bf4d3d005668c3192589f0d242a49a36
Author: Bjoern Michaelsen <bjoern.michael...@canonical.com>
Date:   Wed Oct 12 23:42:26 2016 +0200

    add initial json export for gbuild data
    
    - also add gbuild selftest to test this (and possibly more later)
    
    Change-Id: Ia4ef41095613e596f39d107df700e929579ba45f
    Reviewed-on: https://gerrit.libreoffice.org/29744
    Reviewed-by: Björn Michaelsen <bjoern.michael...@canonical.com>
    Tested-by: Björn Michaelsen <bjoern.michael...@canonical.com>

diff --git a/Makefile.in b/Makefile.in
index 4a16e46..344d357 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,$(MAKECMDGOALS))
+ $(filter all build-l10n-only build-non-l10n-only debugrun help showmodules 
translations $(gb_Top_MODULE_CHECK_TARGETS) check packageinfo 
gbuildtoide,$(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:
+help showmodules gbuildtoide:
        $(MAKE) $(PARALLELISM_OPTION) $(GMAKE_OPTIONS) -f 
$(SRCDIR)/Makefile.gbuild $@
 
 cross-toolset: bootstrap fetch
diff --git a/solenv/Module_solenv.mk b/solenv/Module_solenv.mk
index 7800898..d179771 100644
--- a/solenv/Module_solenv.mk
+++ b/solenv/Module_solenv.mk
@@ -21,4 +21,10 @@ $(eval $(call gb_Module_add_targets,solenv,\
 ))
 endif
 
+ifneq ($(DISABLE_PYTHON),TRUE)
+$(eval $(call gb_Module_add_subsequentcheck_targets,solenv,\
+       PythonTest_solenv_python \
+))
+endif
+
 # vim: set shiftwidth=4 tabstop=4 noexpandtab:
diff --git a/solenv/PythonTest_solenv_python.mk 
b/solenv/PythonTest_solenv_python.mk
new file mode 100644
index 0000000..8985ce2
--- /dev/null
+++ b/solenv/PythonTest_solenv_python.mk
@@ -0,0 +1,16 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_PythonTest_PythonTest,solenv_python))
+
+$(eval $(call 
gb_PythonTest_add_modules,solenv_python,$(SRCDIR)/solenv/qa/python,\
+       gbuildtoide \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/solenv/gbuild/extensions/post_GbuildToIde.mk 
b/solenv/gbuild/extensions/post_GbuildToIde.mk
new file mode 100644
index 0000000..1c242a40
--- /dev/null
+++ b/solenv/gbuild/extensions/post_GbuildToIde.mk
@@ -0,0 +1,50 @@
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+ifneq ($(filter gbuildtoide,$(MAKECMDGOALS)),)
+
+gbuildtoide:
+       true
+
+.PHONY : foo
+foo:
+       true
+
+define gb_Postprocess_register_target
+gbuildtoide : $(call gb_LinkTarget_get_target,$(call 
gb_Library_get_linktarget,$(3)))
+
+
+$(call gb_LinkTarget_get_target,$(call gb_Library_get_linktarget,$(3))): 
$(gb_Helper_MISCDUMMY) foo
+
+define gb_LinkTarget__command
+       mkdir -p $(WORKDIR)/GbuildToIde/Library
+       printf '{"LINKTARGET": "%s"' '$$(2)' > $(WORKDIR)/GbuildToIde/$$(2)
+       printf ', "ILIBTARGET": "%s"' '$$(ILIBTARGET)' >> 
$(WORKDIR)/GbuildToIde/$$(2)
+       printf ', "COBJECTS": "%s"' '$$(COBJECTS)' >> 
$(WORKDIR)/GbuildToIde/$$(2)
+       printf ', "CXXOBJECTS": "%s"' '$$(CXXOBJECTS)' >> 
$(WORKDIR)/GbuildToIde/$$(2)
+       printf ', "YACCOBJECTS": "%s"' '$$(YACCOBJECTS)' >> 
$(WORKDIR)/GbuildToIde/$$(2)
+       printf ', "OBJCOBJECTS": "%s"' '$$(OBJCOBJECTS)' >> 
$(WORKDIR)/GbuildToIde/$$(2)
+       printf ', "OBJCXXOBJECTS": "%s"' '$$(OBJCXXOBJECTS)' >> 
$(WORKDIR)/GbuildToIde/$$(2)
+       printf ', "ASMOBJECTS": "%s"' '$$(ASMOBJECTS)' >> 
$(WORKDIR)/GbuildToIde/$$(2)
+       printf ', "GENCOBJECTS": "%s"' '$$(GENCOBJECTS)' >> 
$(WORKDIR)/GbuildToIde/$$(2)
+       printf ', "GENCXXOBJECTS": "%s"' '$$(GENCXXOBJECTS)' >> 
$(WORKDIR)/GbuildToIde/$$(2)
+       printf ', "CFLAGS": "%s"' '$$(T_CFLAGS) $$(T_CFLAGS_APPEND)' >> 
$(WORKDIR)/GbuildToIde/$$(2)
+       printf ', "CXXFLAGS": "%s"' '$$(T_CXXFLAGS) $$(T_CXXFLAGS_APPEND)' >> 
$(WORKDIR)/GbuildToIde/$$(2)
+       printf ', "OBJCFLAGS": "%s"' '$$(T_OBJCFLAGS)' >> 
$(WORKDIR)/GbuildToIde/$$(2)
+       printf ', "OBJCXXFLAGS": "%s"' '$$(T_OBJCXXFLAGS)' >> 
$(WORKDIR)/GbuildToIde/$$(2)
+       printf ', "DEFS": "%s"' '$$(DEFS)' >> $(WORKDIR)/GbuildToIde/$$(2)
+       printf ', "INCLUDE": "%s"' '$$(INCLUDE)' >> $(WORKDIR)/GbuildToIde/$$(2)
+       printf ', "LINKED_LIBS": "%s"' '$$(LINKED_LIBS)' >> 
$(WORKDIR)/GbuildToIde/$$(2)
+       printf ', "LINKED_STATIC_LIBS": "%s"' '$$(LINKED_STATIC_LIBS)' >> 
$(WORKDIR)/GbuildToIde/$$(2)
+       printf '}\n' >> $(WORKDIR)/GbuildToIde/$$(2)
+endef
+
+endef
+
+endif
+# vim: set noet ts=4 sw=4:
diff --git a/solenv/qa/python/gbuildtoide.py b/solenv/qa/python/gbuildtoide.py
new file mode 100644
index 0000000..6184f91
--- /dev/null
+++ b/solenv/qa/python/gbuildtoide.py
@@ -0,0 +1,56 @@
+'''
+  This is file is part of the LibreOffice project.
+
+  This Source Code Form is subject to the terms of the Mozilla Public
+  License, v. 2.0. If a copy of the MPL was not distributed with this
+  file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+  This file incorporates work covered by the following license notice:
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements. See the NOTICE file distributed
+    with this work for additional information regarding copyright
+    ownership. The ASF licenses this file to you under the Apache
+    License, Version 2.0 (the "License"); you may not use this file
+    except in compliance with the License. You may obtain a copy of
+    the License at http://www.apache.org/licenses/LICENSE-2.0 .
+'''
+
+import subprocess
+import unittest
+import json
+import os
+import os.path
+
+
+class CheckGbuildToIde(unittest.TestCase):
+
+    def test_gbuildtoide(self):
+        os.chdir(os.path.join(os.environ['SRCDIR'], 'solenv', 'qa', 'python', 
'selftest'))
+        subprocess.check_call(['make', 'gbuildtoide'])
+        jsonfiles = os.listdir(os.path.join(os.environ['WORKDIR'], 
'GbuildToIde', 'Library'))
+        gbuildlibs = []
+        for jsonfilename in jsonfiles:
+            with open(os.path.join(os.environ['WORKDIR'], 'GbuildToIde', 
'Library', jsonfilename), 'r') as f:
+                print('loading %s' % jsonfilename)
+                gbuildlibs.append(json.load(f))
+        foundlibs = set()
+        for lib in gbuildlibs:
+            self.assertEqual(set(lib.keys()), set(['ASMOBJECTS', 'CFLAGS', 
'COBJECTS', 'CXXFLAGS', 'CXXOBJECTS', 'DEFS', 'GENCOBJECTS', 'GENCXXOBJECTS', 
'ILIBTARGET', 'INCLUDE', 'LINKED_LIBS', 'LINKED_STATIC_LIBS', 'LINKTARGET', 
'OBJCFLAGS', 'OBJCOBJECTS', 'OBJCXXFLAGS', 'OBJCXXOBJECTS', 'YACCOBJECTS']))
+            if lib['LINKTARGET'].find('gbuildselftestdep') != -1:
+                foundlibs.add('gbuildselftestdep')
+            elif lib['LINKTARGET'].find('gbuildselftest') != -1:
+                foundlibs.add('gbuildselftest')
+                self.assertIn('-Igbuildtoidetestinclude', 
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())
+                self.assertIn('-DGBUILDSELFTESTCXXFLAG', 
lib['CXXFLAGS'].split())
+                self.assertIn('-DGBUILDSELFTESTCFLAG', lib['CFLAGS'].split())
+            else:
+                self.assertTrue(False)
+        self.assertEqual(foundlibs, set(['gbuildselftest', 
'gbuildselftestdep']))
+        self.assertEqual(len(foundlibs), 2)
+
+if __name__ == "__main__":
+    unittest.main()
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to