Mercurial > fem-fenics-eugenio
comparison inst/import_ufl_Functional.m @ 269:897e312cb440
Ensure the mkoctfile installed with running octave is used
* inst/import_*.m: find the right mkoctfile and pass it through
the environment
* inst/private/generate_*.m: get mkoctfile from the environment
author | Eugenio Gianniti <eugenio.gianniti@mail.polimi.it> |
---|---|
date | Thu, 14 Aug 2014 17:10:29 +0200 |
parents | 61830a4f9ab9 |
children | f4d6ae912a08 |
comparison
equal
deleted
inserted
replaced
268:61830a4f9ab9 | 269:897e312cb440 |
---|---|
40 path = strtrunc (mfilename ("fullpath"), n); | 40 path = strtrunc (mfilename ("fullpath"), n); |
41 | 41 |
42 private = fullfile (path, "include/"); | 42 private = fullfile (path, "include/"); |
43 output = generate_fun (var_prob); | 43 output = generate_fun (var_prob); |
44 output += generate_makefile (var_prob, private); | 44 output += generate_makefile (var_prob, private); |
45 | |
46 # Find correct mkoctfile for this version of Octave | |
47 bindir = octave_config_info ("bindir"); | |
48 ext = octave_config_info ("EXEEXT"); | |
49 shell_script = fullfile (bindir, sprintf ("mkoctfile-%s%s", OCTAVE_VERSION, ext)); | |
50 | |
45 if (output != 0) | 51 if (output != 0) |
46 error ("Compilation failed"); | 52 error ("Compilation failed"); |
47 else | 53 else |
48 [output, textfile] = system (sprintf ("make -f Makefile_%s fun", var_prob)); | 54 [output, textfile] = system ... |
55 (sprintf ("MKOCTFILE=%s make -f Makefile_%s fun", shell_script, var_prob)); | |
49 if (output != 0) | 56 if (output != 0) |
50 display (text); | 57 display (text); |
51 error ("Compilation failed"); | 58 error ("Compilation failed"); |
52 endif | 59 endif |
53 [output, textfile] = system (sprintf ("make -f Makefile_%s clean", var_prob)); | 60 [output, textfile] = system (sprintf ("make -f Makefile_%s clean", var_prob)); |