public inbox for frysk-cvs@sourceware.org
help / color / mirror / Atom feed
* [SCM]  master: frysk-sys/frysk/config/ChangeLog
@ 2008-04-15 23:13 cagney
  0 siblings, 0 replies; only message in thread
From: cagney @ 2008-04-15 23:13 UTC (permalink / raw)
  To: frysk-cvs

The branch, master has been updated
       via  4f78e3be3b50e343d6c8d84e629dc46feef29637 (commit)
       via  131e27e8d1fa5625b19e28d7b074920e8807600d (commit)
       via  c0543aa7af872f629798654c47b052ae3c29334c (commit)
       via  11bb5cd8815c3e5048dc197705b735844f3033b0 (commit)
      from  7fd681e8211332ed2f973456aa7add363f28183e (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit 4f78e3be3b50e343d6c8d84e629dc46feef29637
Author: Andrew Cagney <cagney@redhat.com>
Date:   Tue Apr 15 19:12:25 2008 -0400

    frysk-sys/frysk/config/ChangeLog
    2008-04-15  Andrew Cagney  <cagney@redhat.com>
    
    	* jni/BuildCompiler.cxx: Implement.

commit 131e27e8d1fa5625b19e28d7b074920e8807600d
Author: Andrew Cagney <cagney@redhat.com>
Date:   Tue Apr 15 19:01:18 2008 -0400

    Escape $ in Makefile.
    
    frysk-sys/ChangeLog
    2008-04-15  Andrew Cagney  <cagney@redhat.com>
    
    	* Makefile.am (JniRunner): Escape $@.

commit c0543aa7af872f629798654c47b052ae3c29334c
Author: Andrew Cagney <cagney@redhat.com>
Date:   Tue Apr 15 18:44:42 2008 -0400

    Add JNI FryskVersion.
    
    frysk-sys/frysk/config/ChangeLog
    2008-04-15  Andrew Cagney  <cagney@redhat.com>
    
    	* jni/FryskVersion.cxx-in: Replace ...
    	* jni/FryskVersion.cxx: ... this.

commit 11bb5cd8815c3e5048dc197705b735844f3033b0
Author: Andrew Cagney <cagney@redhat.com>
Date:   Tue Apr 15 18:05:07 2008 -0400

    JNI frysk.config.PrefixFactory.
    
    frysk-common/ChangeLog
    2008-04-15  Andrew Cagney  <cagney@redhat.com>
    
    	* TestRunner.java-in: Use PrefixFactory.
    
    frysk-gui/frysk/bindir/ChangeLog
    2008-04-15  Andrew Cagney  <cagney@redhat.com>
    
    	* frysk.java: Use Prefix and PrefixFactory.
    
    frysk-gui/frysk/pkglibdir/ChangeLog
    2008-04-15  Andrew Cagney  <cagney@redhat.com>
    
    	* funit.java: Use Prefix and PrefixFactory.
    
    frysk-sys/frysk/config/ChangeLog
    2008-04-15  Andrew Cagney  <cagney@redhat.com>
    
    	* cni/PrefixFactory.cxx-in: New.
    	* jni/PrefixFactory.cxx-in: New.
    	* Config.java: Use Prefix.java.
    	* cni/Config.cxx-in: Update.
    	* TestConfig.java: Rename this ...
    	* TestPrefix.java: ... to this.
    	* PrefixFactory.java: Extract from Config.java.
    	* Prefix.java: Extract from Config.java.
    
    frysk-sys/frysk/junit/ChangeLog
    2008-04-15  Andrew Cagney  <cagney@redhat.com>
    
    	* Runner.java: Use Prefix and PrefixFactory.

-----------------------------------------------------------------------

Summary of changes:
 frysk-common/ChangeLog                             |    4 +
 frysk-common/TestRunner.java-in                    |    9 +-
 frysk-gui/frysk/bindir/ChangeLog                   |    4 +
 frysk-gui/frysk/bindir/frysk.java                  |   15 +-
 frysk-gui/frysk/gui/FryskGui.java-in               |   13 +-
 frysk-gui/frysk/pkglibdir/ChangeLog                |    4 +
 frysk-gui/frysk/pkglibdir/funit.java               |    9 +-
 frysk-sys/ChangeLog                                |    4 +
 frysk-sys/Makefile.am                              |    2 +-
 frysk-sys/frysk/config/ChangeLog                   |   16 ++
 frysk-sys/frysk/config/Config.java                 |  101 +----------
 frysk-sys/frysk/config/Prefix.java                 |  192 ++++++++++++++++++++
 frysk-sys/frysk/config/PrefixFactory.java          |  167 +++++++++++++++++
 .../config/{TestConfig.java => TestPrefix.java}    |   79 ++++----
 frysk-sys/frysk/config/cni/Config.cxx-in           |  144 ---------------
 .../FryskVersion.cxx => cni/PrefixFactory.cxx-in}  |   48 ++++-
 frysk-sys/frysk/config/jni/BuildCompiler.cxx       |   52 +++---
 .../jni/{FryskVersion.cxx => FryskVersion.cxx-in}  |   10 +-
 .../jni/{FryskVersion.cxx => PrefixFactory.cxx-in} |   44 ++++-
 frysk-sys/frysk/junit/ChangeLog                    |    4 +
 frysk-sys/frysk/junit/Runner.java                  |   22 +-
 21 files changed, 577 insertions(+), 366 deletions(-)
 create mode 100644 frysk-sys/frysk/config/Prefix.java
 create mode 100644 frysk-sys/frysk/config/PrefixFactory.java
 rename frysk-sys/frysk/config/{TestConfig.java => TestPrefix.java} (69%)
 copy frysk-sys/frysk/config/{jni/FryskVersion.cxx => cni/PrefixFactory.cxx-in} (72%)
 copy frysk-sys/frysk/config/jni/{FryskVersion.cxx => FryskVersion.cxx-in} (89%)
 rename frysk-sys/frysk/config/jni/{FryskVersion.cxx => PrefixFactory.cxx-in} (67%)

