help-make
[Top][All Lists]
Advanced

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

Re: dependencies in other folders


From: Philip Guenther
Subject: Re: dependencies in other folders
Date: Tue, 2 Sep 2008 14:27:26 -0600

On Tue, Sep 2, 2008 at 2:17 AM, Eduardo Suárez <address@hidden> wrote:
> Philip Guenther wrote:
>>
>> Sorry, let me clarify: right now, Eduardo's makefile contains rules
>> for copying files from other directories to the current directory.  It
>> may be possible to simply remove those rules and instead specify the
>> other directories via VPATH or vpath.
>
> I haven't understood this. Are there examples available somewhere?

The first step is to read the section of the make info pages that
describes how VPATH and vpath work, in section 4.5, "Searching
Directories for Prerequisites".

As for examples, some have been posted to this list in the past.
Searching the list archives for "VPATH" is probably a good start.


>> If the local copies of those
>> files are just used as prerequisites for other targets whose rules
>> only reference them via automatic variables such as $< or $?, then
>> that'll Just Work.  If they are used indirectly or are referenced by
>> name instead of via automatic variables then that won't work.
>
> This also is not clear for me. Are there examples in the info page?

Did you read section 4.5.4, "Writing Shell Commands with Directory Search"?

It would help if you actually explained why your existing makefile is
doing those copies.  What are the targets and command with which those
local copies are used?


Philip Guenther




reply via email to

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