tbx_make
Builds fully or some given sections of a toolbox having a standard structure
Syntax
tbx_make() tbx_make(tbx_path) tbx_make(tbx_path, sections) tbx_make(tbx_path, "help", languages)
Arguments
- tbx_path
a single string: absolute or relative path to the toolbox root directory.
Default path is the current working directory.
- sections
- vector of strings: Names of the toolbox sections to build, among
["macros", "help", "src", "sci_gateway", "localization"]
."*"
can be used to force building all available sections, without running the builder script when it exists (see the description section). - languages
- Vector of strings like
"en_US"
, specifying the subset of the languages for which help pages must be built. This is useful during the module's development, in order to avoid rebuilding pages for ALL languages when this is not yet required, that can be very time consuming. The shortcuts"en", "fr", "pt", "ja", "ru"
are automatically expanded respectively into"en_US", "fr_FR", "pt_BR", "ja_JP", "ru_RU"
. If there is no help section or if its build is not requested, this option is ignored.
Description
tbx_make(…) allows to build partly or completely an external toolbox. Partial builds are very useful during the module's development. This allows focusing on each toolbox section, to tune and work out about each of them, without each time recompiling the whole toolbox.
The technical name (id) tbx_name
of the toolbox is the basename of the
~/etc/*.start file, where ~ is the toolbox root.
This file is mandatory in the toolbox, even if it is empty. |
tbx_make() is equivalent to
tbx_make(".")
ou tbx_make .
.
tbx_make(tbx_path) builds the toolbox whose root's
directory is tbx_path
. tbx_path
is scanned for
a script named like build*.sce
:
- If such a file is found,
tbx_make(…)
executes it, and then returns. An example of such abuilder.sce
script is provided in the template module available inSCI/contrib/toolbox_skeleton
. Otherwise, the
sections
parameter is set by default to all existing toolbox sections. These ones are then built one by one, as described below.
tbx_make(tbx_path, sections) builds one by one
all given sections
of the toolbox, provided that they exist.
The sections are processed according to the following conventions:
- macros :
- If there is a custom macros builder script
~/macros/*.sce
, it is executed, and then returns totbx_make(…)
to go on building the remaining sections. Writing and using such a builder script is mandatory if macros are sorted in~/macros/*
subdirectories corresponding to some toolbox sublibraries. - Otherwise: All macros files
~/macros/*.sci
are compiled and gathered into a library namedtbx_namelib
and recorded in the file~/macros/lib
. Please see tbx_builder_macros.No automatical recursive processing aiming to build sublibraries in subdirectories is performed.
- If there is a custom macros builder script
- help : Help pages are generated from XML
source files stored in
~/help/*
available languages subdirectories (en_US, fr_FR, etc).- If
~/help/builder.sce*
is found and thelanguages
option is not used, the builder is executed, and then returns totbx_make(…)
. - Otherwise: Help pages are built with the default builder for
each requested language
la_LA
. A file~/jar/scilab_la_LA_help.jar
gathering all compiled pages and summaries is created for each processed language.
If no page is translated for a given language, please just delete the corresponding empty language subdirectory.
Pages can be organized in sections and subsections, in as many
~/help/la_LA/*
subdirectories. Then the same set of subdirectories must be defined for all existing languages.Help pages may contain Scilab code samples using functions defined in the toolbox, and executed when building pages (<scilab:image> tags, Xcos diagrams). When it is the case, the related functions must have been compiled before building the help pages.For more details, please see the man and tbx_builder_help pages.
- If
localization : Localization files are built and/or postprocessed. Please see tbx_build_localization.
src : Functional external code in src is compiled. Please see tbx_builder_src.
sci_gateway : gateway functions in sci_gateway are compiled. Please see tbx_builder_gateway.
Finally, tbx_make(…)
always creates the script files
loader.sce
, unloader.sce
and
cleaner.sce
at the toolbox's root.
Examples
// The working directory is set at the toolbox root: tbx_make() // builds the toolbox with the toolbox builder (if any), // or for all sections with default builders otherwise. tbx_make . macros // builds only its macros section from files in ./macros/ tbx_make . * // builds all available sections, without using the toolbox builder // Builds the toolbox located in path/to/mytoolbox directory tbx_make("path/to/mytoolbox") // Compiles macros help and src for the toolbox located in path/to/mytoolbox tbx_make("path/to/mytoolbox", ["macros", "help", "src"])
See Also
- man — on line help XML file description format
- xmltojar — converts xml Scilab help files to javaHelp format
- tbx_builder_help — Builds the multilingual help pages of a toolbox, with possible subsections
- genlib — строит библиотеку из набора *.sci-файлов, определяющих функции в указанной директории
- tbx_builder_macros — Creates the library(es) of a toolbox for its functions in Scilab language
- tbx_build_localization — Builds or updates localization .po and .mo files of a toolbox
- tbx_builder_src — Builds the user source code (non-gateway) in src/ subdirectory.
- tbx_builder_gateway — Builds the user gateway code in sci_gateway/ subdirectory.
- tbx_build_blocks — Compile Xcos blocks (toolbox compilation process)
History
Версия | Описание |
6.0.0 | tbx_make() introduced. |
6.0.1 | The existing builder is run only if no specific sections are requested. |
2023.0.0 | tbx_make(".", "localization") automatically updates existing .po
files for every newly detected msgid. |
2023.1 | languages input option added. |
Report an issue | ||
<< Helper functions | Modules manager | Локализация >> |