[cp-patches] Patch: FYI: add more tools

Tom Tromey tromey at redhat.com
Tue Jun 27 18:54:04 UTC 2006


I'm checking this in.

This adds tool programs for jar, serialver, and native2ascii.
It also fixes a small sh buglet in all the tool wrapper scripts.

Quick question on the tool wrappers.  They all use -Xbootclasspath/p
to add tools.zip to the boot class path.  I don't understand this.
Wouldn't it be better to simply use the system class path here?

Tom

Index: ChangeLog
from  Tom Tromey  <tromey at redhat.com>

	* configure.ac: Create gjar, gnative2ascii, gserialver.
	* tools/gappletviewer.in: Quote $@.
	* tools/gkeytool.in: Likewise.
	* tools/gjarsigner.in: Likewise.
	* tools/gjar.in: New file.
	* tools/gnative2ascii.in: Likewise.
	* tools/gserialver.in: Likewise.
	* tools/Makefile.am (bin_PROGRAMS): Added gjar, gnative2ascii,
	gserialver.
	(bin_SCRIPTS): Likewise.

Index: configure.ac
===================================================================
RCS file: /cvsroot/classpath/classpath/configure.ac,v
retrieving revision 1.164
diff -u -r1.164 configure.ac
--- configure.ac 25 Jun 2006 22:45:29 -0000 1.164
+++ configure.ac 27 Jun 2006 18:56:17 -0000
@@ -769,10 +769,16 @@
 then
 AC_CONFIG_FILES([tools/gappletviewer
 tools/gjarsigner
-tools/gkeytool])
+tools/gkeytool
+tools/gjar
+tools/gnative2ascii
+tools/gserialver])
 AC_CONFIG_COMMANDS([gappletviewer],[chmod 755 tools/gappletviewer])
 AC_CONFIG_COMMANDS([gjarsigner],[chmod 755 tools/gjarsigner])
 AC_CONFIG_COMMANDS([gkeytool],[chmod 755 tools/gkeytool])
+AC_CONFIG_COMMANDS([gjar],[chmod 755 tools/gjar])
+AC_CONFIG_COMMANDS([gnative2ascii],[chmod 755 tools/gnative2ascii])
+AC_CONFIG_COMMANDS([gserialver],[chmod 755 tools/gserialver])
 fi
 
 AC_CONFIG_COMMANDS([gen-classlist],[chmod 755 lib/gen-classlist.sh])
Index: tools/Makefile.am
===================================================================
RCS file: /cvsroot/classpath/classpath/tools/Makefile.am,v
retrieving revision 1.19
diff -u -r1.19 Makefile.am
--- tools/Makefile.am 15 Jun 2006 23:08:48 -0000 1.19
+++ tools/Makefile.am 27 Jun 2006 18:56:30 -0000
@@ -23,7 +23,8 @@
 
 if CREATE_WRAPPERS
 bin_SCRIPTS =
-bin_PROGRAMS = gappletviewer gjarsigner gkeytool
+bin_PROGRAMS = gappletviewer gjarsigner gkeytool \
+	gjar gnative2ascii gserialver
 
 if FOUND_GCJ
 LIBJVM = -lgcj
@@ -57,11 +58,31 @@
 	-DTOOLNAME="\"gkeytool\""
 gkeytool_LDFLAGS = -L$(libdir) $(LIBJVM)
 
+gjar_SOURCES = toolwrapper.c
+gjar_CFLAGS = \
+	-DTOOLPACKAGE="\"jar\"" \
+	-DTOOLNAME="\"gjar\""
+gjar_LDFLAGS = -L$(libdir) $(LIBJVM)
+
+gnative2ascii_SOURCES = toolwrapper.c
+gnative2ascii_CFLAGS = \
+	-DTOOLPACKAGE="\"native2ascii\"" \
+	-DTOOLNAME="\"gnative2ascii\""
+gnative2ascii_LDFLAGS = -L$(libdir) $(LIBJVM)
+
+gserialver_SOURCES = toolwrapper.c
+gserialver_CFLAGS = \
+	-DTOOLPACKAGE="\"serialver\"" \
+	-DTOOLNAME="\"gserialver\""
+gserialver_LDFLAGS = -L$(libdir) $(LIBJVM)
+
 else
