annotate Makefile.am @ 331:cee203ea6245

Rename oct-py-util.cc from pytave_utils.cc * oct-py-util.cc, oct-py-util.h: Rename and reindent contents. * Makefile.am (COMMON_SOURCE_FILES, PYTAVE_HEADER_FILES): Update to use new names. * pycall.cc, pyeval.cc, pyexec.cc, python_to_octave.cc: Include "oct-py-util.h".
author Mike Miller <mtmiller@octave.org>
date Mon, 15 Aug 2016 13:16:35 -0700
parents c2aa34730dc9
children 9b862844e6b7
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
149
6d9b4f69da66 Clean up build system functionality and style
Mike Miller <mtmiller@octave.org>
parents: 148
diff changeset
1 # Makefile for Pytave
6d9b4f69da66 Clean up build system functionality and style
Mike Miller <mtmiller@octave.org>
parents: 148
diff changeset
2 #
150
a3dc9d24ae38 maint: Add myself to copyright notices
Mike Miller <mtmiller@octave.org>
parents: 149
diff changeset
3 # Copyright (C) 2015-2016 Mike Miller
149
6d9b4f69da66 Clean up build system functionality and style
Mike Miller <mtmiller@octave.org>
parents: 148
diff changeset
4 # Copyright (C) 2008 David Grundberg, HÃ¥kan Fors Nilsson
6d9b4f69da66 Clean up build system functionality and style
Mike Miller <mtmiller@octave.org>
parents: 148
diff changeset
5 # Copyright (C) 2009 Jaroslav Hajek, VZLU Prague
6d9b4f69da66 Clean up build system functionality and style
Mike Miller <mtmiller@octave.org>
parents: 148
diff changeset
6 #
6d9b4f69da66 Clean up build system functionality and style
Mike Miller <mtmiller@octave.org>
parents: 148
diff changeset
7 # This file is part of Pytave.
6d9b4f69da66 Clean up build system functionality and style
Mike Miller <mtmiller@octave.org>
parents: 148
diff changeset
8 #
6d9b4f69da66 Clean up build system functionality and style
Mike Miller <mtmiller@octave.org>
parents: 148
diff changeset
9 # Pytave is free software: you can redistribute it and/or modify it
6d9b4f69da66 Clean up build system functionality and style
Mike Miller <mtmiller@octave.org>
parents: 148
diff changeset
10 # under the terms of the GNU General Public License as published by the
6d9b4f69da66 Clean up build system functionality and style
Mike Miller <mtmiller@octave.org>
parents: 148
diff changeset
11 # Free Software Foundation, either version 3 of the License, or (at your
6d9b4f69da66 Clean up build system functionality and style
Mike Miller <mtmiller@octave.org>
parents: 148
diff changeset
12 # option) any later version.
6d9b4f69da66 Clean up build system functionality and style
Mike Miller <mtmiller@octave.org>
parents: 148
diff changeset
13 #
6d9b4f69da66 Clean up build system functionality and style
Mike Miller <mtmiller@octave.org>
parents: 148
diff changeset
14 # Pytave is distributed in the hope that it will be useful, but WITHOUT
6d9b4f69da66 Clean up build system functionality and style
Mike Miller <mtmiller@octave.org>
parents: 148
diff changeset
15 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
6d9b4f69da66 Clean up build system functionality and style
Mike Miller <mtmiller@octave.org>
parents: 148
diff changeset
16 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
6d9b4f69da66 Clean up build system functionality and style
Mike Miller <mtmiller@octave.org>
parents: 148
diff changeset
17 # for more details.
6d9b4f69da66 Clean up build system functionality and style
Mike Miller <mtmiller@octave.org>
parents: 148
diff changeset
18 #
6d9b4f69da66 Clean up build system functionality and style
Mike Miller <mtmiller@octave.org>
parents: 148
diff changeset
19 # You should have received a copy of the GNU General Public License
6d9b4f69da66 Clean up build system functionality and style
Mike Miller <mtmiller@octave.org>
parents: 148
diff changeset
20 # along with Pytave; see the file COPYING. If not, see
6d9b4f69da66 Clean up build system functionality and style
Mike Miller <mtmiller@octave.org>
parents: 148
diff changeset
21 # <http://www.gnu.org/licenses/>.
6d9b4f69da66 Clean up build system functionality and style
Mike Miller <mtmiller@octave.org>
parents: 148
diff changeset
22
0
4da14cce0890 First launchpad.net check in.
David Grundberg <c04dgg@cs.umu.se>
parents:
diff changeset
23 ACLOCAL_AMFLAGS = -I m4
4da14cce0890 First launchpad.net check in.
David Grundberg <c04dgg@cs.umu.se>
parents:
diff changeset
24
149
6d9b4f69da66 Clean up build system functionality and style
Mike Miller <mtmiller@octave.org>
parents: 148
diff changeset
25 AM_CPPFLAGS = $(OCTAVE_CPPFLAGS) $(PYTHON_CPPFLAGS) -I$(NUMPY_INCLUDEDIR)
0
4da14cce0890 First launchpad.net check in.
David Grundberg <c04dgg@cs.umu.se>
parents:
diff changeset
26
311
77af526c687a build: ensure project config.h is included properly
Mike Miller <mtmiller@octave.org>
parents: 306
diff changeset
27 INCFLAGS = $(DEFAULT_INCLUDES)
77af526c687a build: ensure project config.h is included properly
Mike Miller <mtmiller@octave.org>
parents: 306
diff changeset
28 export INCFLAGS
77af526c687a build: ensure project config.h is included properly
Mike Miller <mtmiller@octave.org>
parents: 306
diff changeset
29
149
6d9b4f69da66 Clean up build system functionality and style
Mike Miller <mtmiller@octave.org>
parents: 148
diff changeset
30 COMMON_SOURCE_FILES = \
6d9b4f69da66 Clean up build system functionality and style
Mike Miller <mtmiller@octave.org>
parents: 148
diff changeset
31 exceptions.cc \
6d9b4f69da66 Clean up build system functionality and style
Mike Miller <mtmiller@octave.org>
parents: 148
diff changeset
32 octave_to_python.cc \
320
c2aa34730dc9 Convert scalar struct into Python dict (fixes issue #57)
Mike Miller <mtmiller@octave.org>
parents: 311
diff changeset
33 oct-py-types.cc \
331
cee203ea6245 Rename oct-py-util.cc from pytave_utils.cc
Mike Miller <mtmiller@octave.org>
parents: 320
diff changeset
34 oct-py-util.cc \
cee203ea6245 Rename oct-py-util.cc from pytave_utils.cc
Mike Miller <mtmiller@octave.org>
parents: 320
diff changeset
35 python_to_octave.cc
149
6d9b4f69da66 Clean up build system functionality and style
Mike Miller <mtmiller@octave.org>
parents: 148
diff changeset
36
159
a323f9fae46b doc: Reformat INSTALL and README in Markdown
Mike Miller <mtmiller@octave.org>
parents: 150
diff changeset
37 DOC_FILES = \
a323f9fae46b doc: Reformat INSTALL and README in Markdown
Mike Miller <mtmiller@octave.org>
parents: 150
diff changeset
38 INSTALL.md \
a323f9fae46b doc: Reformat INSTALL and README in Markdown
Mike Miller <mtmiller@octave.org>
parents: 150
diff changeset
39 README.md
a323f9fae46b doc: Reformat INSTALL and README in Markdown
Mike Miller <mtmiller@octave.org>
parents: 150
diff changeset
40
149
6d9b4f69da66 Clean up build system functionality and style
Mike Miller <mtmiller@octave.org>
parents: 148
diff changeset
41 OCT_FILES = \
172
29d9da90afcf pycall: New function to pass Octave values to a Python function
Mike Miller <mtmiller@octave.org>
parents: 168
diff changeset
42 pycall.oct \
161
dfea7eee7749 add pyexec and pyeval commands
Colin Macdonald <cbm@m.fsf.org>
parents: 159
diff changeset
43 pyeval.oct \
dfea7eee7749 add pyexec and pyeval commands
Colin Macdonald <cbm@m.fsf.org>
parents: 159
diff changeset
44 pyexec.oct
149
6d9b4f69da66 Clean up build system functionality and style
Mike Miller <mtmiller@octave.org>
parents: 148
diff changeset
45
188
4adc5d020dda build: fix automake warning about variable naming conflict
Mike Miller <mtmiller@octave.org>
parents: 172
diff changeset
46 OCT_SOURCE_FILES = $(patsubst %.oct, %.cc, $(OCT_FILES))
168
f687155dcb7c build: allow dist and distcheck targets to work
Mike Miller <mtmiller@octave.org>
parents: 165
diff changeset
47
149
6d9b4f69da66 Clean up build system functionality and style
Mike Miller <mtmiller@octave.org>
parents: 148
diff changeset
48 PYTAVE_HEADER_FILES = \
6d9b4f69da66 Clean up build system functionality and style
Mike Miller <mtmiller@octave.org>
parents: 148
diff changeset
49 arrayobjectdefs.h \
6d9b4f69da66 Clean up build system functionality and style
Mike Miller <mtmiller@octave.org>
parents: 148
diff changeset
50 config.h \
6d9b4f69da66 Clean up build system functionality and style
Mike Miller <mtmiller@octave.org>
parents: 148
diff changeset
51 exceptions.h \
320
c2aa34730dc9 Convert scalar struct into Python dict (fixes issue #57)
Mike Miller <mtmiller@octave.org>
parents: 311
diff changeset
52 oct-py-types.h \
331
cee203ea6245 Rename oct-py-util.cc from pytave_utils.cc
Mike Miller <mtmiller@octave.org>
parents: 320
diff changeset
53 oct-py-util.h \
149
6d9b4f69da66 Clean up build system functionality and style
Mike Miller <mtmiller@octave.org>
parents: 148
diff changeset
54 octave_to_python.h \
331
cee203ea6245 Rename oct-py-util.cc from pytave_utils.cc
Mike Miller <mtmiller@octave.org>
parents: 320
diff changeset
55 python_to_octave.h
0
4da14cce0890 First launchpad.net check in.
David Grundberg <c04dgg@cs.umu.se>
parents:
diff changeset
56
149
6d9b4f69da66 Clean up build system functionality and style
Mike Miller <mtmiller@octave.org>
parents: 148
diff changeset
57 PY_FILES = \
6d9b4f69da66 Clean up build system functionality and style
Mike Miller <mtmiller@octave.org>
parents: 148
diff changeset
58 package/__init__.py \
6d9b4f69da66 Clean up build system functionality and style
Mike Miller <mtmiller@octave.org>
parents: 148
diff changeset
59 package/pytave.py \
6d9b4f69da66 Clean up build system functionality and style
Mike Miller <mtmiller@octave.org>
parents: 148
diff changeset
60 test/exceptions.py \
6d9b4f69da66 Clean up build system functionality and style
Mike Miller <mtmiller@octave.org>
parents: 148
diff changeset
61 test/test.py
6d9b4f69da66 Clean up build system functionality and style
Mike Miller <mtmiller@octave.org>
parents: 148
diff changeset
62
188
4adc5d020dda build: fix automake warning about variable naming conflict
Mike Miller <mtmiller@octave.org>
parents: 172
diff changeset
63 EXTRA_DIST = $(DOC_FILES) $(OCT_SOURCE_FILES) $(PY_FILES)
149
6d9b4f69da66 Clean up build system functionality and style
Mike Miller <mtmiller@octave.org>
parents: 148
diff changeset
64
6d9b4f69da66 Clean up build system functionality and style
Mike Miller <mtmiller@octave.org>
parents: 148
diff changeset
65 EXTRA_libdir = $(PYTAVE_MODULE_INSTALL_PATH)
6d9b4f69da66 Clean up build system functionality and style
Mike Miller <mtmiller@octave.org>
parents: 148
diff changeset
66 EXTRA_lib_LTLIBRARIES = _pytave.la
6d9b4f69da66 Clean up build system functionality and style
Mike Miller <mtmiller@octave.org>
parents: 148
diff changeset
67
6d9b4f69da66 Clean up build system functionality and style
Mike Miller <mtmiller@octave.org>
parents: 148
diff changeset
68 _pytave_la_CPPFLAGS = $(AM_CPPFLAGS)
6d9b4f69da66 Clean up build system functionality and style
Mike Miller <mtmiller@octave.org>
parents: 148
diff changeset
69 _pytave_la_LDFLAGS = -module -L$(OCTAVE_LIBRARYDIR)
164
bc4f2e6f7b69 build: Allow parallel building of oct files by using an intermediate library
Mike Miller <mtmiller@octave.org>
parents: 161
diff changeset
70 _pytave_la_LIBADD = libpytave.la -l$(BOOST_PYTHON_LIB) $(OCTAVE_LIBS)
bc4f2e6f7b69 build: Allow parallel building of oct files by using an intermediate library
Mike Miller <mtmiller@octave.org>
parents: 161
diff changeset
71 _pytave_la_SOURCES = pytave.cc
bc4f2e6f7b69 build: Allow parallel building of oct files by using an intermediate library
Mike Miller <mtmiller@octave.org>
parents: 161
diff changeset
72
bc4f2e6f7b69 build: Allow parallel building of oct files by using an intermediate library
Mike Miller <mtmiller@octave.org>
parents: 161
diff changeset
73 noinst_LTLIBRARIES = libpytave.la
bc4f2e6f7b69 build: Allow parallel building of oct files by using an intermediate library
Mike Miller <mtmiller@octave.org>
parents: 161
diff changeset
74 libpytave_la_CPPFLAGS = $(AM_CPPFLAGS)
bc4f2e6f7b69 build: Allow parallel building of oct files by using an intermediate library
Mike Miller <mtmiller@octave.org>
parents: 161
diff changeset
75 libpytave_la_SOURCES = $(COMMON_SOURCE_FILES) $(PYTAVE_HEADER_FILES)
149
6d9b4f69da66 Clean up build system functionality and style
Mike Miller <mtmiller@octave.org>
parents: 148
diff changeset
76
6d9b4f69da66 Clean up build system functionality and style
Mike Miller <mtmiller@octave.org>
parents: 148
diff changeset
77 CLEANFILES = *.oct
6d9b4f69da66 Clean up build system functionality and style
Mike Miller <mtmiller@octave.org>
parents: 148
diff changeset
78 SUFFIXES = .oct
115
00d19f71c9ca Initial implementation of py oct-file
Mike Miller <mtmiller@octave.org>
parents: 104
diff changeset
79
138
8b9b31acf632 build: Apply silent rules to mkoctfile
Mike Miller <mtmiller@octave.org>
parents: 137
diff changeset
80 AM_V_MKOCTFILE = $(am__v_MKOCTFILE_$(V))
8b9b31acf632 build: Apply silent rules to mkoctfile
Mike Miller <mtmiller@octave.org>
parents: 137
diff changeset
81 am__v_MKOCTFILE_ = $(am__v_MKOCTFILE_$(AM_DEFAULT_VERBOSITY))
8b9b31acf632 build: Apply silent rules to mkoctfile
Mike Miller <mtmiller@octave.org>
parents: 137
diff changeset
82 am__v_MKOCTFILE_0 = @echo " MKOCTFIL" $@;
8b9b31acf632 build: Apply silent rules to mkoctfile
Mike Miller <mtmiller@octave.org>
parents: 137
diff changeset
83 am__v_MKOCTFILE_1 =
8b9b31acf632 build: Apply silent rules to mkoctfile
Mike Miller <mtmiller@octave.org>
parents: 137
diff changeset
84
164
bc4f2e6f7b69 build: Allow parallel building of oct files by using an intermediate library
Mike Miller <mtmiller@octave.org>
parents: 161
diff changeset
85 OCT_LIBS = libpytave.la -l$(BOOST_PYTHON_LIB) $(PYTHON_LIBS)
bc4f2e6f7b69 build: Allow parallel building of oct files by using an intermediate library
Mike Miller <mtmiller@octave.org>
parents: 161
diff changeset
86 OCT_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
bc4f2e6f7b69 build: Allow parallel building of oct files by using an intermediate library
Mike Miller <mtmiller@octave.org>
parents: 161
diff changeset
87 --mode=link $(MKOCTFILE) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
149
6d9b4f69da66 Clean up build system functionality and style
Mike Miller <mtmiller@octave.org>
parents: 148
diff changeset
88 $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@
115
00d19f71c9ca Initial implementation of py oct-file
Mike Miller <mtmiller@octave.org>
parents: 104
diff changeset
89
164
bc4f2e6f7b69 build: Allow parallel building of oct files by using an intermediate library
Mike Miller <mtmiller@octave.org>
parents: 161
diff changeset
90 %.oct: %.cc libpytave.la $(PYTAVE_HEADER_FILES)
bc4f2e6f7b69 build: Allow parallel building of oct files by using an intermediate library
Mike Miller <mtmiller@octave.org>
parents: 161
diff changeset
91 $(AM_V_MKOCTFILE)$(OCT_LINK) $< $(OCT_LIBS)
115
00d19f71c9ca Initial implementation of py oct-file
Mike Miller <mtmiller@octave.org>
parents: 104
diff changeset
92
149
6d9b4f69da66 Clean up build system functionality and style
Mike Miller <mtmiller@octave.org>
parents: 148
diff changeset
93 all-local: $(OCT_FILES)
165
c0964adb41fc build: Output a hint about what to do next after a successful build
Mike Miller <mtmiller@octave.org>
parents: 164
diff changeset
94 @echo ""
c0964adb41fc build: Output a hint about what to do next after a successful build
Mike Miller <mtmiller@octave.org>
parents: 164
diff changeset
95 @echo "Pytave successfully built. Now choose from the following:"
c0964adb41fc build: Output a hint about what to do next after a successful build
Mike Miller <mtmiller@octave.org>
parents: 164
diff changeset
96 @echo ""
c0964adb41fc build: Output a hint about what to do next after a successful build
Mike Miller <mtmiller@octave.org>
parents: 164
diff changeset
97 @echo " * run the test suite"
c0964adb41fc build: Output a hint about what to do next after a successful build
Mike Miller <mtmiller@octave.org>
parents: 164
diff changeset
98 @echo " make check"
c0964adb41fc build: Output a hint about what to do next after a successful build
Mike Miller <mtmiller@octave.org>
parents: 164
diff changeset
99 @echo ""
c0964adb41fc build: Output a hint about what to do next after a successful build
Mike Miller <mtmiller@octave.org>
parents: 164
diff changeset
100 @echo " * run an Octave session with py* functions"
c0964adb41fc build: Output a hint about what to do next after a successful build
Mike Miller <mtmiller@octave.org>
parents: 164
diff changeset
101 @echo " octave --path=\"\$$(pwd)\""
c0964adb41fc build: Output a hint about what to do next after a successful build
Mike Miller <mtmiller@octave.org>
parents: 164
diff changeset
102 @echo ""
c0964adb41fc build: Output a hint about what to do next after a successful build
Mike Miller <mtmiller@octave.org>
parents: 164
diff changeset
103 @echo " * run a Python session with pytave package"
c0964adb41fc build: Output a hint about what to do next after a successful build
Mike Miller <mtmiller@octave.org>
parents: 164
diff changeset
104 @echo " PYTHONPATH=\"\$$(pwd)/.libs:\$$(pwd)/package\" python"
c0964adb41fc build: Output a hint about what to do next after a successful build
Mike Miller <mtmiller@octave.org>
parents: 164
diff changeset
105 @echo ""
148
ed2438a2d77a * Makefile.am (check-local): New target to run test scripts.
Mike Miller <mtmiller@octave.org>
parents: 138
diff changeset
106
ed2438a2d77a * Makefile.am (check-local): New target to run test scripts.
Mike Miller <mtmiller@octave.org>
parents: 138
diff changeset
107 check-local:
168
f687155dcb7c build: allow dist and distcheck targets to work
Mike Miller <mtmiller@octave.org>
parents: 165
diff changeset
108 PYTHONPATH="$(abs_srcdir)/package:$$(pwd)/package:$$(pwd)/.libs" $(PYTHON) $(srcdir)/test/exceptions.py
f687155dcb7c build: allow dist and distcheck targets to work
Mike Miller <mtmiller@octave.org>
parents: 165
diff changeset
109 PYTHONPATH="$(abs_srcdir)/package:$$(pwd)/package:$$(pwd)/.libs" $(PYTHON) $(srcdir)/test/test.py