~logan/ubuntu/trusty/suitesparse/4.2.1-3ubuntu1

« back to all changes in this revision

Viewing changes to CXSparse/MATLAB/Test/cs_test_make.m

  • Committer: Bazaar Package Importer
  • Author(s): Christophe Prud'homme
  • Date: 2007-05-29 09:36:29 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20070529093629-zowquo0b7slkk6nc
Tags: 3.0.0-2
* suitesparse builds properly twice in a row
* Bug fix: "suitesparse - FTBFS: Broken build depens: libgfortran1-dev",
  thanks to Bastian Blank (Closes: #426349).
* Bug fix: "suitesparse_3.0.0-1: FTBFS: build-depends on
  libgfortran1-dev", thanks to Steve Langasek (Closes: #426354).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
function cs_test_make (force)
 
2
%CS_TEST_MAKE compiles the CSparse, Demo, and Test mexFunctions.
 
3
%   The current directory must be CSparse/MATLAB/Test to use this function.
 
4
%
 
5
% Example:
 
6
%   cs_test_make
 
7
% See also: testall
 
8
 
 
9
%   Copyright 2006-2007, Timothy A. Davis.
 
10
%   http://www.cise.ufl.edu/research/sparse
 
11
 
 
12
mexcmd = 'mex -DCS_LONG -I../../../UFconfig' ;
 
13
if (~isempty (strfind (computer, '64')))
 
14
    mexcmd = [mexcmd ' -largeArrayDims'] ;
 
15
end
 
16
 
 
17
if (nargin < 1)
 
18
    force = 0 ;
 
19
end
 
20
 
 
21
cd ('../CSparse') ;
 
22
[object_files timestamp] = cs_make ;
 
23
cd ('../Test') ;
 
24
 
 
25
mexfunc = { 'cs_ipvec', 'cs_pvec', 'cs_sparse2', ...
 
26
    'cs_reach', 'cs_maxtransr', 'cs_reachr', 'cs_rowcnt', 'cs_frand' } ;
 
27
 
 
28
for i = 1:length(mexfunc)
 
29
    [s t tobj] = cs_must_compile ('', mexfunc{i}, '_mex', ...
 
30
        ['.' mexext], 'cs_test_make.m', force) ;
 
31
    if (s | tobj < timestamp)                                               %#ok
 
32
        cmd = [mexcmd ' -O -output ' mexfunc{i} ' ' mexfunc{i} '_mex.c -I..' ...
 
33
            filesep '..' filesep 'Include -I..' ...
 
34
            filesep 'CSparse ' object_files] ;
 
35
        fprintf ('%s\n', cmd) ;
 
36
        eval (cmd) ;
 
37
     end
 
38
end