tech-toolchain archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: ar "zero" flag
Jason Thorpe <thorpej%shagadelic.org@localhost> writes:
> On Aug 6, 2008, at 8:52 AM, Perry E. Metzger wrote:
>> Back in the days when it took a very long time to build a .a file
>> up from sources, it was valuable during development to allow make to
>> do dependency analysis based on the time stamps of objects inside the
>> ar files. That way you could compile just the one .c file you altered,
>> and replace the .o inside the .a file, all automatically.
>
> And our make(1) supports this?
Yes. I had no idea it supported it until I started looking in to this
whole issue, since I've never used it even once. It is even spec'ed in
POSIX:
Libraries
If a target or prerequisite contains parentheses, it shall be
treated as a member of an archive library. For the lib( member .o)
expression lib refers to the name of the archive library and
member .o to the member name. The application shall ensure that
the member is an object file with the .o suffix. The modification
time of the expression is the modification time for the member as
kept in the archive library; see ar. The .a suffix shall refer to
an archive library.
You learn something new every day.
The mere fact that this feature exists doesn't mean we are required to
pander to it in our released .a files however. I don't intend to alter
the behavior of make or anything like that -- just to add a flag to ar
and use it from build.sh builds.
> Does GNU make even support it?
Dunno, but it is part of the standard.
Perry
--
Perry E. Metzger perry%piermont.com@localhost
Home |
Main Index |
Thread Index |
Old Index