bugmake - Bugs: bug #58472, Modernization of the include path

 
 

bug #58472: Modernization of the include path

Submitter:  None
Submitted:  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
Component Version:  4.4 Operating System:  Any
Fixed Release:  None Triage Status:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 31 May 2020 07:13:43 PM UTC, original submission:  

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

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

Only logged-in users can vote.

 

No changes have been made to this item

Back to the top

Powered by Savane 3.13-f8d8.
Corresponding source code