1 | function makedoc_html(varargin) |
---|
2 | %MAKEDOC_HTML - Generate new MML, SOLEIL and AT HTML help files |
---|
3 | % makedoc_html |
---|
4 | |
---|
5 | % |
---|
6 | % Written by Gregory J Portmann |
---|
7 | % Modifed by Laurent S. Nadolski |
---|
8 | |
---|
9 | % Options = {'htmldir','doc_html', 'recursive','off', 'graph','Off', ... |
---|
10 | % 'todo', 'on', 'template', 'frame', 'index', 'menu', 'search', 'on'}; |
---|
11 | Options = {'htmldir','doc_html', 'recursive','off', 'graph','Off', ... |
---|
12 | 'todo', 'on', 'search', 'on'}; |
---|
13 | |
---|
14 | if isempty(varargin) |
---|
15 | ListName = {'AT', 'MML', 'SOLEIL'}; |
---|
16 | else |
---|
17 | ListName = {}; |
---|
18 | end |
---|
19 | |
---|
20 | for i = length(varargin):-1:1, |
---|
21 | if strcmpi(varargin{i},'All') |
---|
22 | ListName = {'AT', 'MML', 'SOLEIL'}; |
---|
23 | varargin(i) = []; |
---|
24 | elseif strcmpi(varargin{i},'AT') |
---|
25 | ListName = [ListName, 'AT']; |
---|
26 | varargin(i) = []; |
---|
27 | elseif strcmpi(varargin{i},'MML') |
---|
28 | ListName = [ListName, 'MML']; |
---|
29 | varargin(i) = []; |
---|
30 | elseif strcmpi(varargin{i},'SOLEIL') |
---|
31 | ListName = [ListName, 'SOLEIL']; |
---|
32 | varargin(i) = []; |
---|
33 | else |
---|
34 | varargin(i) = []; |
---|
35 | end |
---|
36 | end |
---|
37 | |
---|
38 | DirectoryStart = pwd; |
---|
39 | |
---|
40 | %[DirectoryName, FileName, ExtentionName] = fileparts(mfilename('fullpath')); |
---|
41 | %cd(DirectoryName); |
---|
42 | |
---|
43 | cd(getmmlroot); |
---|
44 | |
---|
45 | for k=1:length(ListName) |
---|
46 | switch ListName{k} |
---|
47 | case 'MML' |
---|
48 | cd mml |
---|
49 | |
---|
50 | % Delete old directory first |
---|
51 | try |
---|
52 | if isdir('doc_html') |
---|
53 | rmdir('doc_html', 's'); |
---|
54 | end |
---|
55 | catch |
---|
56 | disp('Delete error'); |
---|
57 | end |
---|
58 | cd .. |
---|
59 | |
---|
60 | try |
---|
61 | if isdir('doc_html') |
---|
62 | rmdir('doc_html', 's'); |
---|
63 | end |
---|
64 | catch |
---|
65 | disp('rmdir error') |
---|
66 | end |
---|
67 | |
---|
68 | |
---|
69 | MMLDirectory = {... |
---|
70 | 'mml', ... |
---|
71 | fullfile('mml','at'), ... |
---|
72 | fullfile('mml','links','tango') ... |
---|
73 | }; |
---|
74 | |
---|
75 | m2html('mfiles', MMLDirectory, Options{:}); |
---|
76 | |
---|
77 | % Move doc_html directory to MML |
---|
78 | movefile('doc_html', 'mml'); |
---|
79 | |
---|
80 | cd applications |
---|
81 | |
---|
82 | % Delete old directory first |
---|
83 | try |
---|
84 | if isdir('doc_html') |
---|
85 | rmdir('doc_html', 's'); |
---|
86 | end |
---|
87 | catch |
---|
88 | disp('Delete error'); |
---|
89 | end |
---|
90 | |
---|
91 | cd .. |
---|
92 | |
---|
93 | try |
---|
94 | if isdir('doc_html') |
---|
95 | rmdir('doc_html', 's'); |
---|
96 | end |
---|
97 | catch |
---|
98 | disp('rmdir error') |
---|
99 | end |
---|
100 | |
---|
101 | |
---|
102 | MMLDirectory = {... |
---|
103 | fullfile('applications','common'), ... |
---|
104 | fullfile('applications','loco'), ... |
---|
105 | fullfile('applications', 'database', 'mysql'), ... |
---|
106 | fullfile('applications','mmlviewer'), ... |
---|
107 | fullfile('applications','orbit') |
---|
108 | }; |
---|
109 | |
---|
110 | m2html('mfiles', MMLDirectory, Options{:}); |
---|
111 | |
---|
112 | % Move doc_html directory to MML |
---|
113 | movefile('doc_html', 'applications'); |
---|
114 | |
---|
115 | case 'AT' |
---|
116 | |
---|
117 | % Make AT HTML help |
---|
118 | cd at |
---|
119 | try |
---|
120 | if isdir('doc_html') |
---|
121 | rmdir('doc_html','s'); |
---|
122 | end |
---|
123 | catch |
---|
124 | disp('rmdir error') |
---|
125 | end |
---|
126 | |
---|
127 | cd .. |
---|
128 | try |
---|
129 | if isdir('doc_html') |
---|
130 | rmdir('doc_html','s'); |
---|
131 | end |
---|
132 | catch |
---|
133 | disp('rmdir error') |
---|
134 | end |
---|
135 | |
---|
136 | MMLDirectory = {... |
---|
137 | 'at', ... |
---|
138 | fullfile('at','atdemos'), ... |
---|
139 | fullfile('at','atgui'), ... |
---|
140 | fullfile('at','atphysics'), ... |
---|
141 | fullfile('at','lattice'), ... |
---|
142 | fullfile('at','simulator','element'), ... |
---|
143 | fullfile('at','simulator','element','user'), ... |
---|
144 | fullfile('at','simulator','track'), ... |
---|
145 | }; |
---|
146 | |
---|
147 | m2html('mfiles', MMLDirectory, Options{:}); |
---|
148 | |
---|
149 | % Move doc_html directory to AT |
---|
150 | movefile('doc_html', 'at'); |
---|
151 | |
---|
152 | case 'SOLEIL' |
---|
153 | cd(fullfile('machine','Soleil')) |
---|
154 | |
---|
155 | % Delete old directory first |
---|
156 | try |
---|
157 | if isdir('doc_html') |
---|
158 | rmdir('doc_html', 's'); |
---|
159 | end |
---|
160 | catch |
---|
161 | disp('Delete error'); |
---|
162 | end |
---|
163 | |
---|
164 | cd(fullfile('..', '..')); |
---|
165 | |
---|
166 | try |
---|
167 | if isdir('doc_html') |
---|
168 | rmdir('doc_html', 's'); |
---|
169 | end |
---|
170 | catch |
---|
171 | disp('rmdir error') |
---|
172 | end |
---|
173 | |
---|
174 | MMLDirectory = {... |
---|
175 | fullfile('machine','Soleil','LT1'), ... |
---|
176 | fullfile('machine','Soleil','Booster'), ... |
---|
177 | fullfile('machine','Soleil','LT2'), ... |
---|
178 | fullfile('machine','Soleil','StorageRing'), ... |
---|
179 | fullfile('machine', 'Soleil', 'common'), ... |
---|
180 | fullfile('machine', 'Soleil', 'common', 'naff', 'naffutils'), ... |
---|
181 | fullfile('machine', 'Soleil', 'common', 'naff', 'naffutils', 'touscheklifetime'), ... |
---|
182 | fullfile('machine', 'Soleil', 'common', 'naff', 'nafflib'), ... |
---|
183 | fullfile('machine', 'Soleil', 'common', 'archiving'), ... |
---|
184 | fullfile('machine', 'Soleil', 'common', 'database'), ... |
---|
185 | fullfile('machine', 'Soleil', 'common', 'synchro'), ... |
---|
186 | fullfile('machine', 'Soleil', 'common', 'plotfamily'), ... |
---|
187 | fullfile('machine', 'Soleil', 'common', 'configurations'), ... |
---|
188 | fullfile('machine', 'Soleil', 'common', 'cycling')... |
---|
189 | %fullfile('machine', 'Soleil', 'common', 'diag', 'DserverBPM') ... |
---|
190 | %fullfile('mml', 'plotfamily')); % greg version |
---|
191 | }; |
---|
192 | |
---|
193 | m2html('mfiles', MMLDirectory, Options{:}); |
---|
194 | |
---|
195 | % Move doc_html directory to MML |
---|
196 | movefile('doc_html', fullfile('machine','Soleil')); |
---|
197 | cd .. |
---|
198 | end |
---|
199 | end |
---|
200 | |
---|
201 | cd(DirectoryStart); |
---|