This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
[classpath-0.98 merge branch] build gjdoc binary
- From: Matthias Klose <doko at ubuntu dot com>
- To: GCJ-patches <java-patches at gcc dot gnu dot org>
- Date: Wed, 24 Sep 2008 13:21:23 +0200
- Subject: [classpath-0.98 merge branch] build gjdoc binary
adding support to build the gjdoc binary. I didn't copy the classpath version
checks, seems to be redundant.
Matthias
2008-09-24 Matthias Klose <doko@ubuntu.com>
* Makefile.am: Build a gjdoc binary, if enabled.
* configure.ac: Add options --disable-gjdoc, --with-antlr-jar=file.
* Makefile.in, */Makefile.in, configure: Regenerate.
Index: Makefile.am
===================================================================
--- Makefile.am (revision 140626)
+++ Makefile.am (working copy)
@@ -82,6 +82,9 @@
bin_PROGRAMS = jv-convert gij grmic grmiregistry gcj-dbtool \
gappletviewer gjarsigner gkeytool gjar gcjh gjavah gnative2ascii \
gorbd grmid gserialver gtnameserv gc-analyze
+if CREATE_GJDOC
+bin_PROGRAMS += gjdoc
+endif
## It is convenient to actually build and install the default database
## when gcj-dbtool is available.
@@ -1013,6 +1016,16 @@
grmiregistry_LDADD = -L$(here)/.libs libgcj-tools.la
grmiregistry_DEPENDENCIES = libgcj-tools.la
+## This is a dummy definition.
+gjdoc_SOURCES =
+gjdoc_LDFLAGS = --main=gnu.classpath.tools.gjdoc.Main \
+ -Djava.class.path=$(ANTLR_JAR) \
+ -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
+gjdoc_LINK = $(GCJLINK)
+## See jv_convert_LDADD.
+gjdoc_LDADD = -L$(here)/.libs libgcj-tools.la
+gjdoc_DEPENDENCIES = libgcj-tools.la
+
## ################################################################
if INTERPRETER
nat_jdwp_source_files = \
Index: configure.ac
===================================================================
--- configure.ac (revision 140626)
+++ configure.ac (working copy)
@@ -77,6 +77,34 @@
[gconf_enabled=no]
)
+AC_ARG_ENABLE([gjdoc],
+ [AS_HELP_STRING(--disable-gjdoc,compile GJDoc (disabled by --disable-gjdoc) [default=yes])],
+ [case "${enableval}" in
+ yes) COMPILE_GJDOC=yes ;;
+ no) COMPILE_GJDOC=no ;;
+ *) COMPILE_GJDOC=yes ;;
+ esac],
+ [COMPILE_GJDOC=yes])
+AM_CONDITIONAL(CREATE_GJDOC, test "x${COMPILE_GJDOC}" = xyes)
+
+AC_ARG_WITH([antlr-jar],
+ [AS_HELP_STRING([--with-antlr-jar=file],[Use ANTLR from the specified jar file])],
+ [
+ ANTLR_JAR=$withval
+ ],
+ [
+ ANTLR_JAR="$ANTLR_JAR"
+ ])
+
+if test "x${COMPILE_GJDOC}" = xyes; then
+ case "${ANTLR_JAR}" in
+ yes) AC_MSG_ERROR([missing path to antlr jar file]);;
+ no) ;;
+ *) test -f "${ANTLR_JAR}" || AC_MSG_ERROR([antlr jar file not found: $ANTLR_JAR])
+ esac
+fi
+AC_SUBST(ANTLR_JAR)
+
AC_ARG_ENABLE(java-maintainer-mode,
AS_HELP_STRING([--enable-java-maintainer-mode],
[allow rebuilding of .class and .h files]))