[Top][All Lists]

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

dependency problem with -l library prereqs?

From: Karen Paffendorf
Subject: dependency problem with -l library prereqs?
Date: Thu, 01 Dec 2005 18:13:33 -0800
User-agent: Mozilla Thunderbird 0.8 (Windows/20040913)


I am having problems in trying to use a dependency on a -l if the directory the library is built in does not exist when the build starts.
(See below for simple example.)

I know how to work around the problem by depending on the file explicately and linking it in with -L and -l on the command line, but was hoping to use this nifty looking syntax. Seemed like it would help in using more generalized rules.

--- Begin Message --- Date: Thu, 1 Dec 2005 17:21:08 -0800 (PST)
# Simple make file to reproduce "knowing how to make library" failure

#$ gmake -f pre.mk whatever
#gmake: *** No rule to to make target `-lmy', needed by `whatever'.  Stop.
#$ mkdir exists
#$ gmake -f pre.mk whatever DIR=exists
#touch exists/libmy.so


        mkdir -p $(DIR)

        touch $@

whatever: -lmy
        @echo $^

vpath libmy% $(DIR)

--- End Message ---

reply via email to

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