[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cp-patches] Patch: FYI: new --with-vm-classes option
From: |
Tom Tromey |
Subject: |
[cp-patches] Patch: FYI: new --with-vm-classes option |
Date: |
14 Jun 2005 15:13:36 -0600 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 |
I'm checking this in on the trunk.
This adds the new '--with-vm-classes' option to allow the libgcj "big
merge" to proceed. This lets a VM override some Classpath sources
with its own. It also adds a new --with-glibj setting, so that you
can build the class files but not install anything.
Tom
Index: ChangeLog
from Tom Tromey <address@hidden>
* m4/acinclude.m4 (--with-vm-classes): New option.
* lib/gen-classlist.sh.in: Handle 'vm_classes' feature.
* lib/Makefile.am (compile_classpath): Updated for new
classpath-setting approach.
(noinst_DATA): Now unconditional.
Index: lib/Makefile.am
===================================================================
RCS file: /cvsroot/classpath/classpath/lib/Makefile.am,v
retrieving revision 1.87
diff -u -r1.87 Makefile.am
--- lib/Makefile.am 13 Jun 2005 20:57:01 -0000 1.87
+++ lib/Makefile.am 14 Jun 2005 20:26:43 -0000
@@ -9,7 +9,7 @@
propertyfiles := $(shell cd $(top_srcdir)/resource && $(FIND) gnu java org
-name \*\.properties -print)
metafiles := $(shell cd $(top_srcdir)/resource && $(FIND) META-INF -path
\*/CVS -prune -o -type f -print)
-compile_classpath =
$(top_srcdir):$(top_srcdir)/vm/reference:$(top_srcdir)/external/w3c_dom:$(top_srcdir)/external/sax:.:$(USER_CLASSLIB)
+compile_classpath =
$(vm_classes):$(top_srcdir):$(top_srcdir)/external/w3c_dom:$(top_srcdir)/external/sax:.:$(USER_CLASSLIB)
# handling source to bytecode compiler programs like gcj, jikes and kjc
if FOUND_GCJ
@@ -47,9 +47,11 @@
endif # INSTALL_GLIBJ_ZIP
-if INSTALL_CLASS_FILES
-
+if BUILD_CLASS_FILES
noinst_DATA = genclasses compile-classes resources
+endif # BUILD_CLASS_FILES
+
+if INSTALL_CLASS_FILES
install-data-local: genclasses compile-classes
-$(top_srcdir)/mkinstalldirs $(DESTDIR)$(pkgdatadir)
Index: lib/gen-classlist.sh.in
===================================================================
RCS file: /cvsroot/classpath/classpath/lib/gen-classlist.sh.in,v
retrieving revision 1.23
diff -u -r1.23 gen-classlist.sh.in
--- lib/gen-classlist.sh.in 19 May 2005 06:45:04 -0000 1.23
+++ lib/gen-classlist.sh.in 14 Jun 2005 20:26:43 -0000
@@ -7,11 +7,25 @@
echo "Adding java source files from srcdir '@top_srcdir@'."
@FIND@ @top_srcdir@/java @top_srcdir@/javax @top_srcdir@/gnu \
- @top_srcdir@/org @top_srcdir@/vm/reference \
+ @top_srcdir@/org \
@top_srcdir@/external/w3c_dom @top_srcdir@/external/sax \
-follow -type f -print | sort | grep '\.java$' \
> ${top_builddir}/lib/classes.1
+# Generate files for the VM classes.
+: > vm.omit
+: > vm.add
+vm_dirlist=`echo "@vm_classes@" | sed -e 's/:/ /g'`
+echo "Adding java source files from VM directory $vm_dirlist"
+for dir in $vm_dirlist; do
+ (cd $dir && @FIND@ java javax gnu org -name '*.java' -print |
+ sed -e 's,^[.]/,,') |
+ while read f; do
+ echo $dir/$f >> vm.add
+ echo $f >> vm.omit
+ done
+done
+
# Only include generated files once.
if test ! "${top_builddir}" -ef "@top_srcdir@"; then
echo "Adding generated files in builddir '${top_builddir}'."
@@ -19,7 +33,29 @@
| sort | grep '\.java$' >> ${top_builddir}/lib/classes.1
fi
-for filexp in `cat @top_srcdir@/lib/$1.omit` ; do { grep -v ${filexp} <
${top_builddir}/lib/classes.1 > ${top_builddir}/lib/classes.2 ; mv
${top_builddir}/lib/classes.2 ${top_builddir}/lib/classes.1 ; } ; done
+
+cat @top_srcdir@/lib/$1.omit vm.omit > tmp.omit
+for dir in $vm_dirlist; do
+ if test -f $dir/$1.omit; then
+ cat $dir/$1.omit >> tmp.omit
+ fi
+done
+
+for filexp in `cat tmp.omit`; do
+ grep -v ${filexp} < ${top_builddir}/lib/classes.1 >
${top_builddir}/lib/classes.2
+ mv ${top_builddir}/lib/classes.2 ${top_builddir}/lib/classes.1
+done
+
+
+for dir in $vm_dirlist; do
+ if test -f $dir/$1.omit; then
+ for filexp in `cat $dir/$1.omit`; do
+ grep -v $filexp < vm.add > vm.add.1
+ mv vm.add.1 vm.add
+ done
+ fi
+done
+cat vm.add >> classes.1
new=
if test -e ${top_builddir}/lib/classes; then
@@ -48,3 +84,5 @@
grep /beans/ classes >> classes.awt
grep /xml/ classes > classes.xml
grep /javax/ classes | grep -v /xml/ > classes.standardx
+
+exit 0
Index: m4/acinclude.m4
===================================================================
RCS file: /cvsroot/classpath/classpath/m4/acinclude.m4,v
retrieving revision 1.1
diff -u -r1.1 acinclude.m4
--- m4/acinclude.m4 26 Apr 2005 22:44:03 -0000 1.1
+++ m4/acinclude.m4 14 Jun 2005 20:26:43 -0000
@@ -301,6 +301,11 @@
],
[ conditional_with_classlib=false ])
AM_CONDITIONAL(USER_SPECIFIED_CLASSLIB, test "x${conditional_with_classlib}"
= xtrue)
+
+ AC_ARG_WITH([vm-classes],
+ [AS_HELP_STRING(--with-vm-classes,specify path to VM override
source files)], [vm_classes="$with_vm_classes"],
+ [vm_classes="${top_srcdir}/vm/reference"])
+ AC_SUBST(vm_classes)
])
dnl -----------------------------------------------------------
@@ -309,20 +314,28 @@
AC_DEFUN([CLASSPATH_WITH_GLIBJ],
[
AC_ARG_WITH([glibj],
- [AS_HELP_STRING([--with-glibj],[define what to install
(zip|flat|both|none) [default=zip]])],
+ [AS_HELP_STRING([--with-glibj],[define what to install
(zip|flat|both|none|build) [default=zip]])],
[
if test "x${withval}" = xyes || test "x${withval}" = xzip; then
AC_PATH_PROG(ZIP, zip)
install_class_files=no
+ build_class_files=yes
elif test "x${withval}" = xboth; then
AC_PATH_PROG(ZIP, zip)
install_class_files=yes
+ build_class_files=yes
elif test "x${withval}" = xflat; then
ZIP=
install_class_files=yes
+ build_class_files=yes
elif test "x${withval}" = xno || test "x${withval}" = xnone;
then
ZIP=
install_class_files=no
+ build_class_files=no
+ elif test "x${withval}" = xbuild; then
+ ZIP=
+ install_class_files=no
+ build_class_files=yes
else
AC_MSG_ERROR([unknown value given to --with-glibj])
fi
@@ -333,6 +346,7 @@
])
AM_CONDITIONAL(INSTALL_GLIBJ_ZIP, test "x${ZIP}" != x)
AM_CONDITIONAL(INSTALL_CLASS_FILES, test "x${install_class_files}" = xyes)
+ AM_CONDITIONAL(BUILD_CLASS_FILES, test "x${build_class_files}" = xyes)
AC_ARG_ENABLE([examples],
[AS_HELP_STRING(--enable-examples,enable build of the examples
[default=yes])],
- [cp-patches] Patch: FYI: new --with-vm-classes option,
Tom Tromey <=