[kaffe] CVS kaffe (robilad): Fixed kaffeh to use kaffe's rt.jar by default if no bootclasspath is set

Kaffe CVS cvs-commits at kaffe.org
Wed Sep 21 15:44:05 PDT 2005


PatchSet 6928 
Date: 2005/09/21 22:37:53
Author: robilad
Branch: HEAD
Tag: (none) 
Log:
Fixed kaffeh to use kaffe's rt.jar by default if no bootclasspath is set

2005-09-22  Dalibor Topic  <robilad at kaffe.org>

        * kaffe/kaffeh/Makefile.am:
        (BINRELOC_SOURCES) Added.
        (kaffeh_SOURCES) Added BINRELOC_SOURCES.

        * kaffe/kaffeh/main.c: Include system.h for path_separator.
        Include prefix.h is binreloc is available. Include headers for
        gettext.
        (options) Handle -classpath and -bootclasspath options.
        Use a default bootclasspath if no bootclasspath is given.

        Fixes build of libreadline-java 0.8.0.

        Reported by:  Joshua Nichols  <joshua.nichols at gmail.com>

Members: 
	ChangeLog:1.4450->1.4451 
	kaffe/kaffeh/Makefile.am:INITIAL->1.19 
	kaffe/kaffeh/Makefile.in:1.152->1.153 
	kaffe/kaffeh/main.c:1.17->1.18 
	libraries/javalib/Makefile.am:1.395->1.396 
	libraries/javalib/Makefile.in:1.487->1.488 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.4450 kaffe/ChangeLog:1.4451
--- kaffe/ChangeLog:1.4450	Wed Sep 21 16:48:57 2005
+++ kaffe/ChangeLog	Wed Sep 21 22:37:53 2005
@@ -1,3 +1,19 @@
+2005-09-22  Dalibor Topic  <robilad at kaffe.org>
+
+	* kaffe/kaffeh/Makefile.am:
+	(BINRELOC_SOURCES) Added.
+	(kaffeh_SOURCES) Added BINRELOC_SOURCES.
+
+	* kaffe/kaffeh/main.c: Include system.h for path_separator.
+	Include prefix.h is binreloc is available. Include headers for
+	gettext.
+	(options) Handle -classpath and -bootclasspath options.
+	Use a default bootclasspath if no bootclasspath is given.
+
+	Fixes build of libreadline-java 0.8.0.
+
+	Reported by:  Joshua Nichols  <joshua.nichols at gmail.com>
+
 2005-09-21  Santiago Gala <sgala at apache.org>
 
 	* libraries/javalib/java/security/VMAccessController.java:
===================================================================
Checking out kaffe/kaffe/kaffeh/Makefile.am
RCS:  /home/cvs/kaffe/kaffe/kaffe/kaffeh/Makefile.am,v
VERS: 1.19
***************
--- /dev/null	Sun Aug  4 19:57:58 2002
+++ kaffe/kaffe/kaffeh/Makefile.am	Wed Sep 21 22:44:04 2005
@@ -0,0 +1,60 @@
+# Makefile.in for kaffeh - kaffe native code stub generator.
+#
+# Copyright (c) 1996, 1997, 1998, 1999
+#	Transvirtual Technologies, Inc.  All rights reserved.
+#
+# See the file "license.terms" for information on usage and redistribution 
+# of this file. 
+
+AM_CPPFLAGS = \
+	-I../kaffevm \
+	-I$(srcdir)/../kaffevm \
+	-DKAFFEH \
+	-I$(top_builddir)/include \
+	-I$(top_builddir)/config \
+	-I$(top_srcdir)/kaffe/kaffevm/jni
+
+bin_PROGRAMS = kaffeh
+
+GEN_SRCS = \
+	constants.c \
+	debug.c \
+	file.c \
+	inflate.c \
+	jar.c \
+	readClass.c \
+	utf8const.c
+
+DISTCLEANFILES = $(GEN_SRCS)
+
+kaffeh_CFLAGS = \
+	$(CFLAGS_PG)
+
+if ENABLE_BINRELOC
+BINRELOC_SOURCES=\
+	../../binreloc/prefix.c \
+	../../binreloc/prefix.h
+endif
+
+kaffeh_SOURCES = \
+	main.c \
+	mem.c \
+	sigs.c \
+	support.c \
+	$(BINRELOC_SOURCES)
+
+nodist_kaffeh_SOURCES = $(GEN_SRCS)
+
+noinst_HEADERS = \
+	kaffeh-support.h \
+	java_lang_ClassLoader.h \
+	java_lang_Object.h \
+	java_lang_String.h
+
+$(GEN_SRCS):
+	$(SHELL) $(REGEN_FORWARD) $(srcdir)/../kaffevm/$@ $@
+
+##dist-hook:
+##	@for file in $(DISTCLEANFILES); do \
+##	  rm -f $(distdir)/$$file; \
+##	done
Index: kaffe/kaffe/kaffeh/Makefile.in
diff -u kaffe/kaffe/kaffeh/Makefile.in:1.152 kaffe/kaffe/kaffeh/Makefile.in:1.153
--- kaffe/kaffe/kaffeh/Makefile.in:1.152	Sat Sep 17 21:37:41 2005
+++ kaffe/kaffe/kaffeh/Makefile.in	Wed Sep 21 22:37:58 2005
@@ -78,13 +78,17 @@
 am__installdirs = "$(DESTDIR)$(bindir)"
 binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
 PROGRAMS = $(bin_PROGRAMS)
