help-make
[Top][All Lists]
Advanced

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

Suggestion: Modernization of the include path


From: Christian Hujer
Subject: Suggestion: Modernization of the include path
Date: Sat, 16 May 2020 20:18:14 +0530

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
condition.

Rationale for b):
INCLUDE_DIRS+=${HOME}/.local/include
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
CEO/CTO
Nelkinda Software Craft Pvt Ltd
+91 77 2003 6661 (while in India)
+49 162 4124108 (while in Germany)



reply via email to

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