From owner-freebsd-standards@FreeBSD.ORG Tue May 25 08:50:50 2004 Return-Path: Delivered-To: freebsd-standards@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C616A16A53C for ; Tue, 25 May 2004 08:50:49 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8905143D31 for ; Tue, 25 May 2004 08:50:49 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) i4PFoW5N027762 for ; Tue, 25 May 2004 08:50:32 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i4PFoWEN027761; Tue, 25 May 2004 08:50:32 -0700 (PDT) (envelope-from gnats) Date: Tue, 25 May 2004 08:50:32 -0700 (PDT) Message-Id: <200405251550.i4PFoWEN027761@freefall.freebsd.org> To: freebsd-standards@FreeBSD.org From: Harti Brandt Subject: Re: standards/66357: make POSIX conformance problem ('sh -e' & '+' command-line flag) X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Harti Brandt List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 May 2004 15:50:50 -0000 The following reply was made to PR standards/66357; it has been noted by GNATS. From: Harti Brandt To: "Mark D. Baushke" Cc: FreeBSD-gnats-submit@FreeBSD.ORG Subject: Re: standards/66357: make POSIX conformance problem ('sh -e' & '+' command-line flag) Date: Tue, 25 May 2004 17:43:07 +0200 (MET DST) [CC's removed] [Sorry for the delay, I just discovered that this is still in my mailbox]. On Mon, 10 May 2004, Mark D. Baushke wrote: > Harti Brandt writes: > > > On Fri, 7 May 2004, Mark D. Baushke wrote: > > > > > > > > >Number: 66357 > > > >Category: standards > > > >Synopsis: make POSIX conformance problem ('sh -e' & '+' command-line) > ... > > > >Description: > > > Background: > > > > > > POSIX 1003.2-1997 states that each makefile command line is processed > > > as if given to system(3) (see URL > > > http://www.opengroup.org/onlinepubs/009695399/utilities/make.html) > > > > > > POSIX 1003.1-2004 (as well as older versions of the standard) states > > > that system() does not use the "sh -e" command to exit immediately if > > > any untested command fails in non-interactive mode. (see URL > > > http://www.opengroup.org/onlinepubs/009695399/functions/system.html) > ... > > > > The 'sh -e' servers a purpose if you have a more > > complicated shell line say a loop. Without -e make will > > not stop even if there is an error in an inner command of > > a shell loop, while with -e it will exit. I'd say that not > > using -e is a posix-bug, not a feature and, in fact, there > > has been thoughts on the austin group mailing list to > > review this. > > If you have any particular URLs for those austin group > mailing list threads, I would be interested in reading them. > I tried to do a quick google search and did not meet with > success to finding such a discussion. I'm currently moving jobs and have no access to my link-list, but you should be able to find the mailing lists on the opengroup web page. I know that they are not easy to find - watch for Austing Group. > > > I'd think even if we remove the -e in the posix case, we > > must retain it in the non-posix case. > > fwiw: I have found the 'sh -e' feature to be fragile and > more likely to do the wrong thing in a complicated action > rule especially across multiple platforms. The big problem is things like HDRS=a.h b.h c.h install: for i in $(HDRS) ; do cp $$i /dest ; done If one of the cp's fail, make should abort. That is possible only when doing sh -e. Otherwise a failing cp will just go by unnoticed. What kind of fragility did you see? > I also wonder if you will also have time to consider how to > deal with a .POSIX: setting in a Makefile after sys.mk has > already apparently been read in and processed including a > number of .if defined(%POSIX) macros settings being done > already before the first line of the user's Makefile is > processed... There is a long way to get our make POSIX compliant. I think this should be done very careful step by step. I have already one change in the pipe for three months now (standards/57295) - the problem is not to break large numbers of ports, so I really don't want to comnment on the %POSIX stuff atm. Perhaps it would be best to open another PR for this so we don't mix different things. > I look forward to learning what FreeBSD will do. I'll try to move our make in the POSIX direction, but, as I said this will take some time because make is a very central utility to the system. Let me first get the above PR finished, the I will move on to this one. harti