[Top][All Lists]

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

Re: Suggestion: Modernization of the include path

From: Edward Welbourne
Subject: Re: Suggestion: Modernization of the include path
Date: Tue, 2 Jun 2020 09:36:57 +0000

Christian Hujer (31 May 2020 15:53) wrote
> I suggest that
> a) $HOME/.local/include is effectively added to the
>    include_directories, as if it were inserted in
>    default_include_directories before /usr/gnu/include.
> b) Change function src/read.c/eval_makefile() to loop over
>    .INCLUDE_DIRS instead of include_directories when searching for
>    another Makefile.

Reasonable enough, with one proviso: this should be specified relative
to some freedesktop.org-defined environment variable,
e.g. $XDG_DATA_HOME [0], rather than hard-coding $HOME/.local/; if that
environment variable isn't set but HOME is, then by all means fall back
on $HOME/.local/.  Then those who want to organise their user-specific
"system" config differently can do so without being forced into a
particular layout under $HOME.

[0] https://specifications.freedesktop.org/basedir-spec/latest/ar01s03.html
in which XDG_DATA_HOME actually defaults to ~/.local/share/, so you'd be
tacking include/ onto the end of that, which would add a share/ step
that wasn't present in your proposal.  The cross-platform nature of
share/ seems appropriate to the uses you describe, but perhaps some
better XDG env var is available, that defaults to ~/.local/


reply via email to

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