First 500 lines of diff:
diff --git a/frysk-common/ChangeLog b/frysk-common/ChangeLog
index 89af89e..c4854cf 100644
--- a/frysk-common/ChangeLog
+++ b/frysk-common/ChangeLog
@@ -1,3 +1,7 @@
+2008-04-15  Andrew Cagney  <cagney@redhat.com>
+
+	* TestRunner.java-in: Use PrefixFactory.
+
 2008-04-15  Mark Wielaard  <mwielaard@redhat.com>
 
 	* Makefile.gen.sh (has_java_main): Make regexp more strict.
diff --git a/frysk-common/TestRunner.java-in b/frysk-common/TestRunner.java-in
index b43f960..cde02bf 100755
--- a/frysk-common/TestRunner.java-in
+++ b/frysk-common/TestRunner.java-in
@@ -41,7 +41,8 @@
 
 import frysk.junit.Runner;
 import @GEN_PACKAGENAME@.JUnitTests;
-import frysk.config.Config;
+import frysk.config.Prefix;
+import frysk.config.PrefixFactory;
 
 /**
  * Run the JUnit tests from within the build tree.
@@ -54,9 +55,9 @@ public class TestRunner
 	String ABS_BUILDDIR = "@abs_builddir@";
 	String ABS_SRCDIR = "@abs_srcdir@";
 
-	Config configAll = Config.createBuildConfig(ABS_SRCDIR, ABS_BUILDDIR);
-	Config config32 = Config.createBuildConfig32(ABS_SRCDIR, ABS_BUILDDIR);
-	Config config64 = Config.createBuildConfig64(ABS_SRCDIR, ABS_BUILDDIR);
+	Prefix configAll = PrefixFactory.createBuildPrefix(ABS_SRCDIR, ABS_BUILDDIR);
+	Prefix config32 = PrefixFactory.createBuildPrefix32(ABS_SRCDIR, ABS_BUILDDIR);
+	Prefix config64 = PrefixFactory.createBuildPrefix64(ABS_SRCDIR, ABS_BUILDDIR);
 
 	Runner testRunner = new Runner("TestRunner", args,
 				       configAll, config32, config64);
diff --git a/frysk-gui/frysk/bindir/ChangeLog b/frysk-gui/frysk/bindir/ChangeLog
index e513235..d311715 100644
--- a/frysk-gui/frysk/bindir/ChangeLog
+++ b/frysk-gui/frysk/bindir/ChangeLog
@@ -1,3 +1,7 @@
+2008-04-15  Andrew Cagney  <cagney@redhat.com>
+
+	* frysk.java: Use Prefix and PrefixFactory.
+
 2008-04-04  Andrew Cagney  <cagney@redhat.com>
 
 	* frysk.xml-in: Rename frysk.xml.
diff --git a/frysk-gui/frysk/bindir/frysk.java b/frysk-gui/frysk/bindir/frysk.java
index 475cbf8..8e8e806 100644
--- a/frysk-gui/frysk/bindir/frysk.java
+++ b/frysk-gui/frysk/bindir/frysk.java
@@ -39,18 +39,17 @@
 
 package frysk.bindir;
 
-import frysk.config.Config;
+import frysk.config.Prefix;
+import frysk.config.PrefixFactory;
 import frysk.gui.Gui;
 
 /**
  * Start the frysk GUI.
  */
 
