[Top][All Lists]

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

[bug #58472] Modernization of the include path

From: anonymous
Subject: [bug #58472] Modernization of the include path
Date: Sun, 31 May 2020 15:13:45 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) snap Chromium/83.0.4103.61 Chrome/83.0.4103.61 Safari/537.36


                 Summary: Modernization of the include path
                 Project: make
            Submitted by: None
            Submitted on: Sun 31 May 2020 07:13:43 PM UTC
                Severity: 3 - Normal
              Item Group: Enhancement
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
       Component Version: SCM
        Operating System: Any
           Fixed Release: None
           Triage Status: None



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 for user-installed
software established beside /usr and /usr/local.
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 each of their make calls which would be inconvenient.

This feature looks portable:
* The entry $HOME/.local/include can be assumed on all POSIXy systems.
  No harm is done if that directory is part of the include path but doesn't
  This assumes that the mechanism that scans the include paths for include
files will continue to silently ignore non-existent directories.
* 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):
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


Reply to this item at:


  Message sent via Savannah

reply via email to

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