help-make
[Top][All Lists]
Advanced

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

Re: Using "-l" libraries as targets


From: Jed Brown
Subject: Re: Using "-l" libraries as targets
Date: Tue, 02 Jun 2015 17:46:25 +0200
User-agent: Notmuch/0.19+110~gea782ec (http://notmuchmail.org) Emacs/25.0.50.1 (x86_64-unknown-linux-gnu)

Paul Smith <address@hidden> writes:
> I think it's better to just always use "libfoo.a" as a prerequisite, if
> that's what you want.  It's easy enough to use patsubst in the recipe to
> convert them to -l options, if you want:
>
>    $(LINK.cc) -o $@ $(patsubst lib%.a,-l%,$^)

But please don't do this because some day someone will have a libfoo.so
in their path and they'll (a) give up on your software, (b) write you
with an incomprehensible support request and waste your time, or (c)
curse you for wasting their time.  Explicit is better here.

Attachment: signature.asc
Description: PGP signature


reply via email to

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