help-make
[Top][All Lists]
Advanced

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

Re: Using the target of a pattern rule as a prerequisite


From: Noel Yap
Subject: Re: Using the target of a pattern rule as a prerequisite
Date: Fri, 04 Jun 2004 15:34:47 -0400
User-agent: Mozilla Thunderbird 0.5 (Windows/20040212)

David Boyce wrote:

At 11:07 AM 6/4/2004, Noel Yap wrote:
and only the decision not to allow "#include <Foo.H>" will resolve the situation.

This is not correct. Depending on the searched directories *is* another way to solve the same problem. Which way is better is an open question: reasonable people may disagree and those people may even change their minds depending on circumstances. I'm comfortable with noting that both options are on the table.

I disagree (but you knew that already :-).

Allowing '#include <Foo.H>' means that each object file needs its own include 
path (in order for each object file to specify which Foo.H it needs).  Except for 
trivial projects, this doesn't fly.

Moreover, what if both Foo.H's are needed?  For example:

# bar/Foo.H
namespace bar
{
        struct Foo
        {
                char c;
        };
}

# baz/Foo.H
namespace baz
{
        struct Foo
        {
                long c;
        };
}

# foo.C
#include <bar/Foo.H>
#include <baz/Foo.H>

int main( int argc_, char** argv_ )
{
        bar::Foo f0;
        baz::Foo f1;

        f0.c = 'l';
        f1.c = f0.c;
}

Noel





reply via email to

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