Getting Started | Documentation | Glish | Learn More | Programming | Contact Us |
Version 1.9 Build 1556 |
|
Update AIPS++ object libraries.
updatelib [-f] package
updatelib updates the object libraries associated with a particular AIPS++ package and language (see §1). It is normally used only by AIPS++ makefiles (p) but can be invoked in stand-alone mode. It can process dual debug and optimized libraries concurrently with another invokation, possibly on another machine.
An ``_f'' or ``_c'' appended to the package name, for example ``aips_f'', indicates that the FORTRAN or C libraries for the package are to be updated rather than the default C++ libraries. The libraries themselves have names of this form, for example $LIBOPTD/libaips_f.a.
The lib and lib/% targets of the implement and fortran makefiles deposit object modules in package/language-specific subdirectories of $ARCHTMPD referred to as $TMPPCKGD, for example $ARCHTMPD/aips_f. These have separate dbg and opt subdirectories for debug and optimized compilations. When the lib rules have finished compiling all modules they invoke updatelib to insert them into the libraries.
Once invoked, updatelib copies the library into the temporary area, inserts the object modules into it, and then ranlibs it. It does this in turn for the debug and and optimized libraries.
updatelib uses the library control variables to determine whether sharable libraries are to be built (see makedefs (p)). If so, they are constructed in a subdirectory called BLDSHR.$ID, where $ID is an identification string of the form <user>@<host>.
Only if each static and sharable library was successfully updated does it copy them back to $LIBDBGD and/or $LIBOPTD.
With reference to the library control variables, updatelib explicitly looks for and deletes static and/or shared libraries for the package/language which are not being maintained, thus ensuring that the libraries remain synchronized.
This whole process is complicated by the fact that the debug and optimized libraries for a package-language combination can be updated concurrently by multiple invokations of updatelib, possibly on different machines. Independent invokations of updatelib communicate via semaphore files with names of the form updatelib.*. These are described below.
To circumvent this updatelib recognizes an UPDBATCH makedefs variable which causes it to process object modules in batches no bigger than the specified size.
Status return values
0
: success
1
: initialization error
2
: library update failed
If any library update fails, none of the libraries will be updated--with one exception: if a static library build succeeds and its corresponding shared library build fails then the static library will be updated.
The command
updatelib aips
would update $LIBDBGD/libaips.a, $LIBOPTD/libaips.a, and the corresponding sharable libraries if enabled for the installation.
updatelib uses the following semaphore files:
The invokation of updatelib which installs the libraries also deletes all semaphore files on completion.
The unix manual page for ar(1).
The unix manual page for ranlib(1).
AIPS++ variable names (§1.2).
makedefs (p), AIPS++ makefile definitions.
makefiles (p), GNU makefiles used to rebuild AIPS++.
Original: 1992/04/03 by Mark Calabretta, ATNF.