+am__kaffeh_SOURCES_DIST = main.c mem.c sigs.c support.c \
+	../../binreloc/prefix.c ../../binreloc/prefix.h
+ at ENABLE_BINRELOC_TRUE@am__objects_1 = kaffeh-prefix.$(OBJEXT)
 am_kaffeh_OBJECTS = kaffeh-main.$(OBJEXT) kaffeh-mem.$(OBJEXT) \
-	kaffeh-sigs.$(OBJEXT) kaffeh-support.$(OBJEXT)
-am__objects_1 = kaffeh-constants.$(OBJEXT) kaffeh-debug.$(OBJEXT) \
+	kaffeh-sigs.$(OBJEXT) kaffeh-support.$(OBJEXT) \
+	$(am__objects_1)
+am__objects_2 = kaffeh-constants.$(OBJEXT) kaffeh-debug.$(OBJEXT) \
 	kaffeh-file.$(OBJEXT) kaffeh-inflate.$(OBJEXT) \
 	kaffeh-jar.$(OBJEXT) kaffeh-readClass.$(OBJEXT) \
 	kaffeh-utf8const.$(OBJEXT)
-nodist_kaffeh_OBJECTS = $(am__objects_1)
+nodist_kaffeh_OBJECTS = $(am__objects_2)
 kaffeh_OBJECTS = $(am_kaffeh_OBJECTS) $(nodist_kaffeh_OBJECTS)
 kaffeh_LDADD = $(LDADD)
 DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/config
@@ -98,7 +102,7 @@
 LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
 	$(AM_LDFLAGS) $(LDFLAGS) -o $@
 SOURCES = $(kaffeh_SOURCES) $(nodist_kaffeh_SOURCES)
-DIST_SOURCES = $(kaffeh_SOURCES)
+DIST_SOURCES = $(am__kaffeh_SOURCES_DIST)
 HEADERS = $(noinst_HEADERS)
 ETAGS = etags
 CTAGS = ctags
@@ -404,11 +408,16 @@
 kaffeh_CFLAGS = \
 	$(CFLAGS_PG)
 
+ at ENABLE_BINRELOC_TRUE@BINRELOC_SOURCES = \
+ at ENABLE_BINRELOC_TRUE@	../../binreloc/prefix.c \
+ at ENABLE_BINRELOC_TRUE@	../../binreloc/prefix.h
+
 kaffeh_SOURCES = \
 	main.c \
 	mem.c \
 	sigs.c \
-	support.c
+	support.c \
+	$(BINRELOC_SOURCES)
 
 nodist_kaffeh_SOURCES = $(GEN_SRCS)
 noinst_HEADERS = \
