BSD 3 development
[unix-history] / usr / src / cmd / apl / documents / libr.doc
CommitLineData
9128f7cd
KT
1.tl 'LIBR(I)'12/17/75'LIBR(I)'
2NAME
3 libr - fortran librarian
4
5SYNOPSIS
6 libr libfile -k1 n11 n12 ... n1k ... -kn ...
7
8DESCRIPTION
9
10 LIBR is a program to build and maintain libraries of object modules
11to be used with LINK. An object module in a library is included in the out file
12iff it satisfies an undefined reference at the time it is encountered. (With some
13exceptions for -i: and -e: ) Therefore, the order of modules in a library is
14important.
15
16 All commands except append (-a ) require that the file designated 'libfile'
17already exit. The append command will create the library file if it does
18not exist. The action of LIBR is governed by the keybytes, which are
19interpreted in left-to-right order. The entire command line is checked for
20correctness, and then executed.
21
22 In a library, all modules are identifies by their module name.
23Assembly language programs get their module name from a .title directive.
24In fortran subprograms the module name is the name of the subroutine declared
25in it.
26
27 There are no default extensions.
28
29 The keybytes are:
30
31 -l
32.in 20
33list the contents of the library as it will appear at the completion
34of the LIBR command
35.in 0
36
37 -g mod syms
38.in 20
39As noted above, a module is included into an outfile from a library only if
40it 'declares' a yet-undefined global symbol. Initially, a module declares
41all those global symbols which are assigned values within it.
42The -g command allows one to eliminate declarations from a module.
43.in 0
44
45 -d mods
46.in 20
47delete the named modules from the library
48
49.in 0
50 -i mod files
51.in 20
52place the modules in the named files into the library before the
53given module.
54
55.in 0
56 -r files
57.in 20
58Replace the modules in the library with those in the files having the
59same module name.
60
61.in 0
62 -a files
63.in 20
64Append the modules in the named files to the library. Create the library if it does
65not exist.
66
67.in 0
68 -c
69.in 20
70Generate a cross-reference
71
72
73
74.in 0
75EXAMPLE
76 A fortran user wants to create a library of six graphics
77subroutines in the object files graph1.obj ... graph6.obj.
78First, a library is created:
79 libr graphlib -a graph1.obj ... graph6.obj
80
81If, later, it is necessary to replace one of the subroutines, say #4,
82this can be done as:
83 libr graphlib -r graph4.obj
84
85FILES
86 libr1.tmp - scratch file