classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cp-patches] Build system update


From: Guilhem Lavaux
Subject: [cp-patches] Build system update
Date: Thu, 20 Oct 2005 21:20:38 +0200
User-agent: Mozilla Thunderbird 1.0.2 (X11/20050322)

Hi,

I have finally merged classpath into kaffe's tree. But to make things work smoothly I had to add a few hooks into configure.ac. This patch adds support for "--with-native-libdir" and "--with-glibj-dir". The first one moves the native libraries to another directory instead of ${libdir}/${PACKAGE} (which is still the default). The second one do the same for the java library.

There is also a new script to fetch extra vm resources which should be included in glibj.zip. I have also modified gen-classlist.sh to also parse for com/ as it is needed for kaffe (and maybe some other VM).

ChangeLog entry:

2005-10-20  Guilhem Lavaux  <address@hidden>

        * configure.ac: Added support for "--with-native-libdir" and
        "--with-glibj-dir". Generate copy-vmresources.sh

        * lib/Makefile.am: Call copy-vmresources.sh to fetch possible vm
        resources from the vmdirs.

        * lib/copy-vmresources.sh.in: New script file.

        * lib/gen-classlist.sh.in: Include com/ as base package for the
        vm directories.

        *  native/jawt/Makefile.am,
        native/jni/gtk-peer/Makefile.am,
        native/jni/java-io/Makefile.am,
        native/jni/java-lang/Makefile.am,
        native/jni/java-net/Makefile.am,
        native/jni/java-nio/Makefile.am,
        native/jni/java-util/Makefile.am,
        native/jni/midi-alsa/Makefile.am,
        native/jni/midi-dssi/Makefile.am,
        native/jni/qt-peer/Makefile.am,
        native/jni/xmlj/Makefile.am: Install libraries in nativelibdir
        and not pkglib.
Index: configure.ac
===================================================================
RCS file: /cvsroot/classpath/classpath/configure.ac,v
retrieving revision 1.111
diff -u -r1.111 configure.ac
--- configure.ac        6 Oct 2005 06:24:11 -0000       1.111
+++ configure.ac        20 Oct 2005 19:19:19 -0000
@@ -176,6 +176,35 @@
               [COMPILE_QT_PEER=no])
 AM_CONDITIONAL(CREATE_QT_PEER_LIBRARIES, test "x${COMPILE_QT_PEER}" = xyes)
 
+
+dnl -----------------------------------------------------------
+dnl Sets the native libraries installation dir
+dnl -----------------------------------------------------------
+AC_ARG_WITH([native-libdir],
+           [AS_HELP_STRING(--with-native-libdir,sets the installation 
directore for native libraries [default='${libdir}/${PACKAGE}'])],
+           [
+            nativelibdir=${withval}
+           ],
+           [
+            nativelibdir='${libdir}/${PACKAGE}'
+           ])
+
+AC_SUBST(nativelibdir)
+
+dnl -----------------------------------------------------------
+dnl Sets the Java library installation dir.
+dnl -----------------------------------------------------------
+AC_ARG_WITH([glibj-dir],
+           [AS_HELP_STRING(--with-glibj-dir,sets the installation directory 
for glibj.zip [default='${libdir}/${PACKAGE}'])],
+           [
+            glibjdir=${withval}
+           ],
+           [
+            glibjdir='${datadir}/${PACKAGE}'
+           ])
+
+AC_SUBST(glibjdir)
+
 dnl -----------------------------------------------------------
 dnl Regenerate headers at build time (disabled by default)
 dnl -----------------------------------------------------------
@@ -557,7 +586,9 @@
 scripts/classpath.spec
 lib/Makefile
 lib/gen-classlist.sh
+lib/copy-vmresources.sh
 examples/Makefile
 examples/Makefile.jawt])
 AC_CONFIG_COMMANDS([gen-classlist],[chmod 755 lib/gen-classlist.sh])
+AC_CONFIG_COMMANDS([copy-vmmresources],[chmod 755 lib/copy-vmmetainf.sh])
 AC_OUTPUT
