1## @configure_input@
2##
3## @file    Makefile.in
4## @brief   Makefile template for libSBML Java bindings
5## @author  Mike Hucka
6## @author  Ben Kovitz
7## @author  Akiya Jouraku
8##
9## <!--------------------------------------------------------------------------
10## This file is part of libSBML.  Please visit http://sbml.org for more
11## information about SBML, and the latest version of libSBML.
12##
13## Copyright (C) 2013-2018 jointly by the following organizations:
14##     1. California Institute of Technology, Pasadena, CA, USA
15##     2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK
16##     3. University of Heidelberg, Heidelberg, Germany
17##
18## Copyright (C) 2009-2013 jointly by the following organizations:
19##     1. California Institute of Technology, Pasadena, CA, USA
20##     2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK
21##
22## Copyright (C) 2006-2008 by the California Institute of Technology,
23##     Pasadena, CA, USA
24##
25## Copyright (C) 2002-2005 jointly by the following organizations:
26##     1. California Institute of Technology, Pasadena, CA, USA
27##     2. Japan Science and Technology Agency, Japan
28##
29## This library is free software; you can redistribute it and/or modify it
30## under the terms of the GNU Lesser General Public License as published by
31## the Free Software Foundation.  A copy of the license agreement is provided
32## in the file named "LICENSE.txt" included with this software distribution
33## and also available online as http://sbml.org/software/libsbml/license.html
34## ------------------------------------------------------------------------ -->
35
36
37# -----------------------------------------------------------------------------
38# Configuration variables
39# -----------------------------------------------------------------------------
40# Some of the following are substituted automatically by `configure'.  If
41# you are looking at "Makefile", do not edit these values; instead, run the
42# configure script at the top level of the src tree.  It will recreate
43# "Makefile".
44
45include @top_srcdir@/config/makefile-common-vars.mk
46
47# `srcdir' points to the current directory, but should be set by configure.
48# `subdir' must be set manually to the relative dir under srcdir.  Don't
49# set `subdir' to an absolute path, or some make actions will fail.
50
51srcdir            = @srcdir@
52thisdir           = src/bindings/java
53
54# In the normal core C++/C libSBML code, `sources' are used by the default
55# rules to determine what needs to be compiled.  In these language
56# bindings, the variable is not used by default rules, and everything is
57# handled explicitly below.  However, to maintain some resemblance to the
58# other libSBML build organization, we still use the name `sources'.
59
60sources           = libsbml_wrap.cpp libsbml_wrap.h javadoc.i
61
62extra_sources     = libsbml.i                          \
63                    local.cpp                          \
64                    local.i                            \
65                    local-doc-extras.i                 \
66                    local-downcast-extension-layout.i  \
67                    local-downcast-extension.i.in      \
68                    local-downcast-astplugins.i.in     \
69					local-downcast-converters.i.in     \
70					local-downcast-converters-layout.i \
71                    local-downcast-namespaces-layout.i \
72                    local-downcast-namespaces.i.in     \
73                    local-packages-layout.i            \
74                    local-packages.i.in                \
75					 local-downcast-extension-l3v2extendedmath.i \
76					 local-downcast-astplugins-l3v2extendedmath.i \
77					 local-downcast-namespaces-l3v2extendedmath.i \
78					 local-packages-l3v2extendedmath.i \
79
80# The SWIG interface files should not need to be regenerated for recipients
81# of the libSBML distributions; only developers should need to regenerate
82# them.  The conditions for this are handled later below.
83
84swig_sources      = $(extra_sources) ../swig/libsbml.h ../swig/libsbml.i
85
86
87# Variables `subdirs', `headers', `sources', `libraries', `extra_CPPFLAGS',
88# `extra_CXXFLAGS', `extra_LDFLAGS' and `distfiles' are used by the default
89# rules in `makefile-common-actions.mk' included at the end.
90
91extra_CPPFLAGS    = $(JAVA_CPPFLAGS) -I../swig
92SWIGFLAGS        += $(JAVA_CPPFLAGS) -I../swig
93
94extra_LDFLAGS     = $(JAVA_LDFLAGS)
95
96extra_LIBS        = $(JAVA_LIBS)
97
98ifdef USE_EXPAT
99  extra_CPPFLAGS += @EXPAT_CPPFLAGS@
100  extra_LDFLAGS  += @EXPAT_LDFLAGS@
101  extra_LIBS     += @EXPAT_LIBS@
102endif
103
104ifdef USE_XERCES
105  extra_CPPFLAGS += @XERCES_CPPFLAGS@
106  extra_LDFLAGS  += @XERCES_LDFLAGS@
107  extra_LIBS     += @XERCES_LIBS@
108endif
109
110ifdef USE_LIBXML
111  extra_CPPFLAGS += @LIBXML_CPPFLAGS@
112  extra_LDFLAGS  += @LIBXML_LDFLAGS@
113  extra_LIBS     += @LIBXML_LIBS@
114endif
115
116# SBML package plug-ins
117ifdef USE_COMP
118  SWIGFLAGS      += -DUSE_COMP
119  SWIGDOCDEFINES += --define USE_COMP
120endif # USE_COMP
121
122ifdef USE_FBC
123  SWIGFLAGS      += -DUSE_FBC
124  SWIGDOCDEFINES += --define USE_FBC
125endif # USE_FBC
126
127ifdef USE_GROUPS
128  SWIGFLAGS      += -DUSE_GROUPS
129  SWIGDOCDEFINES += --define USE_GROUPS
130endif # USE_GROUPS
131
132ifdef USE_LAYOUT
133  SWIGFLAGS      += -DUSE_LAYOUT
134  SWIGDOCDEFINES += --define USE_LAYOUT
135endif # USE_LAYOUT
136
137ifdef USE_QUAL
138  SWIGFLAGS      += -DUSE_QUAL
139  SWIGDOCDEFINES += --define USE_QUAL
140endif # USE_QUAL
141
142ifdef USE_MULTI
143  SWIGFLAGS      += -DUSE_MULTI
144  SWIGDOCDEFINES += --define USE_MULTI
145endif # USE_MULTI
146
147ifdef USE_RENDER
148  SWIGFLAGS      += -DUSE_RENDER
149  SWIGDOCDEFINES += --define USE_RENDER
150endif # USE_RENDER
151
152ifdef USE_L3V2EXTENDEDMATH
153  SWIGFLAGS      += -DUSE_L3V2EXTENDEDMATH
154  SWIGDOCDEFINES += --define USE_L3V2EXTENDEDMATH
155endif # USE_L3V2EXTENDEDMATH
156
157
158# -fno-strict-aliasing option is added to CXXFLAGS when using GCC.  As
159# written in the SWIG Manual (section 20.2.4), SWIG generated code could
160# cause crash problems when compiled by GCC with -fstrict-aliasing option
161# (automatically enabled when using -O2 or higher optimization in GCC 3 or
162# later) and the option should be disabled by adding -fno-strict-aliasing
163# option.
164#
165# Currently, we know that Java binding library causes crash when it is
166# compiled by GCC 4 with -O2 or higher optimization, and the problem can be
167# avoided by adding -fno-strict-aliasing option.
168
169ifeq (GCC,$(findstring GCC,$(shell $(CXX) -dumpversion | sed -e 's/^[34]\./GCC/' )))
170      CXXFLAGS += -fno-strict-aliasing
171endif
172
173# By default, the compliance level of eclipse JDT compiler (ecj) is Java
174# 1.4 which doesn't support covariant return types.  To avoid the
175# incompatible issue, "-5" option which sets the compliance level to Java
176# 1.5 is added if ecj is detected.
177
178ifeq (1.5 compliance, $(findstring 1.5 compliance, $(shell ${JAVAC} -help 2>&1 | grep "1.5 compliance" )))
179  JAVAC_OPTION += -5
180endif
181
182# We're building two libraries: the shared JNI library, and the Jar file.
183
184java_package      = org.sbml.$(PACKAGE)
185jarfile           = libsbmlj.jar
186jnifile           = $(JNIBASENAME).$(JNIEXT)
187
188libraries         = $(jarfile) $(jnifile)
189
190# We generate the $(jnifile) (C++ library for System.loadLibrary) with an
191# object file in this directory (libsbml_wrap.o) and other object files in
192# sub directories in 'src' directory (src/sbml, src/common, ... ) instead
193# of linking a shared library of libSBML (libsbml.$(SHAREDLIBEXT)).
194
195# All directories that contain *.{c,cpp} (implementation) files of libSBML
196# need to be listed in the following 'otherdirs' variable.
197
198otherdirs = ../../sbml/common ../../sbml/util ../../sbml/xml \
199            ../../sbml/math ../../sbml/validator ../../sbml/validator/constraints \
200            ../../sbml/units ../../sbml/annotation ../../sbml/compress \
201            ../../sbml/ ../../sbml/extension ../../sbml/conversion
202
203ifdef USE_COMP
204  otherdirs += ../../sbml/packages/comp/common \
205               ../../sbml/packages/comp/extension \
206               ../../sbml/packages/comp/sbml \
207               ../../sbml/packages/comp/util \
208               ../../sbml/packages/comp/validator \
209               ../../sbml/packages/comp/validator/constraints
210endif
211ifdef USE_FBC
212  otherdirs += ../../sbml/packages/fbc/common \
213               ../../sbml/packages/fbc/extension \
214               ../../sbml/packages/fbc/sbml \
215               ../../sbml/packages/fbc/util \
216               ../../sbml/packages/fbc/validator \
217               ../../sbml/packages/fbc/validator/constraints
218endif
219ifdef USE_GROUPS
220  otherdirs += ../../sbml/packages/groups/common \
221               ../../sbml/packages/groups/extension \
222               ../../sbml/packages/groups/sbml \
223               ../../sbml/packages/groups/validator \
224               ../../sbml/packages/groups/validator/constraints
225endif
226ifdef USE_LAYOUT
227  otherdirs += ../../sbml/packages/layout/common \
228               ../../sbml/packages/layout/extension \
229               ../../sbml/packages/layout/sbml \
230               ../../sbml/packages/layout/util \
231               ../../sbml/packages/layout/validator \
232               ../../sbml/packages/layout/validator/constraints
233endif
234ifdef USE_QUAL
235  otherdirs += ../../sbml/packages/qual/common \
236               ../../sbml/packages/qual/extension \
237               ../../sbml/packages/qual/sbml \
238               ../../sbml/packages/qual/validator \
239               ../../sbml/packages/qual/validator/constraints
240endif
241ifdef USE_MULTI
242  otherdirs += ../../sbml/packages/multi/common \
243               ../../sbml/packages/multi/extension \
244               ../../sbml/packages/multi/sbml \
245               ../../sbml/packages/multi/validator \
246               ../../sbml/packages/multi/validator/constraints
247endif
248ifdef USE_L3V2EXTENDEDMATH
249  otherdirs += ../../sbml/packages/l3v2extendedmath/common \
250               ../../sbml/packages/l3v2extendedmath/extension \
251               ../../sbml/packages/l3v2extendedmath/validator \
252               ../../sbml/packages/l3v2extendedmath/validator/constraints
253endif
254
255objfiles = libsbml_wrap.lo $(wildcard $(addsuffix /*.lo,$(otherdirs)))
256
257# The next set of variable definitions are special to this file and not
258# hooks into `makefile-common-actions.mk'.  The values depend in part on
259# Java conventions and the output of SWIG.
260
261outdir      = java-files
262pkg_path    = $(subst .,/,$(java_package))
263outpath     = $(outdir)/$(pkg_path)
264java_files  = $(wildcard $(outpath)/*.java)
265class_files = $(java_files:.java=.class)
266
267# The libSBML Java API library on MacOS X has to be built as a "bundle"
268# rather than a .dylib library.  This is different from the default rules
269# used elsewhere in libSBML and requires the following special value for
270# `platform_link_flags'.  The rest of the default rules for .so's will
271# behave properly once this is set.
272
273ifeq "$(HOST_TYPE)" "darwin"
274  platform_link_flags = -bundle
275endif
276
277# Files for test system.
278
279test_dir       = test
280test_src_path  = test/org/sbml/libsbml/test
281check_sources  = AutoTestRunner.java $(wildcard $(test_src_path)/**/Test*.java)
282
283# `distfiles' determines the files and directories included in a
284# distribution.  The strategy here is that we include the output of SWIG
285# (both libsbml_wrap.cpp and the java files) but not the compiled class
286# files.
287
288distfiles = Makefile.in                \
289            Manifest.txt.in            \
290            CMakeLists.txt             \
291            compile-native-files.cmake \
292            swig-binding.cmake.in      \
293            TestPrintVersion.java      \
294            $(check_sources)           \
295            $(extra_sources)           \
296            $(java_files)              \
297            $(sources)
298
299# `extra_clean' and `extra_distclean' determine the files and directories
300# removed during "make clean" and "make distclean".
301
302extra_clean = $(class_files) $(check_sources:.java=.class) test_copy1.xml \
303  test_write.xml TestFilenameFilter.class $(wildcard test.xml.*) out.xml
304
305extra_distclean = Manifest.txt local-downcast-extension.i \
306    local-downcast-namespaces.i local-packages.i javadoc.i
307
308# For Linux/Unix, LD_LIBRARY_PATH *may* need to contain one or more library
309# paths to libsbml.so, libxerces-c.so and/or libexpat.so and/or the
310# libsbml.so _libsbml.so generated by this Makfile.  (For BSD/MacOS X
311# replace LD_LIBRARY_PATH with DYLD_LIBRARY_PATH.)
312
313
314# -----------------------------------------------------------------------------
315# Primary build actions
316# -----------------------------------------------------------------------------
317
318# This whole setup is more or less custom and mostly doesn't use the common
319# build directives of `makefile-common-actions.mk'.
320
321.SUFFIXES:
322.SUFFIXES: .i .cpp .h .java .class .jar .o .obj .so .dylib .lo .la
323
324# The default action is to remake everything.
325
326ifdef USE_JAVA
327  all: Makefile libsbml_wrap.cpp $(outpath)/libsbml.class $(libraries)
328else
329  all:
330	@echo
331	@echo "Reconfigure libSBML using --with-java to enable Java support.";
332	@echo
333	@exit 1
334endif
335
336# Rummage through ../swig/libsbml.i to figure out the core libSBML files that
337# are our dependencies.
338
339main_sources = \
340  $(shell grep '%include sbml' ../swig/libsbml.i | grep -v 'libsbml-version.h' \
341    | cut -f2- -d'/' | sed -e 's,^,../../sbml/,g')
342
343# Recreate SWIG files when one of the following conditions is true:
344#
345#  (1) libsbml_wrap.cpp does not exist
346#  (2) libsbml_wrap.cpp exists, but the file is not consistent with the
347#       current USE_LAYOUT, USE_COMP, etc., values.
348#
349# If the last run was made with a package flag like --enable-layout, and this
350# run isn't, or vice-versa, the swig wrap files will be wrong for this run.
351# However, you can't tell just by looking at file mod times, so you can't use
352# normal make dependencies.  So we do this grungy trick of looking inside
353# libsbml_wrap.cpp to see what's inside.
354#
355# The check_foo macros works as follows.  They return a non-empty string
356# "do_reswig" if re-swig'ing is called for, and this string is a phony make
357# target declared below.  When check_layout is used as a dependency of
358# libsbml_wrap.cpp via a call like this,
359#
360#  libsbml_wrap.cpp: $(shell $(call check_layout)) ...other dependencies...
361#   ...ACTIONS...
362#
363# what will happen is either check_layout will return nothing, in which
364# case the dependency is satisfied and no swig'ing needs to be done, or
365# it will return "do_reswig", a phony target that is never satisfied,
366# in which case the ...ACTIONS... will be executed.
367
368.PHONY: do_reswig
369
370ifdef USE_COMP
371  define check_comp
372    if test ! -f libsbml_wrap.cpp; then echo "do_reswig"; exit; fi; \
373    if test -z "`grep getListOfSubmodels libsbml_wrap.cpp`"; then echo "do_reswig"; fi;
374  endef
375else
376  define check_comp
377    if test ! -f libsbml_wrap.cpp; then echo "do_reswig"; exit; fi; \
378    if test -n "`grep getListOfSubmodels libsbml_wrap.cpp`"; then echo "do_reswig"; fi;
379  endef
380endif
381
382ifdef USE_FBC
383  define check_fbc
384    if test ! -f libsbml_wrap.cpp; then echo "do_reswig"; exit; fi; \
385    if test -z "`grep ListOfFluxBounds libsbml_wrap.cpp`"; then echo "do_reswig"; fi;
386  endef
387else
388  define check_fbc
389    if test ! -f libsbml_wrap.cpp; then echo "do_reswig"; exit; fi; \
390    if test -n "`grep ListOfFluxBounds libsbml_wrap.cpp`"; then echo "do_reswig"; fi;
391  endef
392endif
393
394ifdef USE_GROUPS
395  define check_groups
396    if test ! -f libsbml_wrap.cpp; then echo "do_reswig"; exit; fi; \
397    if test -z "`grep ListOfGroups libsbml_wrap.cpp`"; then echo "do_reswig"; fi;
398  endef
399else
400  define check_groups
401    if test ! -f libsbml_wrap.cpp; then echo "do_reswig"; exit; fi; \
402    if test -n "`grep ListOfGroups libsbml_wrap.cpp`"; then echo "do_reswig"; fi;
403  endef
404endif
405
406ifdef USE_LAYOUT
407  define check_layout
408    if test ! -f libsbml_wrap.cpp; then echo "do_reswig"; exit; fi; \
409    if test -z "`grep getListOfLayouts libsbml_wrap.cpp`"; then echo "do_reswig"; fi;
410  endef
411else
412  define check_layout
413    if test ! -f libsbml_wrap.cpp; then echo "do_reswig"; exit; fi; \
414    if test -n "`grep getListOfLayouts libsbml_wrap.cpp`"; then echo "do_reswig"; fi;
415  endef
416endif
417
418ifdef USE_QUAL
419  define check_qual
420    if test ! -f libsbml_wrap.cpp; then echo "do_reswig"; exit; fi; \
421    if test -z "`grep ListOfQualitativeSpecies libsbml_wrap.cpp`"; then echo "do_reswig"; fi;
422  endef
423else
424  define check_qual
425    if test ! -f libsbml_wrap.cpp; then echo "do_reswig"; exit; fi; \
426    if test -n "`grep ListOfQualitativeSpecies libsbml_wrap.cpp`"; then echo "do_reswig"; fi;
427  endef
428endif
429ifdef USE_MULTI
430  define check_multi
431    if test ! -f libsbml_wrap.cpp; then echo "do_reswig"; exit; fi; \
432    if test -z "`grep ListOfSpeciesFeatures libsbml_wrap.cpp`"; then echo "do_reswig"; fi;
433  endef
434else
435  define check_multi
436    if test ! -f libsbml_wrap.cpp; then echo "do_reswig"; exit; fi; \
437    if test -n "`grep ListOfSpeciesFeatures libsbml_wrap.cpp`"; then echo "do_reswig"; fi;
438  endef
439endif
440ifdef USE_RENDER
441  define check_render
442    if test ! -f libsbml_wrap.cpp; then echo "do_reswig"; exit; fi; \
443    if test -z "`grep ListOfGlobalRenderInformation libsbml_wrap.cpp`"; then echo "do_reswig"; fi;
444  endef
445else
446  define check_render
447    if test ! -f libsbml_wrap.cpp; then echo "do_reswig"; exit; fi; \
448    if test -n "`grep ListOfGlobalRenderInformation libsbml_wrap.cpp`"; then echo "do_reswig"; fi;
449  endef
450endif
451ifdef USE_L3V2EXTENDEDMATH
452  define check_l3v2extendedmath
453    if test ! -f libsbml_wrap.cpp; then echo "do_reswig"; exit; fi;
454  endef
455else
456  define check_l3v2extendedmath
457    if test ! -f libsbml_wrap.cpp; then echo "do_reswig"; exit; fi;
458  endef
459endif
460
461
462# Generate the documentation files.
463#
464# javadoc-extras.i contain manually-written javadoc additions that are appended
465# to the javadoc.i file created by our swigdoc.py.  It contains things that are
466# Java-specific (thus, don't belong in libsbml.i) and don't need to be
467# processed by swigdoc.py.
468
469javadoc.i: $(main_sources) $(swig_sources) ../swig/swigdoc.py $(wildcard ../swig/*.i)
470	touch ../../../docs/src/libsbml-converters.txt && ../swig/swigdoc.py --language java --top ../../.. $(SWIGDOCDEFINES) \
471		--extra ../../../docs/src/libsbml-converters.txt \
472		--master ../swig/libsbml.i --output javadoc.i
473
474# libsbml_wrap.cpp is a stand-in for the .java files.  Its creation results
475# in the creation of the .java files too -- both are made by running swig.
476
477libsbml_wrap.cpp $(outpath): javadoc.i $(swig_sources) $(main_sources) \
478    $(shell $(call check_comp)) $(shell $(call check_fbc)) \
479    $(shell $(call check_layout)) $(shell $(call check_qual)) \
480    $(shell $(call check_groups)) $(shell $(call check_multi))
481	@top_srcdir@/config/chk_swig_version.sh || exit
482ifneq "$(MAKEFLAGS)" ""
483	$(MAKE) -$(MAKEFLAGS) clean-swigfiles
484else
485	$(MAKE) clean-swigfiles
486endif
487	test -d $(outpath) || mkdir -p $(outpath)
488	"$(SWIG)" $(SWIGFLAGS) $(sort $(default_includes) $(INCLUDES)) \
489		-c++ -java -package $(java_package) \
490		-outdir $(outpath) -o libsbml_wrap.cpp libsbml.i
491
492# We use a trick involving marking methods as deprecated with the Javadoc
493# @deprecated comment directive, but unfortunately javac seems to pay
494# attention to that and thinks we're trying to use deprecated methods. We
495# used to use a "grep -v" to filter them out, but in Java 9 each warning
496# prints multiple lines and the simple grep filter doesn't work. Resorting
497# to the use of -nowarn even though this is dangerous and could mask
498# a problem.
499
500compile_command = "$(JAVAC)" $(JAVAC_OPTION) -d $(outdir) $(outpath)/*.java
501
502$(outpath)/libsbml.class: libsbml_wrap.cpp $(outpath)
503	@echo $(compile_command)
504	$(compile_command) -nowarn
505
506$(jarfile): $(outpath)/libsbml.class
507	$(CD) $(outdir) && "$(JAR)" -cvfm ../$(jarfile) ../Manifest.txt $(pkg_path)/*.class
508
509# Force removal of the java-files directory.
510
511clean-swigfiles: clean-generic clean-libtool clean-extras
512	-rm -rf $(outdir) libsbml_wrap.cpp
513
514
515# -----------------------------------------------------------------------------
516# Checking.
517# -----------------------------------------------------------------------------
518
519check_classes = $(check_sources:.java=.class)
520
521ifeq "$(HOST_TYPE)" "cygwin"
522  classpath = $(shell cygpath -wp $(jarfile):$(TOP_BUILDDIR)/src:$(test_dir):.)
523  CPPFLAGS += -DNOMINMAX
524else
525  classpath = $(jarfile):$(TOP_BUILDDIR)/src:$(test_dir):.
526endif
527
528# See the note above regarding the Javadoc @deprecated comment and the
529# reason for the following contortion.
530
531check_compile_command = "$(JAVAC)" $(JAVAC_OPTION) -g -classpath "$(classpath)" $(check_sources)
532
533$(check_classes): Makefile $(libraries) $(check_sources)
534	@echo $(check_compile_command)
535	$(shell $(check_compile_command) 2>&1 | grep -v deprecat)
536
537ifeq "$(HOST_TYPE)" "darwin"
538  define runjavatest
539    env DYLD_LIBRARY_PATH="$(RUN_LDPATH):$(DYLD_LIBRARY_PATH):." "$(JAVA)" -classpath "$(classpath)" AutoTestRunner
540  endef
541else
542  define runjavatest
543    env LD_LIBRARY_PATH="$(RUN_LDPATH):$(LD_LIBRARY_PATH):." "$(JAVA)" -Djava.library.path=. -classpath "$(classpath)" AutoTestRunner
544  endef
545endif
546
547# 2010-07-05 <mhucka@caltech.edu> For some reason, I can't get runjavatest
548# or the previous version of it to work in my environment anymore.  I'm
549# switching to a straight invocation of java.
550
551check: $(check_classes) $(shell $(call check_layout)) \
552  $(shell $(call check_comp))  $(shell $(call check_fbc)) \
553  $(shell $(call check_qual)) $(shell $(call check_groups)) \
554  $(shell $(call check_multi)) $(shell $(call check_render)) \
555  $(shell $(call check_l3v2extendedmath))
556	@echo
557	@echo
558	@echo Running Tests in $(thisdir)
559	@echo -----------------------------------------------------------------
560	$(runjavatest)
561	@echo -----------------------------------------------------------------
562	@echo
563
564#
565# 'make test-files' will reconstruct the test files.  This is not made part
566# of 'make check' (yet).
567#
568
569test-files:
570	$(call test_translator,j,xml math annotation sbml,test/org/sbml/libsbml/test)
571
572
573# -----------------------------------------------------------------------------
574# Tags.
575# -----------------------------------------------------------------------------
576
577tags: etags ctags
578
579
580
581# -----------------------------------------------------------------------------
582# Installation.
583# -----------------------------------------------------------------------------
584
585JNI_INSTPATH=$(DESTDIR)$(LIBDIR)/$(jnifile)
586JAR_INSTPATH=$(DESTDIR)$(DATADIR)/java/$(jarfile)
587
588install: $(libraries) $(shell $(call check_layout)) \
589  $(shell $(call check_comp)) $(shell $(call check_fbc)) \
590  $(shell $(call check_qual)) $(shell $(call check_groups))
591	$(INSTALL_SH) $(jnifile) $(JNI_INSTPATH)
592	$(INSTALL_SH) $(jarfile) $(JAR_INSTPATH)
593
594uninstall:
595	@list='$(JNI_INSTPATH) $(JAR_INSTPATH)'; for lib in $$list; do \
596	  if test -f "$$lib"; then \
597	    echo rm "$$lib"; \
598	    rm $$lib; \
599	  fi; \
600	done;
601
602installcheck:
603
604
605
606# -----------------------------------------------------------------------------
607# Creating distribution (for libSBML maintainers only)
608# -----------------------------------------------------------------------------
609
610dist: libsbml_wrap.cpp $(outdir) dist-normal
611
612distcheck: distcheck-normal
613
614
615
616# -----------------------------------------------------------------------------
617# Miscellaneous
618# -----------------------------------------------------------------------------
619
620include @top_srcdir@/config/makefile-common-actions.mk
621
622
623
624# -----------------------------------------------------------------------------
625# End.
626# -----------------------------------------------------------------------------
627