Modulefpreviousupnextcontents[BIG][Normal][small]
Next: 5.4 Up-date of the MODULEF library Up: 5 Management under UNIX Prev: 5.2 Guidelines for software development Contents


5.3 Description of commands

5.3.1 bb: management of the library

Utilization:
bb key [library] member

where

key
corresponds to the action to be performed,
library
corresponds to the name of the library in which the member is found (this argument is optional), and
member
corresponds to the name of the file on which the action is to be performed.

Description:
bb is used to manage the MODULEF library (or any other library with an identical structure).

The key is obligatory and indicates the action to be performed on the member of a certain library.

It can be followed by one or two arguments:

bb
key member

In this case, the search is performed in the MODULEF library in which the member is found by default.

bb
key library member

In this case, all information necessary to locate the member is given.

Example:
To visualize ( read) the source code of subroutine readre, type:
bb r readre

or

bb r util readre

Keys (bb):
c
Copy the member into the current directory (except if the member exits already);
cf
Forcefully copy the member into the current directory;
e
Copy the member into the current directory and visualize is in the edit window.
elm
Link the member with MODULEF, for example:
B$ bb elm imagxx
creates the executable file imagxx and places it in directory
[4] $MR/$MM/$MV/bin;
eso
This is equivalent to performing a bb e followed by a bb so (used when correcting a member quickly);
ou
Indicates where a member is located;
r
Visualizes the member in a read access only window. We can thus visualize a write protected member quickly;
s
Up-date the source when the current directory contains data to add or to replace in the library;
so
Up-date the source (as before), compile with command co1 (FORTRAN compiler) and up-date the corresponding object archive;
d
Delete the object and source file.

When using the options s, so and d all modifications are memorized in file $MR/$MM/$MV/etc/maj.fo.

5.3.2 bbg: global management of the library

Utilization:
bbg key member

Description:
bb is used to manage the MODULEF library (or any other library with an identical structure).

The key is obligatory and indicates the action to be performed on one or several complete MODULEF libraries.

It is followed by at the most one argument:

bbg
key

Here, the action is performed on all the MODULEF libraries.

bbg
key library

In this case, the action is performed on only the library specified.

Example:
To recompile the entire util library, type:
bbg co util

Keys (bbg):

co
Compile all the members of the library using a FORTRAN or C compiler;
elm
Link with all the members of the MODULEF library. For example:

B$ bbg elm ppal
creates all the executable files corresponding to the main programs residing in library ppal;
t
List the names of all the library members.

5.3.3 co1: compilation

Utilization:
co1 [key] file

where

key
corresponds to the action to be performed (optional), and
file
corresponds to the file name of the file to be compiled.

Description:
co1 compile files in FORTRAN or C, and generate the object file.

Key (co1):
-outdir
name Place the object file in directory name. This key is not obligatory.

5.3.4 elm: linking

Utilization:
elm [keys ...] file ...

Description:
elm is practically identical to the standard UNIX linker ld. However, the following extensions have been added:

Keys (elm):
-f
liblist This option indicates which libraries to include during the link, and may appear anywhere in the command.

Here liblist is either the name of the file containing the list of libraries to be included, or liblist is a variable whose value is sta (name of the MODULEF version). If liblist = sta, the link is performed with the entire MODULEF library;

-o
name This option generates an executable with name as name;
-only
The MODULEF library is not taken into account during linking.

Examples:
  1. Consider the three files: ppal.f, a.f and b.f, whose contents look something like:

    PROGRAM PPAL SUBROUTINE A SUBROUTINE B
    CALL A WRITE(*,*) 'A' WRITE(*,*) 'B'
    CALL B END END
    END

    To compile these three files and creating the object files ppal.o, a.o and b.o, enter the command:

    B$ co1 ppal.f ; co1 a.f ; co1 b.f
    (the semicolons are equivalent to carriage returns)

    The executable file, ppal, is generated from the preceding three files, by typing:

    B$ elm -only ppal a b

  2. To create the executable file, ppal, using all the *.o (object) files in the current directory as well as the MODULEF directories utsd, util and util_apollo, we first create a file xx.ldo containing:
    $MR/$MM/$MV/lib/libutsd.a

    $MR/$MM/$MV/lib/libutil.a

    $MR/$MM/$MV/lib/libutil_apollo.a

    and then type:

    B$ elm -o ppal *.o -f xx.ldo

  3. Instead of the above command, we can also type:
    B$ elm -o ppal *.o
    or else
    B$ elm -o ppal *.o -f $MV
    but in this case a search is performed in all the MODULEF libraries, resulting in an increase in execution time.

5.3.5 voir: visualize a source file

Utilization:
voir [option] file

where

file
corresponds to the path and file name.

Description:
voir visualizes a source file in an edit or read-only window, depending on the option specified.

Options:

-r
read only;
-*
(dash not followed by r) edit;
*
(no dash) read only.

Examples:

To read file apnoxx.f residing in library ppal, enter:

voir -r $ms/ppal/apnoxx.f
However, it is in fact easier to use the bb (described earlier) command:
bb r apnoxx
to read this file.

The advantage of the voir command over the bb command is that all files can be visualized and not only the MODULEF source files. For example:

voir $mb/bb
visualizes the shell file $mb/bb.


Modulefpreviousupnextcontents[BIG][Normal][small]
Next: 5.4 Up-date of the MODULEF library Up: 5 Management under UNIX Prev: 5.2 Guidelines for software development Contents