From 558b8548b432b0c0ba14009070940b73409fc721 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Fri, 11 Mar 2005 17:35:37 +0000 Subject: Main.java (main): Handle '-p'. libjava: * gnu/gcj/tools/gcj_dbtool/Main.java (main): Handle '-p'. (usage): Document '-p'. * Makefile.in: Rebuilt. * Makefile.am (dbexecdir): New variable. (db_name): Likewise. (dbexec_DATA): Likewise. ($(db_name)): New target. (AM_CXXFLAGS): Define LIBGCJ_DEFAULT_DATABASE. * java/lang/natRuntime.cc (insertSystemProperties): Set default system database. gcc/java: * gcj.texi (Invoking gcj-dbtool): Document 'gcj-dbtool -p'. (libgcj Runtime Properties): Document the default .db. From-SVN: r96303 --- libjava/Makefile.am | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'libjava/Makefile.am') diff --git a/libjava/Makefile.am b/libjava/Makefile.am index 920b05b..2b1314e 100644 --- a/libjava/Makefile.am +++ b/libjava/Makefile.am @@ -123,9 +123,18 @@ secdir = $(libdir)/security ## Where to install default logging property file. propdir = $(libdir) +## Where the standard .db file is found. +dbexecdir = $(libdir)/gcj-@gcc_version@ +## Name of the default .db. +db_name = classmap.db + ## For now, only on native systems. FIXME. if NATIVE bin_PROGRAMS = jv-convert gij grmic grmiregistry gcj-dbtool + +## It is convenient to actually build and install the default database +## when gcj-dbtool is available. +dbexec_DATA = $(db_name) endif bin_SCRIPTS = addr2name.awk @@ -171,7 +180,8 @@ AM_CXXFLAGS = \ -DPREFIX="\"$(prefix)\"" \ -DLIBDIR="\"$(libdir)\"" \ -DBOOT_CLASS_PATH="\"$(jardir)/$(jar_DATA)\"" \ - -DJAVA_EXT_DIRS="\"$(jardir)/ext\"" + -DJAVA_EXT_DIRS="\"$(jardir)/ext\"" \ + -DLIBGCJ_DEFAULT_DATABASE="\"$(dbexecdir)/$(db_name)\"" AM_GCJFLAGS = \ @LIBGCJ_JAVAFLAGS@ \ @@ -250,6 +260,17 @@ libgcj_la_DEPENDENCIES = libgcj-@gcc_version@.jar \ $(libgcj_la_LIBADD) libgcj_la_LINK = $(LIBLINK) + +## The .db file. This rule is only used for native builds, so it is +## safe to invoke gcj-dbtool. +$(db_name): gcj-dbtool +## In case it exists already. + @rm -f $(db_name) +## We don't actually care if it fails -- if it does, just make an +## empty file. This is simpler than trying to discover when mmap is +## not available. + ./gcj-dbtool -n $(db_name) || touch $(db_name) + # Gtk/Cairo JNI sources. if GTK_CAIRO gtk_cairo_c_source_files = \ -- cgit v1.1