10.0;librarian, revision 1.0, 88/01/21
lbr (librarian) -- Combine object modules into a library.
usage: lbr {-c|-upd} library_pathname [module_pathname]
[-del module]
[-ex module
[-o pathname]]
[-l] [-msgs|-nmsgs]
[-sys|-nsys]
[-repl] [-]
DESCRIPTION
The lbr command manages libraries of object modules. It adds, removes,
or replaces modules in the library. As input, you must provide the
pathname of a library you want to create or update, followed by an
optional list of object module pathnames and processing options. As
output, lbr produces a new or updated library file.
You can use lbr in two ways: by entering complete lbr command strings, or
by using the "-" (hyphen) option to ask lbr to prompt you for multiple
strings of module_pathname arguments and options. By using prompting you
can perform several operations on object modules in the same library
file, without entering lbr each time.
For a complete description of lbr, see the Domain/OS Programming
Environment Reference.
Prompting
The optional hyphen at the end of the command line requests lbr to begin
prompting. The hyphen is valid only on the line containing the lbr
command, and must be the last item on the line. Note that prompting is
also requested if the command line contains only the lbr command.
If you request prompting, lbr processes the arguments and options on the
current command line, then displays an asterisk (*) on standard output.
In response to the asterisk, you can enter additional module_pathname
arguments and options. For example,
$lbr -c mylib.lib
*file1.bin -del my_module
*file2.bin -l -repl file3.bin
*
Prompting ends when you specify the -end option or press RETURN in
response to the asterisk. After prompting ends, lbr finishes creating or
updating the library file.
Comment Statements
You can include comments to an lbr command during a prompting session or
in a shell script. Comments must be delimited by braces, as in this
example:
$lbr -upd plot.lib
*plot_line.bin { Add plot_line procedure to library }
*{ Generate library directory }
*-l
*-end
lbr ignores any comments when it processes the command line.
Librarian Errors
If a problem occurs during lbr execution, lbr displays a message on error
output. The message indicates the nature and severity of the problem.
Error-level messages are issued for fatal conditions, which prevent lbr
from creating or updating a library file. Warning-level messages are
issued for conditions that do not prevent lbr from producing a library
file, but the file's contents may not be what you expect.
ARGUMENTS
-c[reate] | -upd[ate] library_pathname (required)
The pathname of the library output file must be specified
on the command line before you can specify any option that
performs an operation on a library (such as adding to,
extracting from, or reporting about a library). The -c
(create) or -upd (update) option must be specified with
the library pathname argument to indicate whether you want
to create or update a library. Remember that only one
library output file can be specified per execution of lbr.
module_pathname (optional)
Specify an object module to be added to the library.
Multiple pathnames and wildcarding are permitted. If
omitted, no new object modules are added to the library.
OPTIONS
The following options instruct the librarian to perform various tasks.
Note that some options apply directly to a library, while others act on
modules within the library.
-del module Remove an object module from the library. If a module of
the given name cannot be found in the library, a warning
is issued. Note that the librarian is case-sensitive to
the name module.
-ex module [-o pathname]
Extract the named module from the library. If the
pathname modifier is specified with -o, the module is
copied to that pathname. Otherwise, the module is copied
to a file having the same name as the module. Note that
the librarian is case-sensitive to the name module.
-l List a directory of the library contents to standard
output.
-msgs (default)
Cause lbr to issue purely informational messages such as a
summary of the number of errors and warnings that
occurred.
-nmsgs Cause lbr to suppress issuing purely informational
messages.
-repl pathname Replace, in the library, any modules found in the file
specified by pathname. This option has an effect
equivalent to first deleting all the modules found in
pathname from the library, and then adding all the modules
in pathname back into the library. The advantage gained
by using -repl is that you do not need to know the names
of the modules in pathname. Also, if you attempt to add a
module to a library without using the -repl option, and a
module of that name already exists, an error message is
issued. If a module found in pathname does not already
exist in the library, a warning message is issued.
- (hyphen alone)
Request librarian prompting for further arguments.
EXAMPLES
Refer to the Domain/OS Programming Environment Reference for detailed
examples of lbr.