1
<?xml version="1.0" encoding="UTF-8"?>
3
* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4
* Copyright (C) ????-2008 - INRIA
6
* This file must be used under the terms of the CeCILL.
7
* This source file is licensed as described in the file COPYING, which
8
* you should have received as part of this distribution. The terms
9
* are also available at
10
* http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
13
<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" version="5.0-subset Scilab" xml:lang="en" xml:id="genlib">
15
<refname>genlib</refname>
16
<refpurpose> build library from functions in given directory</refpurpose>
19
<title>Calling Sequence</title>
20
<synopsis>genlib(lib_name [[,dir_name, [ Force [,verb [,Names]]]])
21
genlib(lib_name [,path=dir_name] [,verbose=verb] [,force=Force] [,names=Names])
25
<title>Arguments</title>
28
<term>lib_name: </term>
30
<para>Scilab string. The variable name of the library to (re)create.</para>
34
<term>dir_name: </term>
36
<para>Scilab string. The name of the directory to look for
37
<literal>.sci</literal>-files.
45
boolean value (default value is <literal>%f</literal>). Set it to
46
<literal>%t</literal> to force the sci-files recompilation.
54
boolean values (default value is <literal>%f</literal>). Set it to
55
<literal>%t</literal> to get information.
62
<para>a vector of strings, the names of function to include in the
63
library. By default all the sci-files are taken into account
70
<title>Description</title>
72
For each <literal>.sci</literal> file in <literal>dir_name</literal> (or only those
73
specified by the <literal>Names</literal> argument), <literal>genlib</literal> executes a
74
<literal>exec</literal> and saves the functions to the corresponding <literal>.bin</literal>
75
file. The <literal>.sci</literal> file must not contain anything but Scilab
76
functions. If a <literal>.bin</literal> file is newer than the associated
77
<literal>.sci</literal> file, <literal>genlib</literal> does not translate and save the file.
80
This default behaviour can be changed if <literal>force</literal> is given and
81
set to <literal>%t</literal>. In this latter case the recompilation is always
82
performed for each <literal>.sci</literal> file.
85
When all <literal>.sci</literal> files have been processed, <literal>genlib</literal> creates a
86
library variable named <literal>lib_name</literal> and saves it in the file
87
<literal>lib</literal> in <literal>dir_name</literal>. If the Scilab variable
88
<literal>lib_name</literal> is not protected (see <link linkend="predef">predef</link>) this
92
If <literal>verbose</literal> is et to <literal>%t</literal> information are displayed during
96
If <literal>dir_name</literal> argument is not given and if <literal>lib_name</literal>
97
Scilab variable exists and it is a library dir_name is taken equal to the
98
<literal>lib_name</literal> library path (update mode).
102
<title>Restrictions</title>
104
Scilab tacitly assumes that file <literal>foo.sci</literal> defines at least a
105
function named <literal>foo</literal>. If subsidiary functions are included,
106
they are made known to Scilab only after the function <literal>foo</literal>
110
<refsection role="see also">
111
<title>See Also</title>
112
<simplelist type="inline">
114
<link linkend="getd">getd</link>
117
<link linkend="exec">exec</link>
120
<link linkend="save">save</link>
123
<link linkend="lib">lib</link>