hello all,

this is a proposed patch for generating a jarsigner script to invoke the 
tool with the same name.

it is far from perfect but it is submitted to generate a discussion of 
how best to build such scripts for this and other Classpath tools.

comments are welcome.


cheers;
rsn
Index: Makefile.am
===================================================================
RCS file: /cvsroot/classpath/classpath/tools/Makefile.am,v
retrieving revision 1.7
diff -u -r1.7 Makefile.am
--- Makefile.am	10 Mar 2006 01:49:42 -0000	1.7
+++ Makefile.am	26 Mar 2006 04:58:09 -0000
@@ -19,6 +19,16 @@
 endif
 endif

+bin_SCRIPTS = jarsigner
+CLEANFILES = $(bin_SCRIPTS)
+EXTRA_DIST = jarsigner.sh
+
+jarsigner: $(srcdir)/jarsigner.sh
+	rm -f jarsigner
+	echo "#! " $(BASH) > jarsigner
+	cat $(srcdir)/jarsigner.sh >> jarsigner
+	chmod ugo+x jarsigner
+
 # All our example java source files
 TOOLS_JAVA_FILES = $(srcdir)/gnu/classpath/tools/*.java $(srcdir)/gnu/classpath/tools/*/*.java $(srcdir)/gnu/classpath/tools/*/*/*.java

@@ -38,8 +48,9 @@
 # This covers the built-in help texts, both for giop and rmic subpackages.
 GIOP_HELPS = $(srcdir)/gnu/classpath/tools/giop/*.txt
 RMI_HELPS = $(srcdir)/gnu/classpath/tools/rmi/*.txt
+SECURITY_HELPS = $(srcdir)/gnu/classpath/tools/jarsigner/*.txt

-TOOLS_HELPS = $(GIOP_HELPS) $(RMI_HELPS)
+TOOLS_HELPS = $(GIOP_HELPS) $(RMI_HELPS) $(SECURITY_HELPS)

 # The tool specific README files.
 READMES = $(srcdir)/gnu/classpath/tools/giop/README
@@ -74,10 +85,12 @@
 $(TOOLS_ZIP): $(TOOLS_JAVA_FILES)
 	mkdir -p classes/gnu/classpath/tools/giop/grmic/templates
 	mkdir -p classes/gnu/classpath/tools/rmi/rmic/templates
+	mkdir -p classes/gnu/classpath/tools/jarsigner
 	cp $(RMIC_TEMPLATES) classes/gnu/classpath/tools/rmi/rmic/templates
 	cp $(GRMIC_TEMPLATES) classes/gnu/classpath/tools/giop/grmic/templates
 	cp $(RMI_HELPS) classes/gnu/classpath/tools/rmi/
 	cp $(GIOP_HELPS) classes/gnu/classpath/tools/giop/
+	cp $(SECURITY_HELPS) classes/gnu/classpath/tools/jarsigner/
 	$(JCOMPILER) -d classes $(TOOLS_JAVA_FILES)
 	(cd classes; \
 	if test "$(ZIP)" != ""; then $(ZIP) -r ../$(TOOLS_ZIP) .; fi; \
Index: jarsigner.sh
===================================================================
RCS file: jarsigner.sh
diff -N jarsigner.sh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ jarsigner.sh	1 Jan 1970 00:00:00 -0000
@@ -0,0 +1,3 @@
+# -* bash *-
+
+java gnu.classpath.tools.jarsigner.Main $@
Index: configure.ac
===================================================================
RCS file: /cvsroot/classpath/classpath/configure.ac,v
retrieving revision 1.139
diff -u -r1.139 configure.ac
--- configure.ac	10 Mar 2006 01:36:10 -0000	1.139
+++ configure.ac	26 Mar 2006 04:59:44 -0000
@@ -248,6 +248,8 @@
 AC_PROG_CC
 AC_PROG_CPP

+AC_PATH_PROGS(BASH, bash sh)
+
 if test "x${COMPILE_COLLECTIONS}" = xyes; then
   AC_PATH_PROG(PERL, [perl])
   AC_SUBST(PERL)

Attachment: pgpnCOOTgVS7u.pgp
Description: PGP signature

Reply via email to