Having trouble with ranlib

Ed Gould ed at mtxinu.COM
Thu May 10 09:08:01 AEST 1990


>   The man pages for ranlib under BSD says the following
>about the "-t" option:

>     If given the -t option, ranlib only "touches" the archives
>     and does not modify them.

>does that mean I can just use:

>   touch libfoo.a

>or is something more elaborate involved (like touching individual
>archive members?)?

"Touching" an archive in this context is more elaborate than just
using touch.  One of the members of the library is the element
created by running ranlib: it's a dictionary of the symbols used
by and declared by the various library members.  Programs that use
the dictionary verify that it's current by comparing the modification
time of the dictionary to the mod time of the library itself.  If
the library is newer than the dictionary contained within it, then
the dictionary is presumed to be out of date.

When one copies a library, one often changes its mod time.  The -t
option to ranlib "touches" the dictionary - so that it appears to
be current - without regenerating it.

Generating the dictionary is typically a quick operation, so just
leaving off the -t on Ultrix systems will probably not cost much.

-- 
Ed Gould                    mt Xinu, 2560 Ninth St., Berkeley, CA  94710  USA
ed at mtxinu.COM		    +1 415 644 0146

"I'll fight them as a woman, not a lady.  I'll fight them as an engineer."



More information about the Comp.unix.ultrix mailing list