C++ Logo

sg15

Advanced search

Re: [SG15] Scandeps format post-P1689R3 discussion

From: Gabriel Dos Reis <gdr_at_[hidden]>
Date: Fri, 21 May 2021 20:20:56 +0000
  * that `make` doesn't work with paths, it works with targets

Correct. Part of the reason why I would prefer if we stayed away from filepath in spec as much as possible.

PS: I have been conducting some small scale experiments with the various build systems around (that claim to have some support for ++ Modules) and insisting to express things in terms of files instead of targets (that can have internal tracking) has been frustrating. So, I would really love for us to move away from that.

-- Gaby

From: Steve Downey <sdowney_at_[hidden]>
Sent: Friday, May 21, 2021 1:00 PM
To: ISO C++ Tooling Study Group <sg15_at_[hidden]>
Cc: Gabriel Dos Reis <gdr_at_[hidden]>; Ben Boeckel <ben.boeckel_at_[hidden]>
Subject: Re: [SG15] Scandeps format post-P1689R3 discussion



On Fri, May 21, 2021 at 1:32 PM Ben Boeckel via SG15 <sg15_at_[hidden]<mailto:sg15_at_[hidden]>> wrote:
On Fri, May 21, 2021 at 17:12:10 +0000, Gabriel Dos Reis wrote:
> > How about a `lookup-method` with a limited set of values would make
> > sense? `by-name`, `by-local-path` (""), `by-path` (<>)?
>
> I know the build system works primarily on filepaths, but from the
> source and compiler point-of-view, they may not be "by path". Which
> is why I suggested "angled" and "quoted".

`include-angle` and `include-quote`? Does the standard have better names
for these things?

Not really. The form
# include < h-char-sequence<https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Feel.is%2Fc%2B%2Bdraft%2Flex.header%23nt%3Ah-char-sequence&data=04%7C01%7Cgdr%40microsoft.com%7C22b9fc6d06aa4bf2eca008d91c931bea%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637572240419777208%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=jzLDavuuGGUvgzrKGRasDQGhdQLNnqo9bUEDo7Ail0Y%3D&reserved=0> > new-line<https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Feel.is%2Fc%2B%2Bdraft%2Fcpp.pre%23nt%3Anew-line&data=04%7C01%7Cgdr%40microsoft.com%7C22b9fc6d06aa4bf2eca008d91c931bea%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637572240419787206%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=0HkGXvp%2FJsZlukjwY3Wj6BBe0dzBRwbauWFtTlQvn5E%3D&reserved=0>
imports a header, while the form
# include " q-char-sequence<https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Feel.is%2Fc%2B%2Bdraft%2Flex.header%23nt%3Aq-char-sequence&data=04%7C01%7Cgdr%40microsoft.com%7C22b9fc6d06aa4bf2eca008d91c931bea%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637572240419787206%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=GGd%2FZpQSsTSyqgnr8EL%2F6WrlG2liJ0SxKidFsNbf%2FDo%3D&reserved=0> " new-line<https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Feel.is%2Fc%2B%2Bdraft%2Fcpp.pre%23nt%3Anew-line&data=04%7C01%7Cgdr%40microsoft.com%7C22b9fc6d06aa4bf2eca008d91c931bea%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637572240419797199%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=CcrT2GM77XUs4NE6BGzLjSZ0x6WFlGfx4z3u%2F3tHVEY%3D&reserved=0>
imports a source file, because headers aren't necessarily source files, and might be magic. But that's likely to confuse everyone. And if a "source file" isn't found, it's reprocessed as a header.

http://eel.is/c++draft/cpp.include<https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Feel.is%2Fc%2B%2Bdraft%2Fcpp.include&data=04%7C01%7Cgdr%40microsoft.com%7C22b9fc6d06aa4bf2eca008d91c931bea%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637572240419807191%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=nr1BQSk7vFARh%2BeJi1imhtq69PnhHUwK7cB7Y1zS%2B%2Bk%3D&reserved=0>

It shouldn't matter too much for this, but it's worth keeping in mind that `make` doesn't work with paths, it works with targets, and spelling counts, even if they refer to the same path. That is ./path/file.h and ./path/something/../file.h have no relation to each other from make's point of view.



Received on 2021-05-21 15:21:02