diff options
author | Anthony Green <green@redhat.com> | 2005-03-25 00:38:43 +0000 |
---|---|---|
committer | Anthony Green <green@gcc.gnu.org> | 2005-03-25 00:38:43 +0000 |
commit | 206318ea4505f9e7794b1fdded907be0d508a908 (patch) | |
tree | d5fad0adecf376ff1dbdfe3f240a480ab44643b5 /libjava/gnu/gcj | |
parent | 761d80b91f9b4b57b29a7f1df3ff34340b5a0ae2 (diff) | |
download | gcc-206318ea4505f9e7794b1fdded907be0d508a908.zip gcc-206318ea4505f9e7794b1fdded907be0d508a908.tar.gz gcc-206318ea4505f9e7794b1fdded907be0d508a908.tar.bz2 |
From libjava...
2005-03-24 Anthony Green <green@redhat.com>
* gnu/gcj/tools/gcj_dbtool/Main.java: Accept libdir argument with
-p option.
(usage): Add [LIBDIR] to help output.
* gnu/gcj/tools/gcj_dbtool/natMain.cc: New file.
* Makefile.am (AM_CXXFLAGS): Define
LIBGCJ_DEFAULT_DATABASE_PATH_TAIL.
(db_pathtail): New macro.
From gcc/java...
2005-03-24 Anthony Green <green@redhat.com>
* gcj.texi (Invoking gcj-dbtool): Document new LIBDIR option to
'gcj-dbtool -p'.
From-SVN: r97028
Diffstat (limited to 'libjava/gnu/gcj')
-rw-r--r-- | libjava/gnu/gcj/tools/gcj_dbtool/Main.java | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/libjava/gnu/gcj/tools/gcj_dbtool/Main.java b/libjava/gnu/gcj/tools/gcj_dbtool/Main.java index b4b0329..cfd22bd 100644 --- a/libjava/gnu/gcj/tools/gcj_dbtool/Main.java +++ b/libjava/gnu/gcj/tools/gcj_dbtool/Main.java @@ -259,9 +259,16 @@ public class Main if (s[0].equals("-p")) { - insist (s.length == 1); - String result = System.getProperty("gnu.gcj.precompiled.db.path", - ""); + insist (s.length == 1 || s.length == 2); + String result; + + if (s.length == 1) + result = System.getProperty("gnu.gcj.precompiled.db.path", ""); + else + result = (s[1] + + (s[1].endsWith(File.separator) ? "" : File.separator) + + getDbPathTail ()); + System.out.println (result); return; } @@ -270,6 +277,8 @@ public class Main System.exit(1); } + private static native String getDbPathTail (); + private static void insist(boolean ok) { if (! ok) @@ -296,7 +305,7 @@ public class Main + " - Merge gcj map databases into dest\n" + " Replaces dest\n" + " To add to dest, include dest in the list of sources\n" - + " gcj-dbtool -p - Print default database name"); + + " gcj-dbtool -p [LIBDIR] - Print default database name"); } // Add a jar to a map. This copies the map first and returns a |