File: Makefile.in

package info (click to toggle)
libsbml 5.10.0+dfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 141,800 kB
  • ctags: 98,793
  • sloc: cpp: 804,405; xml: 206,907; ansic: 66,144; cs: 52,916; java: 25,093; python: 23,449; sh: 9,847; perl: 8,414; makefile: 7,580; ruby: 4,760; csh: 3
file content (317 lines) | stat: -rw-r--r-- 10,833 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
## @configure_input@
##
## \file    Makefile.in
## \brief   Makefile template for libsbml MATLAB bindings
## \author  SBML Team <sbml-team@caltech.edu>
##
## <!--------------------------------------------------------------------------
## This file is part of libSBML.  Please visit http://sbml.org for more
## information about SBML, and the latest version of libSBML.
##
## Copyright (C) 2013-2014 jointly by the following organizations:
##     1. California Institute of Technology, Pasadena, CA, USA
##     2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK
##     3. University of Heidelberg, Heidelberg, Germany
##
## Copyright (C) 2009-2013 jointly by the following organizations:
##     1. California Institute of Technology, Pasadena, CA, USA
##     2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK
##
## Copyright (C) 2006-2008 by the California Institute of Technology,
##     Pasadena, CA, USA
##
## Copyright (C) 2002-2005 jointly by the following organizations:
##     1. California Institute of Technology, Pasadena, CA, USA
##     2. Japan Science and Technology Agency, Japan
##
## This library is free software; you can redistribute it and/or modify it
## under the terms of the GNU Lesser General Public License as published by
## the Free Software Foundation.  A copy of the license agreement is provided
## in the file named "LICENSE.txt" included with this software distribution
## and also available online as http://sbml.org/software/libsbml/license.html
## ------------------------------------------------------------------------ -->


# -----------------------------------------------------------------------------
# Configuration variables
# -----------------------------------------------------------------------------
# Some of the following are substituted automatically by `configure'.  If
# you are looking at "Makefile", do not edit these values; instead, run the
# configure script at the top level of the src tree.  It will recreate
# "Makefile".

include @top_srcdir@/config/makefile-common-vars.mk

# `srcdir' points to the current directory, but should be set by configure.
# `subdir' must be set manually to the relative dir under srcdir.  Don't
# set `subdir' to an absolute path, or some make actions will fail.

srcdir  = @srcdir@
thisdir = src/bindings/matlab

sources = TranslateSBML.c OutputSBML.c

subdirs = test

# `distfiles' determines the files and directories included in a distribution.
# `distfiles_exclude' is used to filter out specific items, so that even if
# they appear in `distfiles', they will not be copied in the distribution.

distfiles =                      \
        AUTHORS.txt              \
        CMakeLists.txt           \
        CheckAndConvert.m        \
        Contents.m               \
        ConvertFormulaToMathML.m \
        FindMatlab.cmake         \
        Makefile.in              \
        OutputSBML.c             \
        OutputSBML.m             \
        README.txt               \
        TranslateSBML.c          \
        TranslateSBML.m          \
        buildSBML.m              \
        isSBML_Model.m           \
        installSBML.m            \
        isoctave.m               \
        matlab-tags-regexp.txt   \
        mexopts-R2009-2010.sh          \
        test.xml                 \
        test/CMakeLists.txt

# `extra_clean' and `extra_distclean' determine the files and directories
# removed during "make clean" and "make distclean".

possible_mexext := mexmaci64 mexmaci mexglx mexa64

binaries := $(addprefix TranslateSBML.,$(possible_mexext)) \
	    $(addprefix OutputSBML.,$(possible_mexext))

extra_clean := $(binaries) runTests.log

extra_distclean = Makefile


# -----------------------------------------------------------------------------
# Primary build actions
# -----------------------------------------------------------------------------

matlab_args := -nosplash -nodesktop -nojvm

