help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Weird behavior in case of using archive rules for archives other tha


From: Christian Hujer
Subject: Re: Weird behavior in case of using archive rules for archives other than ar/.a, i.e. jar/.jar
Date: Tue, 10 Mar 2015 19:15:36 +0530

Hello,

On Tue, Mar 10, 2015 at 6:48 PM, Paul Smith <address@hidden> wrote:
> On Tue, 2015-03-10 at 18:24 +0530, Christian Hujer wrote:
>> trying to use archive rules for jar (placeholder for any kind of
>> archive other than ar archive/ranlib static link library).
>
> You can't do that.  Archive rules work ONLY with real archives (libX.a
> files), created with the UNIX ar(1) utility.
>
> GNU make has C code that knows how to parse an ar archive file and
> examine its contents: this is the only way make's archive capability can
> work (it must be able to obtain a table of contents that includes
> timestamps).  That code can't parse any kind of file, just ar files.  In
> particular jar files are ZIP files, which are totally different.

Okay, I wasn't aware that make actually peeks inside the archive file.
So, I guess it would work if I would have an ar2jar utility.
(Should be a trivial shell script).
Or, if someone patches make to also support other formats than .a -
which BTW I think would be neat because there are some toolchains out
there which have a different format for their static link libraries.
I'm not promoting them, I'm just thinking of those ppl having to deal with them.

Thanks, that explains.

Christian



reply via email to

[Prev in Thread] Current Thread [Next in Thread]