[Top][All Lists]

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

Re: [make] include of include

From: Henrik Carlqvist
Subject: Re: [make] include of include
Date: Mon, 14 Sep 2009 23:49:13 +0200
User-agent: Pan/0.14.2 (This is not a psychotic episode. It's a cleansing moment of clarity.)

Eric <> wrote:
> consider the following host structure:
> application/services/makerules/check.rule: [...]
> include ./instrdeps.rule
> [...]

./ means your current directory, that is supposed to be the directory
which you have done cd to.
> application/services/makerules/instrdeps.rule [...]
> application/models/BD/Makefile:
> [...]
> include ../../services/makerules/check.rule [...]

check.rule is said to be in another directory as the complete path is
given to check.rule.
> The following error is then showing up:
> ../../services/makerules/check.rule:2: instrdep.rule: No such file or
> directory

That is because instrdep.rule is not in your current directory, as you
have shown above it is in the same directory as check.rule and should be
located with the same path.

> I was awaiting that the include directive first seeks for the file to
> include in the same directory where the file originally exists. What I
> mean, is that the file check.rule "include ./instrdeps.rule" should look
> for the instrdeps.rule in the same directory as where the check.rule is
> located.

No, ./ means your current directory, not the directory of your last
included file.

> Now that I witnessed this strange include methods, does someone have an
> idea how I could solve my problem?

You could move instrdeps.rule to your current directory which probably is
application/models/BD or you could give the relative path to

> Note: I have to use relative paths

That is usually a good idea as it makes your source tree relocatable.

regards Henrik
The address in the header is only to prevent spam. My real address is:
hc3(at) Examples of addresses which go to spammers:
root@localhost postmaster@localhost

reply via email to

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