# Figure out the mex extension for this  system.  Nasty bit of business, this.
#
# We can't rely on finding or using Matlab's own "mexext" shell script,
# because I've seen it report the wrong architecture on some combinatinos
# of OS and Matlab version.  Need to ask Matlab itself, because Matlab is what
# we will ultimately use to invoke 'mex'.
#
# The business with fprintf(2...) is because matlab buffers the output of
# stdout and sometimes doesn't print it if you just do 'mexext; quit'.
# So we force it to print to stderr, which is unbuffered. The grep call is
# there to get rid of everything except the string we're looking for, and
# the tr is there because sometimes matlab prints the prompt in front of
# the output.
#
# Don't bother setting this variable if all we're doing is a "make clean".

ifeq (,$(findstring clean,$(MAKECMDGOALS)))
  empty        :=
  space        := $(empty) $(empty)
  mexext_regex := $(subst $(space),|,$(possible_mexext))
  ifeq ($(origin mexext), undefined)
	mexext := $(shell $(MATLAB) $(matlab_args) -r "fprintf(2, '%s\n', mexext); quit" 2>&1 | grep -vi 'warning' | egrep '($(mexext_regex))' | tr -d '> ')
  endif
endif

all: Makefile
ifeq "$(mexext)" ""
	@echo
	@echo "Failed to determine the mex extension. This can happen if MATLAB cannot be";
	@echo "started. (This can be caused by license issues or a missing VPN connection.)";
	@echo "Please start MATLAB manually and run buildSBML.m (in src/bindings/matlab).";
	@echo
	@exit 1
endif
ifneq "$(MAKEFLAGS)" ""
	$(MAKE) -$(MAKEFLAGS) mexext=$(mexext) TranslateSBML.$(mexext) OutputSBML.$(mexext)
else
	$(MAKE) mexext=$(mexext) TranslateSBML.$(mexext) OutputSBML.$(mexext)
endif

# Run the compilation using libtool and setting CFLAGS.  Not sure if this
# is really necessary, but it seems prudent.

define matlabrun
  env CFLAGS="$(shell dpkg-buildflags --get CFLAGS)" srcdir=. \
    $(LIBTOOL) -dlopen $(TOP_BUILDDIR)/src/libsbml.la --mode=execute $(1)
endef

# In the pattern rule below, we can't use $(mexext) because it's not set at
# the time this file is parsed -- it's only set when the variable is
# referenced.  If you attempt to use it in the left-hand side of the rule
# below, it will be empty, and it won't work.  Kludgy solution: use every
# possible mex extension to define this rule.

here = $(shell /bin/pwd)

$(addprefix %.,$(possible_mexext)): %.c
	$(call matlabrun,$(MATLAB) $(matlab_args) -r "cd ('$(here)'); buildSBML; quit")


# -----------------------------------------------------------------------------
# Tags.
# -----------------------------------------------------------------------------

matlab-tags-extra-flags = *.c --lang=none --regex=@matlab-tags-regexp.txt *.m

etags-command := $(ETAGS) $(ETAGSFLAGS) $(matlab-tags-extra-flags)
ctags-command := $(CTAGS) $(CTAGSFLAGS) $(matlab-tags-extra-flags)

tags: etags ctags


# -----------------------------------------------------------------------------
# Targets for checking/testing.
# -----------------------------------------------------------------------------

check: all check-recursive


# -----------------------------------------------------------------------------
# Installation.
# -----------------------------------------------------------------------------

install: all install-translatesbml install-outputsbml                  \
	 install-checkandconvert install-isoctave install-issbmlmodel      \
	 install-convertformula install-m-contents install-m-translatesbml \
	 install-m-outputsbml install-m-installsbml

installdirs:

uninstall: uninstall-translatesbml uninstall-outputsbml                        \
	   uninstall-checkandconvert uninstall-isoctave uninstall-issbmlmodel      \
	   uninstall-convertformula uninstall-m-contents uninstall-m-translatesbml \
	   uninstall-m-outputsbml uninstall-m-installsbml

install-translatesbml:
	$(INSTALL_SH) -m 644 TranslateSBML.$(mexext) "$(DESTDIR)$(LIBDIR)"

