C++ Logo

sg15

Advanced search

Re: [SG15] Scandeps format post-P1689R3 discussion

From: Steve Downey <sdowney_at_[hidden]>
Date: Fri, 21 May 2021 16:00:26 -0400
On Fri, May 21, 2021 at 1:32 PM Ben Boeckel via SG15 <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*
<http://eel.is/c++draft/lex.header#nt:h-char-sequence> > *new-line*
<http://eel.is/c++draft/cpp.pre#nt:new-line>
imports a header, while the form
# include " *q-char-sequence*
<http://eel.is/c++draft/lex.header#nt:q-char-sequence> " *new-line*
<http://eel.is/c++draft/cpp.pre#nt:new-line>
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

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:00:43