help-make
[Top][All Lists]
Advanced

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

Re: problems depending on -l


From: Boris Kolpackov
Subject: Re: problems depending on -l
Date: Tue, 6 Dec 2005 06:30:28 +0000 (UTC)
User-agent: nn/6.6.5+RFC1522

Karen,

Karen Paffendorf <address@hidden> writes:

> (Still need a resolution of the problem that I reported to the bug team:
> The library only builds if the directory exists.
> It does not trigger the rule that builds the directory the library get
> built in. See below for code to reproduce what I perceive as a bug.)
>
> DIR=not_exists
>
> $(DIR):
>       mkdir -p $(DIR)
>
> $(DIR)/libmy.so:
>       touch $@
>
> whatever: -lmy
>       @echo $^
>
> vpath libmy% $(DIR)

First off, your pattern rule needs to explicitly depend on the
directory:

$(DIR)/libmy.so: | $(DIR)
        touch $@

Then, older versions of GNU make (up to and including 3.80) has an
"optimization" that rejects all implicit rules for which directory
part does not exist. So the above probably will only work for the
next release, beta3 of which you can get here:

ftp://alpha.gnu.org/gnu/make/


And finally, see http://make.paulandlesley.org/vpath.html about
why this still won't work. ;-)


hth,
-boris





reply via email to

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