-bin_SCRIPTS = gappletviewer gjarsigner gkeytool
+bin_SCRIPTS = gappletviewer gjarsigner gkeytool \
+	gjar gnative2ascii gserialver
 bin_PROGRAMS =
 endif
-EXTRA_DIST = toolwrapper.c gappletviewer.in gjarsigner.in gkeytool.in
+EXTRA_DIST = toolwrapper.c gappletviewer.in gjarsigner.in gkeytool.in \
+	gjar.in gnative2ascii.in gserialver.in
 
 # All our example java source files
 TOOLS_JAVA_FILES = $(srcdir)/gnu/classpath/tools/*.java $(srcdir)/gnu/classpath/tools/*/*.java $(srcdir)/gnu/classpath/tools/*/*/*.java
Index: tools/gappletviewer.in
===================================================================
RCS file: /cvsroot/classpath/classpath/tools/gappletviewer.in,v
retrieving revision 1.1
diff -u -r1.1 gappletviewer.in
--- tools/gappletviewer.in 15 Jun 2006 23:08:49 -0000 1.1
+++ tools/gappletviewer.in 27 Jun 2006 18:56:30 -0000
@@ -43,4 +43,4 @@
 tools_dir=@datadir@/@PACKAGE@
 tools_cp=${tools_dir}/tools.zip
 
-exec @VM_BINARY@ -Xbootclasspath/p:"${tools_cp}" gnu.classpath.tools.appletviewer.Main $@
+exec @VM_BINARY@ -Xbootclasspath/p:"${tools_cp}" gnu.classpath.tools.appletviewer.Main "$@"
Index: tools/gjar.in
===================================================================
RCS file: tools/gjar.in
diff -N tools/gjar.in
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ tools/gjar.in 27 Jun 2006 18:56:30 -0000
@@ -0,0 +1,47 @@
+#!/bin/sh
+
+## Copyright (C) 2006 Free Software Foundation, Inc.
+##
+## This file is a part of GNU Classpath.
+##
+## GNU Classpath 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; either version 2 of the License, or (at
+## your option) any later version.
+##
+## GNU Classpath 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 GNU Classpath; if not, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
+## USA.
+##
+## Linking this library statically or dynamically with other modules is
+## making a combined work based on this library.  Thus, the terms and
+## conditions of the GNU General Public License cover the whole
+## combination.
+##
+## As a special exception, the copyright holders of this library give you
+## permission to link this library with independent modules to produce an
+## executable, regardless of the license terms of these independent
+## modules, and to copy and distribute the resulting executable under
+## terms of your choice, provided that you also meet, for each linked
+## independent module, the terms and conditions of the license of that
+## module.  An independent module is a module which is not derived from
+## or based on this library.  If you modify this library, you may extend
+## this exception to your version of the library, but you are not
+## obligated to do so.  If you do not wish to do so, delete this
+## exception statement from your version.
+##
+##
+## A simple shell script to launch the GNU Classpath jar tool.
+##
+
+prefix=@prefix@
+tools_dir=@datadir@/@PACKAGE@
+tools_cp=${tools_dir}/tools.zip
+
+exec @VM_BINARY@ -Xbootclasspath/p:"${tools_cp}" gnu.classpath.tools.jar.Main "$@"
Index: tools/gjarsigner.in
===================================================================
RCS file: /cvsroot/classpath/classpath/tools/gjarsigner.in,v
retrieving revision 1.1
diff -u -r1.1 gjarsigner.in
--- tools/gjarsigner.in 15 Jun 2006 23:08:49 -0000 1.1
+++ tools/gjarsigner.in 27 Jun 2006 18:56:30 -0000
@@ -44,4 +44,4 @@
 tools_dir=@datadir@/@PACKAGE@
 tools_cp=${tools_dir}/tools.zip
 
