[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Progress towards a usable SWIG/Java build

From: Gustav Munkby <grddev_at_gmx.net>
Date: 2004-03-25 22:28:46 CET

I've been looking into the building of the SWIG/Java bindings.

In difference from the usual swig bindings, all apis should be exported
through one library. This is currently dubbed libsvn_swig_java-1.so,
which might be confusing since it overlaps with the
libsvn_swig_{py,pl}-1.so files which does something completely different.

I first made a usual makefile, which would be invoked from within the
subversion/bindings/swig directory, this is attached as swigjava.mk

Then, per Daniel Rall's suggestion, I tweaked my build-outputs.mk, to
include the build-rules specified by swigjava.mk.

I did so, and the attachment build-outputs.mk.patch is a patch of the
build-outputs.mk generated on my computer from revision 9209.

After this introduction, I have a question, how do I change the build
system, as per build.conf and the python generating scripts, to make
sure that the build-outputs.mk gets the contents specified by the patch?

I could probably find out what has to be changed, but it would take very
long time, and I assume that it would be a rather quick change for
someone experienced with the build/configuration/generation thingie.

regards,
Gustav Munkby

# --- Cut n Pasted from subversion's Makefile ---
INCLUDES = -I../../../subversion/include \
           -I../../../build \
           -I/usr/include/neon \
           -I/usr/include/apache \
           -I/opt/j2sdk/include -I/opt/j2sdk/include/linux \
           -I.

SWIG = /usr/bin/swig
SWIG_VERSION = 103021
SWIG_LIBSWIG_DIR = /usr/lib/swig1.3
SWIG_INCLUDES = -I$(SWIG_LIBSWIG_DIR) \
                -DSVN_SWIG_VERSION=$(SWIG_VERSION) \
                $(INCLUDES) -noruntime \
                -I/opt/j2sdk/include -I/opt/j2sdk/include/linux \
                -java -package 'org.tigris.subversion.swig'

CFLAGS = -g -O2 -pthread -DNEON_ZLIB -DNEON_SSL -Wall -Wstrict-prototypes -fno-strict-aliasing
CPPFLAGS = -DLINUX=2 -D_REENTRANT -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_SVID_SOURCE -D_GNU_SOURCE -DSWIGJAVA
LDFLAGS = -Ljava/.libs
COMPILE = $(CC) $(CPPFLAGS) $(CFLAGS) $(INCLUDES)

LIBTOOL = $(SHELL) ../../../libtool
LT_COMPILE = $(LIBTOOL) --mode=compile $(COMPILE)
LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -rpath /usr/lib

# --- Defines the source and object files ---
libsvn_swig_java_SWIGS=svn_client.i svn_fs.i svn_repos.i core.i svn_delta.i svn_ra.i svn_wc.i

libsvn_swig_java_SOURCES=$(patsubst %.i,java/%.c,$(libsvn_swig_java_SWIGS)) swigutil_java.c
libsvn_swig_java_OBJS=$(patsubst %.c,%.lo,$(libsvn_swig_java_SOURCES))

# --- Define the different targets ---
libsvn_swig_java-1.la: $(libsvn_swig_java_OBJS)
        $(LINK) -lapr-0 -laprutil-0 -lsvn_client-1 -lsvn_delta-1 -lsvn_fs-1 -lsvn_delta-1 -lsvn_ra-1 -lsvn_repos-1 -lsvn_subr-1 -lneon -o $@ $^

java/%.c: %.i
        $(SWIG) $(SWIG_INCLUDES) -o $@ $<

java/%.lo: java/%.c
        $(LT_COMPILE) -o $@ -c $<

swigutil_java.lo: swigutil_java.c
        $(LT_COMPILE) -o $@ -c $<

clean:
        -rm -rf java/*.java java/*.o java/*.lo java/.libs/* *.o *.lo .libs/*

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Received on Thu Mar 25 22:29:21 2004

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.