uninstall-translatesbml:
	@target="$(DESTDIR)$(LIBDIR)/TranslateSBML.$(mexext)"; \
	if test -f $$target ; then \
	  echo rm $$target; \
	  rm $$target; \
	fi;

install-outputsbml:
	$(INSTALL_SH) -m 644 OutputSBML.$(mexext) "$(DESTDIR)$(LIBDIR)"

uninstall-outputsbml:
	@target="$(DESTDIR)$(LIBDIR)/OutputSBML.$(mexext)"; \
	if test -f $$target ; then \
	  echo rm $$target; \
	  rm $$target; \
	fi;

install-m-installsbml:
	$(INSTALL_SH) -m 644 installSBML.m "$(DESTDIR)$(LIBDIR)"

uninstall-m-installsbml:
	@target="$(DESTDIR)$(LIBDIR)/installSBML.m"; \
	if test -f $$target ; then \
	  echo rm $$target; \
	  rm $$target; \
	fi;

install-m-outputsbml:
	$(INSTALL_SH) -m 644 OutputSBML.m "$(DESTDIR)$(LIBDIR)"

uninstall-m-outputsbml:
	@target="$(DESTDIR)$(LIBDIR)/OutputSBML.m"; \
	if test -f $$target ; then \
	  echo rm $$target; \
	  rm $$target; \
	fi;

install-m-translatesbml:
	$(INSTALL_SH) -m 644 TranslateSBML.m "$(DESTDIR)$(LIBDIR)"

uninstall-m-translatesbml:
	@target="$(DESTDIR)$(LIBDIR)/TranslateSBML.m"; \
	if test -f $$target ; then \
	  echo rm $$target; \
	  rm $$target; \
	fi;

install-m-contents:
	$(INSTALL_SH) -m 644 Contents.m "$(DESTDIR)$(LIBDIR)"

uninstall-m-contents:
	@target="$(DESTDIR)$(LIBDIR)/Contents.m"; \
	if test -f $$target ; then \
	  echo rm $$target; \
	  rm $$target; \
	fi;

install-checkandconvert:
	$(INSTALL_SH) -m 644 CheckAndConvert.m "$(DESTDIR)$(LIBDIR)"

uninstall-checkandconvert:
	@target="$(DESTDIR)$(LIBDIR)/CheckAndConvert.m"; \
	if test -f $$target ; then \
	  echo rm $$target; \
	  rm $$target; \
	fi;

install-isoctave:
	$(INSTALL_SH) -m 644 isoctave.m "$(DESTDIR)$(LIBDIR)"

uninstall-isoctave:
	@target="$(DESTDIR)$(LIBDIR)/isoctave.m"; \
	if test -f $$target ; then \
	  echo rm $$target; \
	  rm $$target; \
	fi;

install-issbmlmodel:
	$(INSTALL_SH) -m 644 isSBML_Model.m "$(DESTDIR)$(LIBDIR)"

uninstall-issbmlmodel:
	@target="$(DESTDIR)$(LIBDIR)/isSBML_Model.m"; \
	if test -f $$target ; then \
	  echo rm $$target; \
	  rm $$target; \
	fi;

install-convertformula:
	$(INSTALL_SH) -m 644 ConvertFormulaToMathML.m "$(DESTDIR)$(LIBDIR)"

uninstall-convertformula:
	@target="$(DESTDIR)$(LIBDIR)/ConvertFormulaToMathML.m"; \
	if test -f $$target ; then \
	  echo rm $$target; \
	  rm $$target; \
	fi;



# -----------------------------------------------------------------------------
# Creating distribution (for libSBML maintainers only)
# -----------------------------------------------------------------------------

dist: dist-normal dist-recursive

distcheck: all distcheck-normal distcheck-recursive


# -----------------------------------------------------------------------------
# Miscellaneous
# -----------------------------------------------------------------------------

include @top_srcdir@/config/makefile-common-actions.mk


# -----------------------------------------------------------------------------
# End.
# -----------------------------------------------------------------------------