comparison m-toolbox/mkAllDoc.m @ 0:f0afece42f48

Import.
author Daniele Nicolodi <nicolodi@science.unitn.it>
date Wed, 23 Nov 2011 19:22:13 +0100
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:f0afece42f48
1
2 mc;
3
4
5 rootdir = 'C:\LTPDA';
6 toolboxDir = fullfile(rootdir, sprintf('ltpda_toolbox'), 'ltpda');
7 toolboxRoot = fullfile(rootdir, 'ltpda_toolbox');
8
9 ltpda_ver = '1.0.1'; % this is the version for the Contents.m and for packaging
10 mver = ver('MATLAB');
11 ltpda_version = sprintf('%s %s %s', ltpda_ver, mver.Release, datestr(now, 'dd-mm-yy'));
12
13
14 makeDoc = 0;
15
16 cdir = pwd;
17 cd(toolboxDir);
18 MakeContents('LTPDA', ltpda_version);
19 cd(cdir);
20
21 if makeDoc
22 % Build doc list
23 docs = [];
24 for j=1:length(classes)
25 docs = [docs cellstr(['classes/@' classes{j}])];
26 end
27 for j=1:length(srcs)
28 if ~strcmp(srcs{j}, 'mex')
29 docs = [docs cellstr(srcs{j})];
30 end
31 end
32
33 % build documentation
34 m2html('mfiles', docs,...
35 'htmldir', 'html_help/help/ug',...
36 'recursive', 'on',...
37 'template', 'docstyle',...
38 'indexFile', 'mindex');
39 end
40
41 % Make on-line html TOC
42 cd html_help/help
43 convertTOC
44
45 % try to generate html codes
46 try
47 [temp pythonVer] = system('python --version');
48 pythonVer = strtok(pythonVer,'Python ');
49 if numel(pythonVer)>3, pythonVer(4:end)=[]; end
50 pythonVer = str2double(pythonVer);
51 if isnan(pythonVer)
52 error('*** Failed check of Python version');
53 elseif pythonVer > 2.6
54 !python ./mkhelpfiles_v3.py -i helptoc.xml
55 else
56 !python ./mkhelpfiles.py -i helptoc.xml
57 end
58 catch
59 warning('!!! Couldn''t run mkhelpfiles.py. Do you have python installed?');
60 end
61 cd(cdir)
62
63 % Now copy the help files
64 copyfile('html_help/help', fullfile(toolboxDir,'help'), 'f');
65 copyfile('html_help/info.xml', toolboxDir, 'f');
66