-class frysk
-{
-  public static void main (String[] args)
-  {
-    Config.set (Config.createInstallConfig ());
-    Gui.gui(args);
-  }
+class frysk {
+    public static void main (String[] args) {
+	Prefix.set(PrefixFactory.createInstallPrefix ());
+	Gui.gui(args);
+    }
 }
diff --git a/frysk-gui/frysk/gui/FryskGui.java-in b/frysk-gui/frysk/gui/FryskGui.java-in
index 07a69b0..5eca8b5 100644
--- a/frysk-gui/frysk/gui/FryskGui.java-in
+++ b/frysk-gui/frysk/gui/FryskGui.java-in
@@ -41,19 +41,18 @@
 
 package frysk.gui;
 
-import frysk.config.Config;
+import frysk.config.Prefix;
+import frysk.config.PrefixFactory;
 
 /**
  * Wrapper class for Gui.java. This is an entry point for the Frysk UI
  * that runs from the build-tree.
  */
-public class FryskGui
-{
-    public static void main (String[] args)
-    {
+public class FryskGui {
+    public static void main (String[] args) {
 	final String ABS_SRCDIR = "@abs_srcdir@";
 	final String ABS_BUILDDIR = "@abs_builddir@";
-	Config.set (Config.createBuildConfig (ABS_SRCDIR, ABS_BUILDDIR));
-	Gui.gui (args);
+	Prefix.set(PrefixFactory.createBuildPrefix(ABS_SRCDIR, ABS_BUILDDIR));
+	Gui.gui(args);
     }
 }
diff --git a/frysk-gui/frysk/pkglibdir/ChangeLog b/frysk-gui/frysk/pkglibdir/ChangeLog
index bfe2fe6..f67669f 100644
--- a/frysk-gui/frysk/pkglibdir/ChangeLog
+++ b/frysk-gui/frysk/pkglibdir/ChangeLog
@@ -1,3 +1,7 @@
+2008-04-15  Andrew Cagney  <cagney@redhat.com>
+
+	* funit.java: Use Prefix and PrefixFactory.
+
 2008-04-11  Andrew Cagney  <cagney@redhat.com>
 
 	* ftail.xml-in: Include version.
diff --git a/frysk-gui/frysk/pkglibdir/funit.java b/frysk-gui/frysk/pkglibdir/funit.java
index 33b165b..f108ecf 100755
--- a/frysk-gui/frysk/pkglibdir/funit.java
+++ b/frysk-gui/frysk/pkglibdir/funit.java
@@ -39,7 +39,8 @@
 
 package frysk.pkglibdir;
 
-import frysk.config.Config;
+import frysk.config.Prefix;
+import frysk.config.PrefixFactory;
 import frysk.junit.Runner;
 import java.util.LinkedList;
 
@@ -51,9 +52,9 @@ import java.util.LinkedList;
 public class funit
 {  
     public static void main (String[] args) {
-	Config configAll = Config.createInstallConfig();
-	Config config32 = Config.createInstallConfig32();
-	Config config64 = Config.createInstallConfig64();
+	Prefix configAll = PrefixFactory.createInstallPrefix();
+	Prefix config32 = PrefixFactory.createInstallPrefix32();
+	Prefix config64 = PrefixFactory.createInstallPrefix64();
 	Runner testRunner = new Runner("funit", args, configAll,
 				       config32, config64);
 
diff --git a/frysk-sys/ChangeLog b/frysk-sys/ChangeLog
index 4ee4dcb..95d824e 100644
--- a/frysk-sys/ChangeLog
+++ b/frysk-sys/ChangeLog
@@ -1,3 +1,7 @@
+2008-04-15  Andrew Cagney  <cagney@redhat.com>
+
+	* Makefile.am (JniRunner): Escape $@.
+
 2008-04-11  Andrew Cagney  <cagney@redhat.com>
 
 	* Makefile.in (JniRunner): Use $(libdir).
diff --git a/frysk-sys/Makefile.am b/frysk-sys/Makefile.am
index e0730e6..22c00a2 100644
--- a/frysk-sys/Makefile.am
+++ b/frysk-sys/Makefile.am
@@ -83,7 +83,7 @@ JniRunner:
 	echo "LD_PRELOAD=$(libdir)/libstdc++.so.6 \\"		>> $@.tmp
 	echo "LD_LIBRARY_PATH=. \\"				>> $@.tmp
 	echo "CLASSPATH=$(CLASSPATH):frysk-sys.jar:JniRunner.jar \\" >> $@.tmp
-	echo "java JniRunner \"$$@\""				>> $@.tmp
+	echo "java JniRunner \"\$$@\""				>> $@.tmp
 	chmod a+x $@.tmp
 	mv $@.tmp $@
 
diff --git a/frysk-sys/frysk/config/ChangeLog b/frysk-sys/frysk/config/ChangeLog
index 1d6ad89..95364ad 100644
--- a/frysk-sys/frysk/config/ChangeLog
+++ b/frysk-sys/frysk/config/ChangeLog
@@ -1,3 +1,19 @@
+2008-04-15  Andrew Cagney  <cagney@redhat.com>
+
+	* jni/BuildCompiler.cxx: Implement.
+
+	* jni/FryskVersion.cxx-in: Replace ...
+	* jni/FryskVersion.cxx: ... this.
+
+	* cni/PrefixFactory.cxx-in: New.
+	* jni/PrefixFactory.cxx-in: New.
+	* Config.java: Use Prefix.java.
+	* cni/Config.cxx-in: Update.
+	* TestConfig.java: Rename this ...
+	* TestPrefix.java: ... to this.
+	* PrefixFactory.java: Extract from Config.java.
+	* Prefix.java: Extract from Config.java.
+
 2008-04-14  Andrew Cagney  <cagney@redhat.com>
 
 	* Config.java (getFryskTestDir()): Delete.
diff --git a/frysk-sys/frysk/config/Config.java b/frysk-sys/frysk/config/Config.java
index e0be0c3..ab1cf44 100644
--- a/frysk-sys/frysk/config/Config.java
+++ b/frysk-sys/frysk/config/Config.java
@@ -45,87 +45,7 @@ import java.io.File;
  * All the run-time (install time) configuration information.
  */
 
-public class Config
-{
-    private File theBinDir;
-    private File thePkgDataDir;
-    private File thePkgLibDir;
-    private File thePkgLib32Dir;
-    private File thePkgLib64Dir;
-    /**
-     * Do not allow extension.
-     */
-    private Config () {
-    }
-
-    /**
-     * The currently selected Configuration.
-     */
-    static private Config current;
-    /**
-     * Select the specified configuration.
-     */
-    public static final void set (Config config) {
-	current = config;
-    }
-
-    /**
-     * Return the current config.
-     */
-    static final Config get () {
-	return current;
-    }
-
-    /**
-     * Create the "native" install tree configuration; all possible
-     * paths, including 32-on-64 when applicable, are defined.
-     */
-    public static native final Config createInstallConfig();
-
-    /**
-     * Create a 32-bit specific install configuration; return NULL if
-     * this is not supported.
-     */
-    public static native final Config createInstallConfig32();
-
-    /**
-     * Create a 64-bit specific install configuration; return NULL if
-     * if this is not supported.
-     */
-    public static native final Config createInstallConfig64();
-
-    /**
-     * Create the "native" build-tree configuration; all possible
-     * paths, including 32-on-64 when applicable, are enabled.
-     */
-    public static native final Config createBuildConfig(String absSrcDir,
-							String absBuildDir);
-
-    /**
-     * Create a 32-bit specific build-tree configuration; return NULL
-     * if this is not supported by this build.
-     */
-    public static native final Config createBuildConfig32(String absSrcDir,
-							  String absBuildDir);
-    /**
-     * Create a 64-bit specific build-tree configuration; return NULL
-     * if this is not supported by this build.
-     */
-    public static native final Config createBuildConfig64(String absSrcDir,
-							  String absBuildDir);
-
-    /**
-     * Return either the file or directory.
-     */
-    private static File getFile(File dir, String file) {
-	if (file == null)
-	    return dir;
-	if (dir == null)
-	    // Directory isn't valid, no files allowed.
-	    return null;
-	return new File(dir, file);
-    }
-
+public class Config {
     /**
      * Directory containing the .glade files describing frysk's UI
      * windows.
@@ -133,17 +53,15 @@ public class Config
      * XXX: This is a String so that it works better with Java-GNOME.
      */
     public static final String getGladeDir () {
-	return current.theGladeDir;
+	return Prefix.gladeDir();
     }
-    private String theGladeDir;
 
     /**
      * Directory containing the frysk help files.
      */
     public static final File getHelpDir () {
-	return current.theHelpDir;
+	return Prefix.helpDir();
     }
-    private File theHelpDir;
 
     /**
      * Root directory of frysk's images (or icons).
@@ -151,16 +69,15 @@ public class Config
      * XXX: This is a String so that it works better with Java-GNOME.
      */
     public static final String getImagesDir () {
-	return current.theImagesDir;
+	return Prefix.imagesDir();
     }
-    private String theImagesDir;
 
     /**
      * A file in frysk's shared, and 32-bit and 64-bit independant,
      * data directory.  Typically <tt>/usr/share/frysk/FILE</tt>
      */
     public static final File getPkgDataFile (String file) {
-	return getFile(current.thePkgDataDir, file);
+	return Prefix.pkgDataFile(file);
     }
 
     /**
@@ -171,7 +88,7 @@ public class Config
      * executable.
      */
     public static final File getBinFile(String file) {
-	return getFile(current.theBinDir, file);
+	return Prefix.binFile(file);
     }
 
     /**
@@ -182,7 +99,7 @@ public class Config
      * bit-size as frysk.
      */
     public static final File getPkgLibFile (String file) {
-	return getFile(current.thePkgLibDir, file);
+	return Prefix.pkgLibFile(file);
     }
 
     /**
@@ -194,7 +111,7 @@ public class Config
      * executable is required.
      */
     public static final File getPkgLib32File(String file) {
-	return getFile(current.thePkgLib32Dir, file);
+	return Prefix.pkgLib32File(file);
     }
 
     /**
@@ -206,7 +123,7 @@ public class Config
      * executable is required.
      */
     public static final File getPkgLib64File(String file) {
-	return getFile(current.thePkgLib64Dir, file);
+	return Prefix.pkgLib64File(file);
     }
 
     public static File getFryskDir(){
diff --git a/frysk-sys/frysk/config/Prefix.java b/frysk-sys/frysk/config/Prefix.java
new file mode 100644
index 0000000..e87c15d
--- /dev/null
+++ b/frysk-sys/frysk/config/Prefix.java
@@ -0,0 +1,192 @@
+// This file is part of the program FRYSK.
+//
+// Copyright 2005, 2006, 2007, 2008, Red Hat Inc.
+//
+// FRYSK is free software; you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation; version 2 of the License.
+//
+// FRYSK is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+// 
+// You should have received a copy of the GNU General Public License
+// along with FRYSK; if not, write to the Free Software Foundation,
+// Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+// 
+// In addition, as a special exception, Red Hat, Inc. gives You the
+// additional right to link the code of FRYSK with code not covered
+// under the GNU General Public License ("Non-GPL Code") and to
+// distribute linked combinations including the two, subject to the
+// limitations in this paragraph. Non-GPL Code permitted under this
+// exception must only link to the code of FRYSK through those well
+// defined interfaces identified in the file named EXCEPTION found in
+// the source code files (the "Approved Interfaces"). The files of
+// Non-GPL Code may instantiate templates or use macros or inline
+// functions from the Approved Interfaces without causing the
+// resulting work to be covered by the GNU General Public
+// License. Only Red Hat, Inc. may make changes or additions to the
+// list of Approved Interfaces. You must obey the GNU General Public
+// License in all respects for all of the FRYSK code and other code
+// used in conjunction with FRYSK except the Non-GPL Code covered by
+// this exception. If you modify this file, you may extend this
+// exception to your version of the file, but you are not obligated to
+// do so. If you do not wish to provide this exception without
+// modification, you must delete this exception statement from your
+// version and license this file solely under the GPL without
+// exception.
+
+package frysk.config;
+
+import java.io.File;
+
+/**
+ * Standard directory prefixes, as specified by autoconf.
+ *
+ * To complicate things, this can be set to specify either the in-tree
+ * build-time prefix, or the install-tree prefix.
+ */
+
+public class Prefix {
+
+    /**
+     * The currently selected Prefix.
+     */
+    static private Prefix current;
+
+    /**
+     * Select the specified configuration.
+     */
+    public static final void set(Prefix config) {
+	current = config;
+    }
+
+    /**
+     * Return the current config.
+     */
+    static final Prefix get() {
+	return current;
+    }
+
+    /**
+     * Return either the file or directory.
+     */
+    private static File getFile(File dir, String file) {
+	if (dir == null)
+	    // Directory isn't valid, no files allowed.
+	    return null;
+	if (file == null)
+	    return dir;
+	return new File(dir, file);
+    }
+
+    /**
+     * Directory containing the .glade files describing frysk's UI
+     * windows.
+     *
+     * XXX: This is a String, and not a File, so that it works better
+     * with Java-GNOME 2.x.
+     */
+    public static final String gladeDir () {
+	return current.gladeDir;
+    }
+    private final String gladeDir;
+
+    /**
+     * Directory containing the frysk help files.
+     */
+    public static final File helpDir() {
+	return current.helpDir;
+    }
+    private final File helpDir;
+
+    /**
+     * Root directory of frysk's images (or icons).
+     *
+     * XXX: This is a String, and not a File, so that it works better
+     * with Java-GNOME 2.x.
+     */
+    public static final String imagesDir() {
+	return current.imagesDir;
+    }
+    private final String imagesDir;
+
+    /**
+     * A file in Frysk's user-visible executable directory.  Typically
+     * <tt>/usr/bin/FILE</tt>.
+     *
+     * Used by install-tree testing when needing to invoke a
+     * user-visible executable.
+     */
+    public static final File binFile(String file) {
+	return getFile(current.binDir, file);
+    }
+    private final File binDir;
+
+    /**


hooks/post-receive
--
frysk system monitor/debugger


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-04-15 23:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-04-15 23:13 [SCM] master: frysk-sys/frysk/config/ChangeLog cagney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).