This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Patch: FYI: add '-f' option to gcj-dbtool


I'm checking this in on the trunk and the 4.0 branch.

This adds a '-f' option to gcj-dbtool, to avoid the existence check
for the .so.  This can be simpler to use when building an RPM, where
the .so will not be installed at the time the .db is built.

Tom

Index: gcc/java/ChangeLog
from  Tom Tromey  <tromey@redhat.com>

	* gcj.texi (Invoking gcj-dbtool): Document '-f'.

Index: gcc/java/gcj.texi
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/gcj.texi,v
retrieving revision 1.73
diff -u -r1.73 gcj.texi
--- gcc/java/gcj.texi 23 Feb 2005 17:36:16 -0000 1.73
+++ gcc/java/gcj.texi 7 Mar 2005 19:58:31 -0000
@@ -990,7 +990,8 @@
 @c man begin SYNOPSIS gcj-dbtool
 gcj-dbtool @option{OPTION} @var{DBFILE} [@option{MORE}] @dots{}
 
-gcj-dbtool [@option{-n}] [@option{-a}] [@option{-t}] [@option{-l}]
+gcj-dbtool [@option{-n}] [@option{-a}] [@option{-f}]
+  [@option{-t}] [@option{-l}]
   [@option{-v}] [@option{--version}] [@option{--help}]
 
 @c man end
@@ -1027,11 +1028,14 @@
 32,749.
 
 @item -a @var{DBFILE} @var{JARFILE} @var{LIB}
+@itemx -f @var{DBFILE} @var{JARFILE} @var{LIB}
 This adds a jar file to the database.  For each class file in the jar,
 a cryptographic signature of the bytecode representation of the class
 is recorded in the database.  At runtime, a class is looked up by its
 signature and the compiled form of the class is looked for in the
-corresponding shared library.
+corresponding shared library.  The @option{-a} option will verify
+that @var{LIB} exists before adding it to the database; @option{-f}
+skips this check.
 
 @item -t @var{DBFILE}
 Test a database.
Index: libjava/ChangeLog
from  Tom Tromey  <tromey@redhat.com>
	* gnu/gcj/tools/gcj_dbtool/Main.java (main): Recognize '-f'.
	(usage): Document '-f'.

Index: libjava/gnu/gcj/tools/gcj_dbtool/Main.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/gnu/gcj/tools/gcj_dbtool/Main.java,v
retrieving revision 1.5
diff -u -r1.5 Main.java
--- libjava/gnu/gcj/tools/gcj_dbtool/Main.java 18 Feb 2005 20:52:16 -0000 1.5
+++ libjava/gnu/gcj/tools/gcj_dbtool/Main.java 7 Mar 2005 19:58:39 -0000
@@ -75,7 +75,7 @@
 	return;
       }
 
-    if (s[0].equals("-a"))
+    if (s[0].equals("-a") || s[0].equals("-f"))
       {
 	// Add a jar file to a database, creating it if necessary.
 	// Copies the database, adds the jar file to the copy, and
@@ -94,7 +94,7 @@
 	      map = PersistentByteMap.emptyPersistentByteMap(database, 
 							     100, 100*32);
 	    File soFile = new File(s[3]);
-	    if (! soFile.isFile())
+	    if (! s[0].equals("-f") && ! soFile.isFile())
 	      throw new IllegalArgumentException(s[3] + " is not a file");
  	    map = addJar(jar, map, soFile);
 	  }
@@ -279,6 +279,8 @@
        + "    gcj-dbtool -n file.gcjdb [size]     - Create a new gcj map database\n"
        + "    gcj-dbtool -a file.gcjdb file.jar file.so\n"
        + "            - Add the contents of file.jar to a new gcj map database\n"
+       + "    gcj-dbtool -f file.gcjdb file.jar file.so\n"
+       + "            - Add the contents of file.jar to a new gcj map database\n"
        + "    gcj-dbtool -t file.gcjdb            - Test a gcj map database\n"
        + "    gcj-dbtool -l file.gcjdb            - List a gcj map database\n"
        + "    gcj-dbtool -m dest.gcjdb [source.gcjdb]...\n"


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]