Hello Pierre,
Scilab 6.0 will propose a new function *tbx_make*(..) that will be able
to do exactly what you want:
https://codereview.scilab.org/#/c/18071/
By the way, it will greatly simplify compilation of modules, and will no
longer require many cooky-files .sce like buildmacros.sce buildoc.sce
etc etc spread everywhere in the tree of files of a module.
On the forefront, tbx_make() aims to replace & merge most of functions
of the "modules manager" module, that are rather some atomic internals
not really welcome as public functions:
https://help.scilab.org/docs/6.0.0/en_US/section_d8452c14ec97df3c90ea90bb4f7d53b6.html
If you use Scilab on Linux, you can already test tbx_make() in the
nightly built release (*).
If you are working with Scilab 5, you may use the attached script. Its
how-to is in comments.
Regards
Samuel
(*) tbx_make() merged on 2016-10-02 in the master release is still
unavailable in the today NB sticking on the 2016-09-22 sources for Windows.
Le 12/10/2016 22:00, Pierre Vuillemin a écrit :
Hi all,
I am trying to make a function similar to genlib but which goes
recursively through folders to find .sci files, compile them and put
them in a given target build folder.
The idea is that I would like to be able to organize my 'macros'
folder while still being able to generate a library. In particular, I
would like to have that kind of folder organization :
.../...
// "genlib" a folder of macros with subfolders of macros
// The name of the folder yields the name of the main library (+"lib")
// The name of each subfolder yields the name of the related sublibrary (+"lib")
//
// Put this script in the main macros folder and exec() it from anywhere.
path = get_absolute_file_path("buildmacros.sce")
tmp = strsplit(fileparts(path),filesep());
dirs = dir(path);
dirs = dirs.name(dirs.isdir)'
genlib(tmp($-1)+"lib", path, %t);
for d = dirs
genlib(d+"lib",path+d, %t);
end
_______________________________________________
users mailing list
[email protected]
http://lists.scilab.org/mailman/listinfo/users