help-make
[Top][All Lists]
Advanced

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

Re: Cannot use -lname in prereq list?


From: Andre Majorel
Subject: Re: Cannot use -lname in prereq list?
Date: Sun, 24 Aug 2003 13:39:44 +0200
User-agent: Mutt/1.5.3i

On 2003-08-22 21:01 +0000, Robert Mecklenburg wrote:

> I was attempting to use the -l link flag feature in a prerequisite and
> discovered a surprising feature.  make will not match a -lxx
> prerequisite with a libxx.a target.  The obvious makefile works:
> 
>   count_words: count_words.o libcounter.a
>   libcounter.a: libcounter.a(lexer.o)
> 
> But when the libcounter.a prereq is changed to the -l form it fails:
> 
>   count_words: count_words.o -lcounter
>   libcounter.a: libcounter.a(lexer.o)
> 
> When run yields:
> 
>   $ make
>   gcc    -c -o count_words.o count_words.c
>   make: *** No rule to make target `-lcounter', needed by `count_words'.Stop.

You mean you expected GNU make to somehow guess that "-lcounter"
refers ./libcounter.a ? Which flavour of make(1) does that ?

-- 
André Majorel <address@hidden>
http://www.teaser.fr/~amajorel/




reply via email to

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