From: <rla...@us...> - 2004-02-10 17:39:44
|
Update of /cvsroot/plplot/plplot/bindings/java In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5627/java Modified Files: Makefile.am Removed Files: plplotcapi.i Log Message: The two plplotcapi.i files which used to be in bindings/java and bindings/python and shared a extensive amount of code are now centralized in bindings/swig-support/plplotcapi.i. The java- and python-specific sections of this former file are conditionally included by CPP macros: #ifdef SWIG_JAVA #ifdef SWIG_PYTHON When calling swig in bindings/{java,python}/Makefile.am, the right -DSWIG_* option is used now. New variables have been created in these Makefile.am's, namely SWIG_SUPPORT_DIR, PLPLOTCAPI_I, and SWIG_CMD. This later one is particularly useful in the Python case, since it avoids "useless repetition of code" (a.k.a "things that hurt eyes" :-) The directory bindings/swig-support/ is included in the tarball through the variable EXTRA_DIST in bindings/Makefile.am. These changes are fully tested for Python, but no tests were done for Java. I may also have messed with some comments in the plplotcapi.i file. Please, review it. Now that we have a centralized *.i file, the door is open for the other scripting languages supported by Swig: PHP, Ruby, Guile, Mzscheme, Chicken, Ocaml, Pike, and C# (!). Index: Makefile.am =================================================================== RCS file: /cvsroot/plplot/plplot/bindings/java/Makefile.am,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- Makefile.am 5 Feb 2004 22:17:11 -0000 1.24 +++ Makefile.am 10 Feb 2004 17:36:13 -0000 1.25 @@ -20,6 +20,11 @@ # along with the file; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +SWIG_SUPPORT_DIR = $(top_srcdir)/bindings/swig-support +PLPLOTCAPI_I = $(SWIG_SUPPORT_DIR)/plplotcapi.i + +SWIG_CMD = $(SWIG) -I$(SWIG_SUPPORT_DIR) -DPL_DOUBLE -DSWIG_JAVA -java + swigjavafiles = \ SWIGTYPE_p_p_char.java \ plplotjavac.java \ @@ -44,12 +49,11 @@ PLStreamc.java \ README.javaAPI \ javabind.c \ - plplotcapi.i \ plplotjavac.i \ $(swiggenfiles) -$(swiggenfiles): plplotjavac.i plplotcapi.i - $(SWIG) -java -package plplot.core -DPL_DOUBLE plplotjavac.i +$(swiggenfiles): plplotjavac.i $(PLPLOTCAPI_I) + $(SWIG_CMD) -package plplot.core plplotjavac.i # Must have "exec" in the name. ourexecjavadir = $(libdir)/java/plplot/core --- plplotcapi.i DELETED --- |