总builder和总loader

Submitted by administrator on 周二, 2006-12-19 11:23.

总的builder和loader在顶层执行,他们去调用每个子builder和子loader,下面的是这两个脚本的例子:

builder.sce

mode(-1);
mainpathB=get_absolute_file_path('builder.sce');
chdir(mainpathB);
if isdir('src') then //如果存在src目录
chdir('src');         //进入src目录
exec('buildsrc.sce'); //执行src目录里的builder.sce
chdir('..');           //回到上一层目录
end                     //end if;下面类似
if isdir('sci_gateway') then 
chdir('sci_gateway');
exec('buildsci_gateway.sce');
chdir('..');
end
if isdir('macros') then
chdir('macros');
exec('buildmacros.sce');
chdir('..');
end
if isdir('help') then
chdir('help');
exec('buildhelp.sce');
chdir('..');
end
clear mainpathB

loader.sce

mode(-1);
mainpathL=get_absolute_file_path('loader.sce');
chdir(mainpathL);
if isdir('sci_gateway') then
chdir('sci_gateway');
exec('loader.sce');
chdir('..');
end
if isdir('macros') then
chdir('macros');
exec('loadmacros.sce');
chdir('..');
end
if isdir('help') then
chdir('help');
exec('loadhelp.sce');
chdir('..');
end
clear mainpathL

Copyright © 2005-2006 LIAMA. All rights reserved. 京ICP备05002853号

本网站由中法联合实验室管理,中科院自动化所自由软件协会协助维护