bugmake - Bugs: bug #60412, Avoid default include directories...

 
 

bug #60412: Avoid default include directories when searching for included files.

Submitter:  Dmitry Goncharov <dgoncharov>
Submitted:  Sat 17 Apr 2021 08:34:55 PM UTC
   
 
Severity:  3 - Normal Item Group:  Enhancement
Status:  Fixed Privacy:  Public
Assigned to:  psmith Open/Closed:  Closed
Component Version:  4.4 Operating System:  POSIX-Based
Fixed Release:  None Triage Status:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 06 Sep 2021 02:49:51 AM UTC, comment #1: 

This was fixed by providing two enhancements:

First, it's now possible to add a "-I-" option to the command line.  If this is done then make forgets about any include file search directories that precede this option (including the default ones).

Second, changes to the MAKEFLAGS variable inside the makefile are now parsed immediately when that variable is modified rather than only after all makefiles are read in.

So, it is now possible to say:

  make -I-

to remove all default search directories, and also to add:

  MAKEFLAGS += -I-

to remove all default search directories from within the makefile.

Paul D. Smith <psmith>
Group administrator
Sat 17 Apr 2021 08:34:55 PM UTC, original submission:  

Make searches the default include directories for included files.
This new option -a tells make to skip the default include directories.
In my practice, /usr/include, /usr/gnu/include and /usr/local/include contain header files and never contain makefiles.
Users cannot store their owns hand-written makefiles or generated dep files in these directories, because these directories are owned by root.
The only effect of this lookup is to slow down make.
Not sure, if this lookup can be removed from make. Therefore, this new option to avoid it.

Dmitry Goncharov <dgoncharov>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #51283:  sv60412_dash_a_test.diff added by dgoncharov (1020B - text/x-patch)
file #51284:  sv60412_dash_a_doc.diff added by dgoncharov (1KiB - text/x-patch)
file #51282:  sv60412_dash_a.diff added by dgoncharov (3KiB - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by psmith (Posted a comment)
  • -email is unavailable- added by dgoncharov (Submitted the item)
  •  

    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.

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-09-06 psmith StatusNone Fixed
        Assigned toNone psmith
        Open/ClosedOpen Closed
    2021-04-17 dgoncharov Attached File- Added sv60412_dash_a_test.diff, #51283
        Attached File- Added sv60412_dash_a_doc.diff, #51284
    2021-04-17 dgoncharov Attached File- Added sv60412_dash_a.diff, #51282

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code