builds a library from a set of *.sci files defining functions in a given directory
genlib(lib_name) genlib(lib_name, dir_name) genlib(lib_name, dir_name, Force) genlib(lib_name, dir_name, Force, verb) genlib(lib_name [,path=dir_name] [,verbose=verb] [,force=Force])
.sci functions files, and where the lib
file generated and defining the library will be stored.
By default, the current working directory is considered.
![]() | The dir_name directory and its lib
and .bin files must be writable. |
%f). Set it to
%t to force the sci-files recompilation.
%f). Set it to
%t to display more information during the build.
genlib(..) selects all files belonging to the
dir_name directory and with the .sci extension.
If any, subdirectories are never considered. If it is required, they must be compiled
apart into independent libraries.
Then, an XML editable file named lib is created in the
dir_name directory. The name lib_name
of the library is recorded into it.
Then, for each .sci file:
.bin file in dir_name
with the same basename (as for the initial build of the library), or.sci file has changed since
the previous build,the .sci file is compiled (almost
as it would be with exec(..)):
If it contains at least one function .. endfunction
block, a .bin binary file with the same basename
is generated and stored in dir_name.
It contains the binary code of ALL functions defined in the
.sci source file.
.sci
file, this function is registered in the
lib file.
.sci
file is registered: Its whole content is considered as
dead code.![]() | If a test.sci file defines the
test() function AND other functions like
sub(), sub() functions are then considered as private to
test(). For instance,
|
.bin file is generated: The whole
content of the .sci file is considered as dead code.lib file, this entry is kept.If the option force=%t is used, all .sci files
are compiled, even if their content has not changed.
When in the directory of a library some former .sci files have been removed while
all remaining .sci files are unchanged, rebuilding the library without the
force=%t will anyway update the list of library's members.
If the option verbose is true, more information is displayed during
the build process.
| Version | Description |
| 6.0.0 |
|
| 2026.0.0 | Generated library is not automatically loaded anymore. lib must be called. |