Index: lib/Makefile.am
===================================================================
RCS file: /cvsroot/classpath/classpath/lib/Makefile.am,v
retrieving revision 1.102
diff -u -r1.102 Makefile.am
--- lib/Makefile.am     12 Sep 2005 17:52:04 -0000      1.102
+++ lib/Makefile.am     20 Oct 2005 19:19:19 -0000
@@ -40,7 +40,7 @@
 
 if INSTALL_GLIBJ_ZIP
 
-pkgdata_DATA = glibj.zip
+glibj_DATA = glibj.zip
 
 endif # INSTALL_GLIBJ_ZIP
 
@@ -73,7 +73,7 @@
 glibj.zip: classes compile-classes resources
        if test "$(ZIP)" != ""; then $(ZIP) -r -D glibj.zip gnu java javax org 
META-INF > /dev/null; fi
 
-resources:
+resources: copy-vmresources.sh
        if ! [ -e gnu ]; then mkdir gnu; fi
        if ! [ -e gnu/java ]; then mkdir gnu/java; fi
        if ! [ -e gnu/java/locale ]; then mkdir gnu/java/locale; fi
@@ -87,6 +87,7 @@
        @list='$(metafiles)'; for p in $$list; do \
          cp $(top_srcdir)/resource/$$p $$p; \
        done
+       @$(SHELL) ./copy-vmresources.sh
        @list='$(iconfiles)'; for p in $$list; do \
          cp $(top_srcdir)/$$p $$p; \
        done
@@ -145,6 +146,7 @@
        -rm -rf java
        -rm -rf javax
        -rm -rf org
+       -rm -rf com
        -rm -rf META-INF
        -rm -rf lists
        -rm -f Makefile.deps
