bug-make
[Top][All Lists]
Advanced

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

Re: [bug #42270] Make needs to canonicalise paths


From: Edward Welbourne
Subject: Re: [bug #42270] Make needs to canonicalise paths
Date: Sat, 03 May 2014 14:12:46 +0000

> Plainly _AA_ and _$(abspath AA)_ are the same file, but make doesn't think so.
> Make seems just to use string matching (other relative paths to the same file
> are seen as different files (_subdir/../A.. for instance)).

That is correct: make targets are strings.  Distinct strings are treated
as distinct targets, even if they name the same file.

> This is playing havoc with auto-generated dependencies, some of which are
> built by make rules.

How are you generating your dependencies ?
It may be necessary to post-process the generated dependency files with
a hairy invocation of sed to canonicalise the paths.

It remains that it is up to the author of the makefiles to canonicalise
names - or, rather, chose a canonical way to refer to each file.  It is
not make's job to do that.  Thus has it always been.

        Eddy.



reply via email to

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