bugmake - Bugs: bug #40236, include, -include and sinclude...

 
 

bug #40236: include, -include and sinclude ignores failures to read the included file

Submitter:  None
Submitted:  Thu 10 Oct 2013 12:13:16 PM UTC
   
 
Severity:  3 - Normal Priority:  5 - Normal
Item Group:  Bug Status:  Fixed
Privacy:  Public Assigned to:  psmith
Open/Closed:  Closed Component Version:  4.0
Operating System:  POSIX-Based Fixed Release:  4.3
Triage Status:  Medium Effort
* Mandatory Fields

Post a Comment

Add a New Comment Rich Markup
   

Discussion

Mon 26 Dec 2016 02:34:47 PM UTC, comment #1: 

Fix pushed.  Thanks for the report!

Paul D. Smith <psmith>
Group administrator
Thu 10 Oct 2013 12:13:16 PM UTC, original submission:  

(this problem exists in 3.81 too)

% cat makefile
include hard.mk
-include soft.mk

all:
        echo ">$(hard)<"
        echo ">$(soft)<"

% cat hard.mk
hard=HARD

% cat soft.mk
soft=SOFT

% ls -l
-rw-rw-r-- 1 qtedlyn users 75 Oct 10 13:50 makefile
-rw-rw-r-- 1 qtedlyn users 10 Oct 10 13:50 hard.mk
-rw-rw-r-- 1 qtedlyn users 10 Oct 10 13:50 soft.mk

% make
echo ">HARD<"

>HARD<

echo ">SOFT<"

>SOFT<

% echo $status
0

So far, so good. Now we simulate problems reading the included files.

% chmod 0 *.mk
% ls -l
-rw-rw-r-- 1 qtedlyn users 75 Oct 10 13:50 makefile
---------- 1 qtedlyn users 10 Oct 10 13:50 hard.mk
---------- 1 qtedlyn users 10 Oct 10 13:50 soft.mk

% make
makefile:1: hard.mk: Permission denied
echo "><"

><

echo "><"

><

% echo $status
0

Success...?

The logic in read.c specifies a very small set of unrecoverable errors. It seems to me like at least these should be added to the list:

EIO           /* I/O error */
ENXIO         /* No such device or address */
EACCES        /* Permission denied */

The logic should probably be reversed to specify errors known to be recoverable instead of vice-a-versa.

Anonymous

 

Attached Files

This item currently has no attached files.

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

Attach Files:
   
   
Comment:
   

 

Dependencies

This item does not depend on any other items.

No items depend on this one.

 

Mail Notification Carbon-Copy List

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

    Votes

    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.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

    History

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-12-26 psmith StatusNone Fixed
        Assigned toNone psmith
        Open/ClosedOpen Closed
        Fixed ReleaseNone 4.3
        Triage StatusNone Medium Effort

    Back to the top

    Powered by Savane 3.16-046d.
    Corresponding source code