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 Oct 10 12:13:16 2013  
 
Severity: 3 - NormalItem Group: Bug
Status: FixedPrivacy: Public
Assigned to: Paul D. Smith <psmith>Open/Closed: Closed
Component Version: 4.0Operating System: POSIX-Based
Fixed Release: SCMTriage Status: Medium Effort

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

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

 

Mon Dec 26 14:34:47 2016, comment #1:

Fix pushed. Thanks for the report!

Paul D. Smith <psmith>
Project AdministratorIn charge of this item.
Thu Oct 10 12:13:16 2013, 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

 

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

    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):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon Dec 26 14:34:47 2016psmithStatusNone=>Fixed
      Assigned toNone=>psmith
      Open/ClosedOpen=>Closed
      Fixed ReleaseNone=>SCM
      Triage StatusNone=>Medium Effort

    Back to the top


    Powered by Savane 3.1-cleanup