Suggestion: Modernization of the include path

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Suggestion: Modernization of the include path

Christian Hujer
Hello everyone,

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.

Rationale for a):
The $HOME/.local directory tree is a directory tree established
besides /usr and /usr/local for user-installed software.
By supporting $HOME/.local/include as a default include directory,
users of make could share modules by "installing" them into their
$HOME/.local/include directory without needing administrator
privileges (required for installing in /usr/include or
/usr/local/include or /usr/gnu/include), and without appending -I
~/.local/include to the make call.
This feature looks portable:
* The entry $HOME/.local/include can be assumed on all POSIXy systems.
* On Windows, there is a corresponding directory, I can create a VM if
the details are needed.
* On Amiga OS, the variable $HOME is optional and usually only set if
something like MuFS or GNU is used in an extended configuration. Make
could check if $HOME is set and include the entry based on that

Rationale for b):
has no effect and does not print any error message, which is not
friendly towards users of make.
Something should either work, or when it doesn't, it should print an
error message.

Best regards,
Christian Hujer
Nelkinda Software Craft Pvt Ltd
+91 77 2003 6661 (while in India)
+49 162 4124108 (while in Germany)