@@ -495,6 +504,7 @@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/kaffeh-jar.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/kaffeh-main.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/kaffeh-mem.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/kaffeh-prefix.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/kaffeh-readClass.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/kaffeh-sigs.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/kaffeh-support.Po at am__quote@
@@ -576,6 +586,20 @@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='support.c' object='kaffeh-support.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(kaffeh_CFLAGS) $(CFLAGS) -c -o kaffeh-support.obj `if test -f 'support.c'; then $(CYGPATH_W) 'support.c'; else $(CYGPATH_W) '$(srcdir)/support.c'; fi`
+
+kaffeh-prefix.o: ../../binreloc/prefix.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(kaffeh_CFLAGS) $(CFLAGS) -MT kaffeh-prefix.o -MD -MP -MF "$(DEPDIR)/kaffeh-prefix.Tpo" -c -o kaffeh-prefix.o `test -f '../../binreloc/prefix.c' || echo '$(srcdir)/'`../../binreloc/prefix.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/kaffeh-prefix.Tpo" "$(DEPDIR)/kaffeh-prefix.Po"; else rm -f "$(DEPDIR)/kaffeh-prefix.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='../../binreloc/prefix.c' object='kaffeh-prefix.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(kaffeh_CFLAGS) $(CFLAGS) -c -o kaffeh-prefix.o `test -f '../../binreloc/prefix.c' || echo '$(srcdir)/'`../../binreloc/prefix.c
+
+kaffeh-prefix.obj: ../../binreloc/prefix.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(kaffeh_CFLAGS) $(CFLAGS) -MT kaffeh-prefix.obj -MD -MP -MF "$(DEPDIR)/kaffeh-prefix.Tpo" -c -o kaffeh-prefix.obj `if test -f '../../binreloc/prefix.c'; then $(CYGPATH_W) '../../binreloc/prefix.c'; else $(CYGPATH_W) '$(srcdir)/../../binreloc/prefix.c'; fi`; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/kaffeh-prefix.Tpo" "$(DEPDIR)/kaffeh-prefix.Po"; else rm -f "$(DEPDIR)/kaffeh-prefix.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='../../binreloc/prefix.c' object='kaffeh-prefix.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(kaffeh_CFLAGS) $(CFLAGS) -c -o kaffeh-prefix.obj `if test -f '../../binreloc/prefix.c'; then $(CYGPATH_W) '../../binreloc/prefix.c'; else $(CYGPATH_W) '$(srcdir)/../../binreloc/prefix.c'; fi`
 
 kaffeh-constants.o: constants.c
 @am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(kaffeh_CFLAGS) $(CFLAGS) -MT kaffeh-constants.o -MD -MP -MF "$(DEPDIR)/kaffeh-constants.Tpo" -c -o kaffeh-constants.o `test -f 'constants.c' || echo '$(srcdir)/'`constants.c; \
Index: kaffe/kaffe/kaffeh/main.c
diff -u kaffe/kaffe/kaffeh/main.c:1.17 kaffe/kaffe/kaffeh/main.c:1.18
--- kaffe/kaffe/kaffeh/main.c:1.17	Sun Jul 17 08:11:20 2005
+++ kaffe/kaffe/kaffeh/main.c	Wed Sep 21 22:37:58 2005
@@ -18,6 +18,21 @@
 #include "kaffeh-support.h"
 #include "utf8const.h"
 #include "debug.h"
+#include "system.h"
+
+#if defined(HAVE_GETTEXT)
+#include <libintl.h>
+#define _(T) gettext(T)
+#else
+#define _(T) (T)
+#endif
+#if defined(HAVE_LC_MESSAGES)
+#include <locale.h>
+#endif
+
+#ifdef ENABLE_BINRELOC
+#include "prefix.h"
+#endif
 
 #define	BUFSZ	1024
 #define	PATHSZ	1024