-exec @VM_BINARY@ -Xbootclasspath/p:"${tools_cp}" gnu.classpath.tools.jarsigner.Main $@
+exec @VM_BINARY@ -Xbootclasspath/p:"${tools_cp}" gnu.classpath.tools.jarsigner.Main "$@"
Index: tools/gkeytool.in
===================================================================
RCS file: /cvsroot/classpath/classpath/tools/gkeytool.in,v
retrieving revision 1.1
diff -u -r1.1 gkeytool.in
--- tools/gkeytool.in 15 Jun 2006 23:08:49 -0000 1.1
+++ tools/gkeytool.in 27 Jun 2006 18:56:30 -0000
@@ -44,4 +44,4 @@
 tools_dir=@datadir@/@PACKAGE@
 tools_cp=${tools_dir}/tools.zip
 
-exec @VM_BINARY@ -Xbootclasspath/p:"${tools_cp}" gnu.classpath.tools.keytool.Main $@
+exec @VM_BINARY@ -Xbootclasspath/p:"${tools_cp}" gnu.classpath.tools.keytool.Main "$@"
Index: tools/gnative2ascii.in
===================================================================
RCS file: tools/gnative2ascii.in
diff -N tools/gnative2ascii.in
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ tools/gnative2ascii.in 27 Jun 2006 18:56:30 -0000
@@ -0,0 +1,47 @@
+#!/bin/sh
+
+## Copyright (C) 2006 Free Software Foundation, Inc.
+##
+## This file is a part of GNU Classpath.
+##
+## GNU Classpath 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; either version 2 of the License, or (at
+## your option) any later version.
+##
+## GNU Classpath 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 GNU Classpath; if not, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
+## USA.
+##
+## Linking this library statically or dynamically with other modules is
+## making a combined work based on this library.  Thus, the terms and
+## conditions of the GNU General Public License cover the whole
+## combination.
+##
+## As a special exception, the copyright holders of this library give you
+## permission to link this library with independent modules to produce an
+## executable, regardless of the license terms of these independent
+## modules, and to copy and distribute the resulting executable under
+## terms of your choice, provided that you also meet, for each linked
+## independent module, the terms and conditions of the license of that
+## module.  An independent module is a module which is not derived from
+## or based on this library.  If you modify this library, you may extend
+## this exception to your version of the library, but you are not
+## obligated to do so.  If you do not wish to do so, delete this
+## exception statement from your version.
+##
+##
+## A simple shell script to launch the GNU Classpath native2ascii tool.
+##
+
+prefix=@prefix@
+tools_dir=@datadir@/@PACKAGE@
+tools_cp=${tools_dir}/tools.zip
+
+exec @VM_BINARY@ -Xbootclasspath/p:"${tools_cp}" gnu.classpath.tools.native2ascii.Main "$@"
Index: tools/gserialver.in
===================================================================
RCS file: tools/gserialver.in
diff -N tools/gserialver.in
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ tools/gserialver.in 27 Jun 2006 18:56:30 -0000
@@ -0,0 +1,47 @@
+#!/bin/sh
+
+## Copyright (C) 2006 Free Software Foundation, Inc.
+##
+## This file is a part of GNU Classpath.
+##
+## GNU Classpath 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; either version 2 of the License, or (at
+## your option) any later version.
+##
+## GNU Classpath 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 GNU Classpath; if not, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
+## USA.
+##
+## Linking this library statically or dynamically with other modules is
+## making a combined work based on this library.  Thus, the terms and
+## conditions of the GNU General Public License cover the whole
+## combination.
+##
+## As a special exception, the copyright holders of this library give you
+## permission to link this library with independent modules to produce an
+## executable, regardless of the license terms of these independent
+## modules, and to copy and distribute the resulting executable under
+## terms of your choice, provided that you also meet, for each linked
+## independent module, the terms and conditions of the license of that
+## module.  An independent module is a module which is not derived from
+## or based on this library.  If you modify this library, you may extend
+## this exception to your version of the library, but you are not
+## obligated to do so.  If you do not wish to do so, delete this
+## exception statement from your version.
+##
+##
+## A simple shell script to launch the GNU Classpath serialver tool.
+##
+
+prefix=@prefix@
+tools_dir=@datadir@/@PACKAGE@
+tools_cp=${tools_dir}/tools.zip
+
+exec @VM_BINARY@ -Xbootclasspath/p:"${tools_cp}" gnu.classpath.tools.serialver.Main "$@"



More information about the Classpath-patches mailing list