comparison inst/import_ufl_LinearForm.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
41 41
42 private = fullfile (path, "include/"); 42 private = fullfile (path, "include/");
43 43
44 output = generate_lhs (var_prob); 44 output = generate_lhs (var_prob);
45 output += generate_makefile (var_prob, private); 45 output += generate_makefile (var_prob, private);
46
47 # Find correct mkoctfile for this version of Octave
48 bindir = octave_config_info ("bindir");
49 ext = octave_config_info ("EXEEXT");
50 shell_script = fullfile (bindir, sprintf ("mkoctfile-%s%s", OCTAVE_VERSION, ext));
51
46 if (output != 0) 52 if (output != 0)
47 error ("Compilation failed"); 53 error ("Compilation failed");
48 else 54 else
49 [output, textfile] = system (sprintf ("make -f Makefile_%s lhs", var_prob)); 55 [output, textfile] = system ...
56 (sprintf ("MKOCTFILE=%s make -f Makefile_%s lhs", shell_script, var_prob));
50 if (output != 0) 57 if (output != 0)
51 display (text); 58 display (text);
52 error ("Compilation failed"); 59 error ("Compilation failed");
53 endif 60 endif
54 [output, textfile] = system (sprintf ("make -f Makefile_%s clean", var_prob)); 61 [output, textfile] = system (sprintf ("make -f Makefile_%s clean", var_prob));