Index: lib/copy-vmresources.sh.in
===================================================================
RCS file: lib/copy-vmresources.sh.in
diff -N lib/copy-vmresources.sh.in
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ lib/copy-vmresources.sh.in  20 Oct 2005 19:19:19 -0000
@@ -0,0 +1,40 @@
+#! @SHELL@
+# @configure_input@
+
+vmdirs=`echo "@vm_classes@" | sed 's%:% %g'`
+destMetaDir=`pwd`/META-INF
+destResDir=`pwd`
+
+for p in ${vmdirs}; do
+       if test -d $p/META-INF; then
+               (cd $p/META-INF; 
+                dirs=`find -name "CVS" -prune -o -type d -print`;
+                for u in ${dirs}; do
+                        mkdir -p ${destMetaDir}/${u};
+                done;
+                files=`find -name "CVS" -prune -o -type f -print`;
+                for u in ${files}; do
+                        cp ${u} ${destMetaDir}/${u};
+                done
+                );
+       fi;
+
+       (cd ${p};
+         resfiles=`find ${p} -name "*.properties"`
+         resdirs=
+         for i in ${resfiles}; do 
+                 a=`basename ${i}`; 
+                 b=`echo ${i} | sed "s%${a}%%g"`; 
+                 resdirs="${resdirs} ${b}";
+         done;
+         resnewdirs=`echo ${resdirs} | uniq`;
+
+         for u in ${resnewdirs}; do
+                 mkdir -p ${destResDir}/${u};
+         done
+  
+         for f in ${resfiles}; do
+               echo ${f} ${destResDir}/${f};
+         done
+         )
+done
Index: lib/gen-classlist.sh.in
===================================================================
RCS file: /cvsroot/classpath/classpath/lib/gen-classlist.sh.in,v
retrieving revision 1.31
diff -u -r1.31 gen-classlist.sh.in
--- lib/gen-classlist.sh.in     11 Sep 2005 23:15:58 -0000      1.31
+++ lib/gen-classlist.sh.in     20 Oct 2005 19:19:19 -0000
@@ -24,7 +24,7 @@
 echo "Adding java source files from VM directory $vm_dirlist"
 for dir in $vm_dirlist; do
    (cd $dir
-   for subdir in java javax gnu org; do
+   for subdir in java javax gnu org com; do
       if test -d $subdir; then
         @FIND@ $subdir -name '*.java' -print
       fi
Index: native/jawt/Makefile.am
===================================================================
RCS file: /cvsroot/classpath/classpath/native/jawt/Makefile.am,v
retrieving revision 1.2
diff -u -r1.2 Makefile.am
--- native/jawt/Makefile.am     20 Aug 2005 22:46:54 -0000      1.2
+++ native/jawt/Makefile.am     20 Oct 2005 19:19:19 -0000
@@ -1,4 +1,4 @@
-pkglib_LTLIBRARIES = libjawtgnu.la
+nativelib_LTLIBRARIES = libjawtgnu.la
 
 libjawtgnu_la_SOURCES = jawt.c
 libjawtgnu_la_LIBADD = $(top_builddir)/native/jni/gtk-peer/libgtkpeer.la
Index: native/jni/gtk-peer/Makefile.am
===================================================================
RCS file: /cvsroot/classpath/classpath/native/jni/gtk-peer/Makefile.am,v
retrieving revision 1.29
diff -u -r1.29 Makefile.am
--- native/jni/gtk-peer/Makefile.am     22 Aug 2005 10:36:14 -0000      1.29
+++ native/jni/gtk-peer/Makefile.am     20 Oct 2005 19:19:19 -0000
@@ -1,4 +1,4 @@
-pkglib_LTLIBRARIES = libgtkpeer.la
+nativelib_LTLIBRARIES = libgtkpeer.la
 
 # Gtk/Cairo JNI sources.
 if GTK_CAIRO
Index: native/jni/java-io/Makefile.am
===================================================================
RCS file: /cvsroot/classpath/classpath/native/jni/java-io/Makefile.am,v
retrieving revision 1.19
diff -u -r1.19 Makefile.am
--- native/jni/java-io/Makefile.am      16 Apr 2005 11:05:07 -0000      1.19
+++ native/jni/java-io/Makefile.am      20 Oct 2005 19:19:19 -0000
@@ -1,4 +1,4 @@
-pkglib_LTLIBRARIES = libjavaio.la 
+nativelib_LTLIBRARIES = libjavaio.la 
 
 libjavaio_la_SOURCES =         javaio.h \
                        javaio.c \
Index: native/jni/java-lang/Makefile.am
===================================================================
RCS file: /cvsroot/classpath/classpath/native/jni/java-lang/Makefile.am,v
retrieving revision 1.11
diff -u -r1.11 Makefile.am
--- native/jni/java-lang/Makefile.am    16 Apr 2005 09:19:54 -0000      1.11
+++ native/jni/java-lang/Makefile.am    20 Oct 2005 19:19:19 -0000
@@ -1,4 +1,4 @@
-pkglib_LTLIBRARIES = libjavalang.la libjavalangreflect.la
+nativelib_LTLIBRARIES = libjavalang.la libjavalangreflect.la
 
 libjavalang_la_SOURCES = java_lang_VMSystem.c \
                         java_lang_VMFloat.c \
Index: native/jni/java-net/Makefile.am
===================================================================
RCS file: /cvsroot/classpath/classpath/native/jni/java-net/Makefile.am,v
retrieving revision 1.9
diff -u -r1.9 Makefile.am
--- native/jni/java-net/Makefile.am     12 Apr 2005 06:58:59 -0000      1.9
+++ native/jni/java-net/Makefile.am     20 Oct 2005 19:19:19 -0000
@@ -1,4 +1,4 @@
-pkglib_LTLIBRARIES = libjavanet.la
+nativelib_LTLIBRARIES = libjavanet.la
 
 libjavanet_la_SOURCES = javanet.c \
                        javanet.h \
Index: native/jni/java-nio/Makefile.am
===================================================================
RCS file: /cvsroot/classpath/classpath/native/jni/java-nio/Makefile.am,v
retrieving revision 1.18
diff -u -r1.18 Makefile.am
--- native/jni/java-nio/Makefile.am     26 Apr 2005 00:20:12 -0000      1.18
+++ native/jni/java-nio/Makefile.am     20 Oct 2005 19:19:19 -0000
@@ -1,4 +1,4 @@
-pkglib_LTLIBRARIES = libjavanio.la
+nativelib_LTLIBRARIES = libjavanio.la
 
 libjavanio_la_SOURCES = gnu_java_nio_VMPipe.c \
                        gnu_java_nio_VMSelector.c \
Index: native/jni/java-util/Makefile.am
===================================================================
RCS file: /cvsroot/classpath/classpath/native/jni/java-util/Makefile.am,v
retrieving revision 1.7
diff -u -r1.7 Makefile.am
--- native/jni/java-util/Makefile.am    26 Oct 2004 20:26:03 -0000      1.7
+++ native/jni/java-util/Makefile.am    20 Oct 2005 19:19:19 -0000
@@ -1,4 +1,4 @@
-pkglib_LTLIBRARIES = libjavautil.la
+nativelib_LTLIBRARIES = libjavautil.la
 
 libjavautil_la_SOURCES = java_util_VMTimeZone.c
 
Index: native/jni/midi-alsa/Makefile.am
===================================================================
RCS file: /cvsroot/classpath/classpath/native/jni/midi-alsa/Makefile.am,v
retrieving revision 1.1
diff -u -r1.1 Makefile.am
--- native/jni/midi-alsa/Makefile.am    3 Oct 2005 01:53:12 -0000       1.1
+++ native/jni/midi-alsa/Makefile.am    20 Oct 2005 19:19:19 -0000
@@ -1,4 +1,4 @@
-pkglib_LTLIBRARIES = libgjsmalsa.la 
+nativelib_LTLIBRARIES = libgjsmalsa.la 
 
 libgjsmalsa_la_SOURCES = gnu_javax_sound_midi_alsa_AlsaMidiSequencerDevice.c \
 gnu_javax_sound_midi_alsa_AlsaPortDevice.c \
Index: native/jni/midi-dssi/Makefile.am
===================================================================
RCS file: /cvsroot/classpath/classpath/native/jni/midi-dssi/Makefile.am,v
retrieving revision 1.1
diff -u -r1.1 Makefile.am
--- native/jni/midi-dssi/Makefile.am    3 Oct 2005 01:53:12 -0000       1.1
+++ native/jni/midi-dssi/Makefile.am    20 Oct 2005 19:19:19 -0000
@@ -1,4 +1,4 @@
-pkglib_LTLIBRARIES = libgjsmdssi.la 
+nativelib_LTLIBRARIES = libgjsmdssi.la 
 
 libgjsmdssi_la_SOURCES = gnu_javax_sound_midi_dssi_DSSIMidiDeviceProvider.c \
 gnu_javax_sound_midi_dssi_DSSISynthesizer.c
Index: native/jni/qt-peer/Makefile.am
===================================================================
RCS file: /cvsroot/classpath/classpath/native/jni/qt-peer/Makefile.am,v
retrieving revision 1.4
diff -u -r1.4 Makefile.am
--- native/jni/qt-peer/Makefile.am      24 Aug 2005 08:36:39 -0000      1.4
+++ native/jni/qt-peer/Makefile.am      20 Oct 2005 19:19:19 -0000
@@ -1,7 +1,7 @@
 # Qt AWT backend for Classpath
 #
 
-pkglib_LTLIBRARIES = libqtpeer.la
+nativelib_LTLIBRARIES = libqtpeer.la
 
 AM_LDFLAGS = @CLASSPATH_MODULE@ @QT_LIBS@
 AM_CPPFLAGS = @CLASSPATH_INCLUDES@
Index: native/jni/xmlj/Makefile.am
===================================================================
RCS file: /cvsroot/classpath/classpath/native/jni/xmlj/Makefile.am,v
retrieving revision 1.3
diff -u -r1.3 Makefile.am
--- native/jni/xmlj/Makefile.am 2 Jan 2005 17:04:13 -0000       1.3
+++ native/jni/xmlj/Makefile.am 20 Oct 2005 19:19:19 -0000
@@ -1,4 +1,4 @@
-pkglib_LTLIBRARIES = libxmlj.la
+nativelib_LTLIBRARIES = libxmlj.la
 
 libxmlj_la_SOURCES = \
 xmlj_dom.c \

reply via email to

[Prev in Thread] Current Thread [Next in Thread]