bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #40236] include, -include and sinclude ignores failures to read the


From: anonymous
Subject: [bug #40236] include, -include and sinclude ignores failures to read the included file
Date: Thu, 10 Oct 2013 12:13:17 +0000
User-agent: Mozilla/5.0 (Windows NT 6.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.69 Safari/537.36

URL:
  <http://savannah.gnu.org/bugs/?40236>

                 Summary: include, -include and sinclude ignores failures to
read the included file
                 Project: make
            Submitted by: None
            Submitted on: tor 10 okt 2013 12.13.16
                Severity: 3 - Normal
              Item Group: Bug
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
       Component Version: 4.0
        Operating System: POSIX-Based
           Fixed Release: None
           Triage Status: None

    _______________________________________________________

Details:

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




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?40236>

_______________________________________________
  Meddelandet skickades via/av Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]