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
|
Description: Make examples Makefile installable
This patch modifies the Makefile in examples in order to avoid them to rely
on the source package hierarchy, thus making them usable in examples in the
binary package.
Author: Nicolas Bourdaud <nicolas.bourdaud@gmail.com>
Origin: vendor
Forwarded: not-needed
Last-Update: 2012-05-28
--- a/example/Makefile
+++ b/example/Makefile
@@ -3,11 +3,9 @@
(cd eventq; make)
(cd eventq2; make)
(cd zlib; make)
- (cd fem; make)
clean:
(cd foobar; make clean)
(cd eventq; make clean)
(cd eventq2; make clean)
(cd zlib; make clean)
- (cd fem; make clean)
--- a/example/eventq/Makefile
+++ b/example/eventq/Makefile
@@ -1,5 +1,5 @@
-include ../../make.inc
-MW=../../mwrap
+MEX ?= mkoctfile --mex
+MW = mwrap
all: pmex cmex hmex
--- a/example/eventq2/Makefile
+++ b/example/eventq2/Makefile
@@ -1,5 +1,5 @@
-include ../../make.inc
-MW=../../mwrap
+MEX ?= mkoctfile --mex
+MW = mwrap
mex:
$(MW) -mex eventq2mex -c eventq2mex.cc -mb eventq2.mw
--- a/example/foobar/Makefile
+++ b/example/foobar/Makefile
@@ -1,5 +1,5 @@
-include ../../make.inc
-MW=../../mwrap
+MEX ?= mkoctfile --mex
+MW = mwrap
all:
$(MW) -mex fbmex -m foobar.m foobar.mw
--- a/example/zlib/Makefile
+++ b/example/zlib/Makefile
@@ -1,6 +1,6 @@
# See www.zlib.net
-include ../../make.inc
-MW=../../mwrap
+MEX ?= mkoctfile --mex
+MW = mwrap
gzmex:
$(MW) -mex gzmex -mb gzfile.mw
--- /dev/null
+++ b/example/README
@@ -0,0 +1,5 @@
+These examples require to have a mex compiler installed. It can be provided
+either by Octave (package octave-dev) or MATLAB.
+
+By default, it will try to use the Octave compiler (mkoctfile --mex) but it
+can be redefined to another one by setting the environment variable MEX.
|