comparison scripts/pkg/private/configure_make.m @ 19833:9fc020886ae9

maint: Clean up m-files to follow Octave coding conventions. Try to trim long lines to < 80 chars. Use '##' for single line comments. Use '(...)' around tests for if/elseif/switch/while. Abut cell indexing operator '{' next to variable. Abut array indexing operator '(' next to variable. Use space between negation operator '!' and following expression. Use two newlines between endfunction and start of %!test or %!demo code. Remove unnecessary parens grouping between short-circuit operators. Remove stray extra spaces (typos) between variables and assignment operators. Remove stray extra spaces from ends of lines.
author Rik <rik@octave.org>
date Mon, 23 Feb 2015 14:54:39 -0800
parents 4197fc428c7d
children 2469d78a1d8b
comparison
equal deleted inserted replaced
19832:a1acca0c2216 19833:9fc020886ae9
27 if (exist (fullfile (packdir, "src"), "dir")) 27 if (exist (fullfile (packdir, "src"), "dir"))
28 src = fullfile (packdir, "src"); 28 src = fullfile (packdir, "src");
29 octave_bindir = octave_config_info ("bindir"); 29 octave_bindir = octave_config_info ("bindir");
30 ver = version (); 30 ver = version ();
31 ext = octave_config_info ("EXEEXT"); 31 ext = octave_config_info ("EXEEXT");
32 mkoctfile_program = fullfile (octave_bindir, sprintf ("mkoctfile-%s%s", ver, ext)); 32 mkoctfile_program = fullfile (octave_bindir, ...
33 octave_config_program = fullfile (octave_bindir, sprintf ("octave-config-%s%s", ver, ext)); 33 sprintf ("mkoctfile-%s%s", ver, ext));
34 octave_config_program = fullfile (octave_bindir, ...
35 sprintf ("octave-config-%s%s", ver, ext));
34 octave_binary = fullfile (octave_bindir, sprintf ("octave-%s%s", ver, ext)); 36 octave_binary = fullfile (octave_bindir, sprintf ("octave-%s%s", ver, ext));
35 37
36 if (! exist (mkoctfile_program, "file")) 38 if (! exist (mkoctfile_program, "file"))
37 __gripe_missing_component__ ("pkg", "mkoctfile"); 39 __gripe_missing_component__ ("pkg", "mkoctfile");
38 endif 40 endif
80 82
81 ## Make. 83 ## Make.
82 if (ispc ()) 84 if (ispc ())
83 jobs = 1; 85 jobs = 1;
84 else 86 else
85 jobs = nproc ("overridable"); 87 jobs = nproc ("overridable");
86 endif 88 endif
87 89
88 if (exist (fullfile (src, "Makefile"), "file")) 90 if (exist (fullfile (src, "Makefile"), "file"))
89 [status, output] = shell (sprintf ("%s make --jobs %i --directory '%s'", 91 [status, output] = shell (sprintf ("%s make --jobs %i --directory '%s'",
90 scenv, jobs, src), verbose); 92 scenv, jobs, src), verbose);
111 fclose (fid); 113 fclose (fid);
112 if (filenames(end) == "\n") 114 if (filenames(end) == "\n")
113 filenames(end) = []; 115 filenames(end) = [];
114 endif 116 endif
115 filenames = strtrim (ostrsplit (filenames, "\n")); 117 filenames = strtrim (ostrsplit (filenames, "\n"));
116 delete_idx = []; 118 delete_idx = [];
117 for i = 1:length (filenames) 119 for i = 1:length (filenames)
118 if (! all (isspace (filenames{i}))) 120 if (! all (isspace (filenames{i})))
119 filenames{i} = fullfile (src, filenames{i}); 121 filenames{i} = fullfile (src, filenames{i});
120 else 122 else
121 delete_idx(end+1) = i; 123 delete_idx(end+1) = i;
136 if (isempty (filenames)) 138 if (isempty (filenames))
137 idx = []; 139 idx = [];
138 else 140 else
139 idx = cellfun ("is_architecture_dependent", filenames); 141 idx = cellfun ("is_architecture_dependent", filenames);
140 endif 142 endif
141 archdependent = filenames (idx); 143 archdependent = filenames(idx);
142 archindependent = filenames (!idx); 144 archindependent = filenames(!idx);
143 145
144 ## Copy the files. 146 ## Copy the files.
145 if (! all (isspace ([filenames{:}]))) 147 if (! all (isspace ([filenames{:}])))
146 if (! exist (instdir, "dir")) 148 if (! exist (instdir, "dir"))
147 mkdir (instdir); 149 mkdir (instdir);