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

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

commit 9154b839c5e3e534fbd61fc620678f1682509f20
Author: Arrigo Marchiori <ard...@yahoo.it>
AuthorDate: Fri Sep 10 21:06:30 2021 +0200

    A little bit of documentation about gotoSCons
---
 gotoSCons/README.txt                               | 26 ++++++++++++++++++++++
 .../openoffice/gotoSCons/GBuildConverter.java      | 17 ++++++++++++--
 2 files changed, 41 insertions(+), 2 deletions(-)

diff --git a/gotoSCons/README.txt b/gotoSCons/README.txt
new file mode 100644
index 0000000..2c4ec31
--- /dev/null
+++ b/gotoSCons/README.txt
@@ -0,0 +1,26 @@
+gotoSCons is a Java program whose aim is to automatically convert gbuild
+build instructions into SCons script files.
+
+
+Compilation
+===========
+$ cd gotoSCons
+$ mvn package
+
+
+Usage
+=====
+$ cd gotoSCons
+$ java -jar target/gotoSCons-0.1-SNAPSHOT.jar parsingAnalysis ../main
+
+
+Other sources of information
+============================
+Check the following threads on the dev@ mailing list:
+
+ - about build environment development (was: declaring gbuild target
+   dependencies)
+   
https://lists.apache.org/thread.html/rc50de5d076314f6adf2ee4fe764834e4130601b39d854be06150d118%40%3Cdev.openoffice.apache.org%3E
+
+ - Automated gbuild -> SCons convertibility now at 88.57%
+   
https://lists.apache.org/thread.html/r911b40a582019f641e93253df07341370cb9aeb9d1dc50474e48aa09%40%3Cdev.openoffice.apache.org%3E
diff --git 
a/gotoSCons/src/main/java/org/apache/openoffice/gotoSCons/GBuildConverter.java 
b/gotoSCons/src/main/java/org/apache/openoffice/gotoSCons/GBuildConverter.java
index f5a3a74..4fe5614 100644
--- 
a/gotoSCons/src/main/java/org/apache/openoffice/gotoSCons/GBuildConverter.java
+++ 
b/gotoSCons/src/main/java/org/apache/openoffice/gotoSCons/GBuildConverter.java
@@ -29,9 +29,18 @@ import org.apache.openoffice.gotoSCons.targets.Module;
 import org.apache.openoffice.gotoSCons.targets.Repository;
 
 public class GBuildConverter {
+    /** Print usage information */
+    static void usage() {
+        System.err.println("Usage:");
+        System.err.println("   gotoSCons parsingAnalysis /path/to/main");
+        System.err.println("   gotoSCons parseModule /path/to/Module_xxx.mk");
+        System.err.println("   gotoSCons parseLibrary 
/path/to/Library_xxx.mk");
+    }
+
+
     public static void main(String[] args) throws Exception {
         if (args.length < 1) {
-            System.err.println("Needs args");
+            usage();
             System.exit(1);
         }
         if (args[0].equals("parsingAnalysis")) {
@@ -51,11 +60,15 @@ public class GBuildConverter {
             Library library = new Library(new File(args[1]));
             System.out.println(library);
         } else {
-            throw new Exception("Unsupported args");
+            usage();
+            System.exit(1);
         }
     }
 
     public static void parsingAnalysis(String[] args) throws Exception {
+        if (args.length < 2) {
+            throw new Exception("Needs path to OpenOffice main source 
directory");
+        }
         File dir = new File(args[1]);
         int modules = 0;
         int parsable = 0;

Reply via email to