C[++]: Normalizing include syntax ("" vs <>)

Kaganski Mike mikekaganski at hotmail.com
Mon Oct 9 22:25:40 UTC 2017


09.10.2017 12:23, Stephan Bergmann пишет:
> On 10/09/2017 10:29 AM, Stephan Bergmann wrote:
>> On 10/06/2017 11:26 AM, Kaganski Mike wrote:
>>> 3. *Always* use "" syntax *only* for includes that refer to headers
>>> placed next to the current source in the same directory (or
>>> subdirectories), i.e. that would be found using the "." entry of -I
>>> switch. These are implementation headers. This applies to both includes
>>> in c[xx] files as well as in h[xx] residing in directories like
>>> /sw/source/core/access (as opposed to those in /sw/inc).
>> Does that mean that once you're done we can stop adding -I. to 
>> SOLARINC in configure.ac?  (Also, it's unclear to me what
>>    -I$(dir $(3))
>> in gb_CObject__command_pattern in 
>> solenv/gbuild/platform/com_{GCC,MSC}_class.mk is good for, and 
>> whether it could then be dropped, too.)

Yes, that was my plan, but ...

> Seeing that both solenv/gbuild/platform/com_{GCC_defs,MSC_class}.mk 
> already drop SOLARINC's -I. from gb_LinkTarget_INCLUDE, it is probably 
> rather the latter -I$(dir $(3)) that can be dropped from 
> gb_CObject__command_pattern in 
> solenv/gbuild/platform/com_{GCC,MSC}_class.mk once you're done.

You are quite right, this is what should be ultimately removed. Thank you!

> (And -I. dropped from SOLARINC in configure.ac as an orthogonal clean 
> up?  Would need auditing what other places using SOLARINC (besides 
> those gb_LinkTarget_INCLUDE that drop it anyway) might need it for.)
> _______________________________________________
> LibreOffice mailing list
> LibreOffice at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/libreoffice

Mike Kaganski

More information about the LibreOffice mailing list