You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by da...@apache.org on 2020/02/08 12:23:08 UTC

[openoffice] 01/04: Implement "no exception objects". Fix site_init.py

This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch scons-build
in repository https://gitbox.apache.org/repos/asf/openoffice.git

commit bf3243109034a921e32a6e21d8db0a0f65aa24c2
Author: Damjan Jovanovic <da...@apache.org>
AuthorDate: Sat Feb 8 11:47:38 2020 +0200

    Implement "no exception objects".
    Fix site_init.py
    
    Patch by: me
---
 .../openoffice/gotoSCons/SConsConverter.java       | 22 +++++++++++++++++++++-
 main/site_scons/site_init.py                       |  1 -
 2 files changed, 21 insertions(+), 2 deletions(-)

diff --git a/gotoSCons/src/main/java/org/apache/openoffice/gotoSCons/SConsConverter.java b/gotoSCons/src/main/java/org/apache/openoffice/gotoSCons/SConsConverter.java
index 914cb55..147b328 100644
--- a/gotoSCons/src/main/java/org/apache/openoffice/gotoSCons/SConsConverter.java
+++ b/gotoSCons/src/main/java/org/apache/openoffice/gotoSCons/SConsConverter.java
@@ -174,7 +174,7 @@ public class SConsConverter {
     
     private String convertObjects(BaseBinary binary) throws Exception {
         String objectsVariable = binary.getName() + "Objects";
-        if (binary.getExceptionObjects().isEmpty()) {
+        if (binary.getExceptionObjects().isEmpty() && binary.getNoexceptionObjects().isEmpty()) {
             throw new Exception("How can a binary have no source files?");
         }
         out.println(objectsVariable + " = AOOSharedObjects()");
@@ -255,6 +255,26 @@ public class SConsConverter {
             out.println();
             out.println("])");
         }
+
+        if (!binary.getNoexceptionObjects().isEmpty()) {
+            out.println(objectsVariable + ".AddCxxNoExceptionSources([");
+            boolean first = true;
+            for (String noExceptionObject : binary.getNoexceptionObjects()) {
+                if (!first) {
+                    out.println(",");
+                }
+                // in: fileaccess/source/FileAccess
+                // out: source/FileAccess.cxx
+                int firstSlash = noExceptionObject.indexOf('/');
+                if (firstSlash < 0) {
+                    throw new Exception("Invalid filename " + noExceptionObject);
+                }
+                out.print("    '" + noExceptionObject.substring(firstSlash + 1) + ".cxx'");
+                first = false;
+            }
+            out.println();
+            out.println("])");
+        }
         
         return objectsVariable;
     }
diff --git a/main/site_scons/site_init.py b/main/site_scons/site_init.py
index f41a204..11a6244 100644
--- a/main/site_scons/site_init.py
+++ b/main/site_scons/site_init.py
@@ -23,7 +23,6 @@ from SCons.Script import *
 import sys
 import os
 from config import soenv
-import component
 from globals import *