[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cp-patches] Add --with-jay option to regenerate xpath parser
From: |
Mark Wielaard |
Subject: |
[cp-patches] Add --with-jay option to regenerate xpath parser |
Date: |
Sun, 02 Jan 2005 21:07:17 +0100 |
Hi,
This adds the build support for --with-jay=/path/to/jay to enable
rebuilding the xpath parser.
2005-01-02 Mark Wielaard <address@hidden>
* acinclude.m4 (REGEN_WITH_JAY): New macro.
* configure.ac: Call REGEN_WITH_JAY.
* lib/Makefile.am (gen-xpath-parser): New rule, depends on
REGEN_PARSER being defined.
(genclasses): Depend on gen-xpath-parser.
Note that currently the REGEN_WITH_JAY macro expects the jay executable
and the skeleton file to be in the same directory. Regeneration of the
parser is currently turned off.
This should complete the GNU JAXP merger. Hurray!
Cheers,
Mark
Index: ChangeLog
===================================================================
RCS file: /cvsroot/classpath/classpath/ChangeLog,v
retrieving revision 1.3010
diff -u -r1.3010 ChangeLog
--- ChangeLog 2 Jan 2005 17:29:33 -0000 1.3010
+++ ChangeLog 2 Jan 2005 20:00:20 -0000
@@ -1,3 +1,11 @@
+2005-01-02 Mark Wielaard <address@hidden>
+
+ * acinclude.m4 (REGEN_WITH_JAY): New macro.
+ * configure.ac: Call REGEN_WITH_JAY.
+ * lib/Makefile.am (gen-xpath-parser): New rule, depends on
+ REGEN_PARSER being defined.
+ (genclasses): Depend on gen-xpath-parser.
+
2005-01-02 Archie Cobbs <address@hidden>
* vm/reference/java/lang/VMThread.java (sleep()): revert behavior
Index: acinclude.m4
===================================================================
RCS file: /cvsroot/classpath/classpath/acinclude.m4,v
retrieving revision 1.45
diff -u -r1.45 acinclude.m4
--- acinclude.m4 25 Dec 2004 23:10:06 -0000 1.45
+++ acinclude.m4 2 Jan 2005 20:00:20 -0000
@@ -371,3 +371,33 @@
AM_CONDITIONAL(CREATE_API_DOCS, test "x${ENABLE_GJDOC}" = xyes)
])
+dnl -----------------------------------------------------------
+dnl Enable regeneration of parsers using jay
+dnl http://www.informatik.uni-osnabrueck.de/alumni/bernd/jay/
+dnl -----------------------------------------------------------
+AC_DEFUN([REGEN_WITH_JAY],
+[
+ AC_ARG_WITH([jay],
+ [AS_HELP_STRING(--with-jay,Regenerate the parsers with jay must
be given the path to the jay executable)],
+ [
+ if test -d "${withval}"; then
+ JAY_DIR_PATH="${withval}"
+ AC_PATH_PROG(JAY, jay, "no", ${JAY_DIR_PATH})
+ if test "x${JAY}" = xno; then
+ AC_MSG_ERROR("jay executable not found");
+ fi
+ else
+ JAY_DIR_PATH=$(dirname "${withval}")
+ JAY="${withval}"
+ AC_SUBST(JAY)
+ fi
+ JAY_SKELETON="${JAY_DIR_PATH}/skeleton"
+ AC_CHECK_FILE(${JAY_SKELETON}, AC_SUBST(JAY_SKELETON),
+ AC_MSG_ERROR("Expected skeleton file in $(dirname ${withval})"))
+ JAY_FOUND=yes
+ ],
+ [
+ JAY_FOUND=no
+ ])
+ AM_CONDITIONAL(REGEN_PARSERS, test "x${JAY_FOUND}" = xyes)
+])
Index: configure.ac
===================================================================
RCS file: /cvsroot/classpath/classpath/configure.ac,v
retrieving revision 1.65
diff -u -r1.65 configure.ac
--- configure.ac 2 Jan 2005 13:50:45 -0000 1.65
+++ configure.ac 2 Jan 2005 20:00:20 -0000
@@ -361,6 +361,11 @@
CLASSPATH_ENABLE_GJDOC
dnl -----------------------------------------------------------
+dnl Whether to use jay to regenerate parsers.
+dnl -----------------------------------------------------------
+REGEN_WITH_JAY
+
+dnl -----------------------------------------------------------
dnl This sets the build-time default, which can now be overridden
dnl by setting the system property gnu.classpath.awt.gtk.portable.native.sync
dnl to "true" or "false".
Index: lib/Makefile.am
===================================================================
RCS file: /cvsroot/classpath/classpath/lib/Makefile.am,v
retrieving revision 1.76
diff -u -r1.76 Makefile.am
--- lib/Makefile.am 25 Dec 2004 23:10:06 -0000 1.76
+++ lib/Makefile.am 2 Jan 2005 20:00:21 -0000
@@ -83,9 +83,24 @@
mkdir -p $(top_builddir)/java/util
$(top_srcdir)/scripts/generate-locale-list.sh >
$(top_builddir)/java/util/LocaleData.java
-genclasses: gen-classlist.sh standard.omit
$(top_builddir)/java/util/LocaleData.java
+genclasses: gen-classlist.sh standard.omit
$(top_builddir)/java/util/LocaleData.java gen-xpath-parser
top_builddir=$(top_builddir) $(SHELL) ./gen-classlist.sh standard
+# Only rebuild parsers when explicitly asked to.
+if REGEN_PARSERS
+
+gen-xpath-parser: $(top_srcdir)/gnu/xml/xpath/XPathParser.java
+
+$(top_srcdir)/gnu/xml/xpath/XPathParser.java:
$(top_srcdir)/gnu/xml/xpath/XPathParser.y
+ ( cd $(top_srcdir)/gnu/xml/xpath; \
+ $(JAY) XPathParser.y < $(JAY_SKELETON) > XPathParser.java )
+else
+
+gen-xpath-parser:
+ true
+
+endif # REGEN_PARSER
+
$(JAVA_DEPEND): genclasses
compile-classes: classes $(JAVA_SRCS) Makefile
signature.asc
Description: This is a digitally signed message part
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [cp-patches] Add --with-jay option to regenerate xpath parser,
Mark Wielaard <=