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

 
 

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

Submitted by:  None
Submitted on:  Thu 10 Oct 2013 12:13:16 PM UTC  
 
Severity: 3 - NormalItem Group: Bug
Status: NonePrivacy: Public
Assigned to: NoneOpen/Closed: Open
Component Version: 4.0Operating System: POSIX-Based
Fixed Release: NoneTriage Status: None

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

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

 

 

No Changes Have Been Made to This Item

Back to the top


Powered by Savane 3.1-cleanup