bug-make
[Top][All Lists]
Advanced

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

Re: Switching from relative paths to absolute directory specifications i


From: Duane Griffin
Subject: Re: Switching from relative paths to absolute directory specifications in make scripts?
Date: Thu, 6 Jul 2017 10:28:26 +1200

On Thu, Jul 6, 2017 at 1:34 AM, SF Markus Elfring
<address@hidden> wrote:
> This test result seems to show that it can make a significant difference
> if such a target was specified by a relative or absolute path.
> (I would expect that these specifications will refer to the same file.)

Keep in mind that targets are opaque strings, not references to files
as such, and hence the exact path matters. E.g. "foo", "./foo",  and
"bar/../foo" are all different targets as far as make is concerned,
even if they all resolve to the same file on disk.

> Do I need to extend the software build rules a bit more here?

Yep, you need to fix your makefile if you want it to work with both
relative and absolute paths. If you are doing complicated things,
especially if you have a modular build system with makefiles in
different sub-directories referring to the same files, you need to be
careful how you use and construct target paths so they are consistent.

Cheers,
Duane.

-- 
"I never could learn to drink that blood and call it wine" - Bob Dylan



reply via email to

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