@@ -214,6 +229,26 @@
 {
 	int i;
 
+
+	char * bootclasspath = NULL;
+	char * classpath = NULL;
+
+	bootclasspath = malloc(1);
+	if (bootclasspath == NULL) 
+	  {
+	    fprintf(stderr,  _("Error: out of memory.\n"));
+	    exit(EXIT_FAILURE);
+	  }
+	*bootclasspath = '\0';
+
+	classpath = malloc(1);
+	if (classpath == NULL) 
+	  {
+	    fprintf(stderr,  _("Error: out of memory.\n"));
+	    exit(EXIT_FAILURE);
+	  }
+	*classpath = '\0';
+
 	for (i = 1; i < argc; i++) {
 		if (argv[i][0] != '-') {
 			break;
@@ -243,12 +278,54 @@
 		}
 #endif /*KAFFE_VMDEBUG*/
 		else if (strcmp(argv[i], "-classpath") == 0) {
-			i++;
-			strcpy(realClassPath, argv[i]);
+		  char * newcp;
+		  size_t cplen;
+
+		  i++;
+
+		  cplen = strlen(classpath)
+		    + strlen(argv[i])
+		    + strlen(path_separator)
+		    + 1;
+
+		  newcp = malloc(cplen);
+		  if (newcp == NULL)
+		    {
+		      fprintf(stderr,  _("Error: out of memory.\n"));
+		      exit(EXIT_FAILURE);
+		    }
+		  
+		  strcpy(newcp, classpath);
+		  strcat(newcp, path_separator);
+		  strcat(newcp, argv[i]);
+
+		  free(classpath);
+		  classpath = newcp;
 		}
 		else if (strcmp(argv[i], "-bootclasspath") == 0) {
-			i++;
-			strcpy(realClassPath, argv[i]);
+		  char * newcp;
+		  size_t cplen;
+
+		  i++;
+
+		  cplen = strlen(bootclasspath)
+		    + strlen(argv[i])
+		    + strlen(path_separator)
+		    + 1;
+
+		  newcp = malloc(cplen);
+		  if (newcp == NULL)
+		    {
+		      fprintf(stderr,  _("Error: out of memory.\n"));
+		      exit(EXIT_FAILURE);
+		    }
+		  
+		  strcpy(newcp, bootclasspath);
+		  strcat(newcp, path_separator);
+		  strcat(newcp, argv[i]);
+
+		  free(bootclasspath);
+		  bootclasspath = newcp;
 		}
 		else if (strcmp(argv[i], "-o") == 0) {
 			i++;
@@ -262,6 +339,28 @@
 			dprintf("Unknown flag: %s\n", argv[i]);
 		}
 	}
+
+
+	if (strlen(bootclasspath) > 0) 
+	  {
+	    strcpy(realClassPath, bootclasspath);
+	  } 
+	else 
+	  {
+
+#if defined(ENABLE_BINRELOC)
+	    strcpy(realClassPath, BR_PREFIX("/jre/lib/rt.jar"));
+#endif
+	  }
+
+	free(bootclasspath);
+
+	if (strlen(classpath) > 0)
+	  {
+	    strcat(realClassPath, classpath);
+	  }
+
+	free(classpath);
 
 	/* Return first no-flag argument */
 	return (i);
Index: kaffe/libraries/javalib/Makefile.am
diff -u kaffe/libraries/javalib/Makefile.am:1.395 kaffe/libraries/javalib/Makefile.am:1.396
--- kaffe/libraries/javalib/Makefile.am:1.395	Wed Sep 21 01:42:09 2005
+++ kaffe/libraries/javalib/Makefile.am	Wed Sep 21 22:37:58 2005
@@ -4098,6 +4098,8 @@
 	javax/swing/plaf/metal/MetalButtonUI.java \
 	javax/swing/plaf/metal/MetalCheckBoxIcon.java \
 	javax/swing/plaf/metal/MetalCheckBoxUI.java \
+	javax/swing/plaf/metal/MetalComboBoxButton.java \
+	javax/swing/plaf/metal/MetalComboBoxEditor.java \
 	javax/swing/plaf/metal/MetalComboBoxIcon.java \
 	javax/swing/plaf/metal/MetalComboBoxUI.java \
 	javax/swing/plaf/metal/MetalDesktopIconUI.java \
Index: kaffe/libraries/javalib/Makefile.in
diff -u kaffe/libraries/javalib/Makefile.in:1.487 kaffe/libraries/javalib/Makefile.in:1.488
--- kaffe/libraries/javalib/Makefile.in:1.487	Wed Sep 21 01:42:12 2005
+++ kaffe/libraries/javalib/Makefile.in	Wed Sep 21 22:37:59 2005
@@ -4689,6 +4689,8 @@
 	javax/swing/plaf/metal/MetalButtonUI.java \
 	javax/swing/plaf/metal/MetalCheckBoxIcon.java \
 	javax/swing/plaf/metal/MetalCheckBoxUI.java \
+	javax/swing/plaf/metal/MetalComboBoxButton.java \
+	javax/swing/plaf/metal/MetalComboBoxEditor.java \
 	javax/swing/plaf/metal/MetalComboBoxIcon.java \
 	javax/swing/plaf/metal/MetalComboBoxUI.java \
 	javax/swing/plaf/metal/MetalDesktopIconUI.java \




More information about the kaffe mailing list