From owner-freebsd-current Mon Aug 14 09:03:40 1995 Return-Path: current-owner Received: (from majordom@localhost) by freefall.FreeBSD.org (8.6.11/8.6.6) id JAA23770 for current-outgoing; Mon, 14 Aug 1995 09:03:40 -0700 Received: from mail.barrnet.net (mail.barrnet.net [131.119.246.7]) by freefall.FreeBSD.org (8.6.11/8.6.6) with ESMTP id JAA23753 for ; Mon, 14 Aug 1995 09:03:36 -0700 Received: from mail.cs.tu-berlin.de (mail.cs.tu-berlin.de [130.149.17.13]) by mail.barrnet.net (8.6.10/MAIL-RELAY-LEN) with ESMTP id JAA29948 for ; Mon, 14 Aug 1995 09:01:53 -0700 Received: from caramba.cs.tu-berlin.de (wosch@caramba.cs.tu-berlin.de [130.149.144.4]) by mail.cs.tu-berlin.de (8.6.12/8.6.12) with ESMTP id RAA27125; Mon, 14 Aug 1995 17:45:53 +0200 From: Wolfram Schneider Received: (wosch@localhost) by caramba.cs.tu-berlin.de (8.6.12/8.6.9) id RAA13872; Mon, 14 Aug 1995 17:45:44 +0200 Date: Mon, 14 Aug 1995 17:45:44 +0200 Message-Id: <199508141545.RAA13872@caramba.cs.tu-berlin.de> To: Garrett Wollman Cc: current@freebsd.org Subject: make(1) extension for SHELL COMMANDS In-Reply-To: <9508141535.AA11245@halloran-eldar.lcs.mit.edu> References: <199508132144.XAA25996@localhost> <9508141504.AA11190@halloran-eldar.lcs.mit.edu> <199508141513.RAA12434@caramba.cs.tu-berlin.de> <9508141535.AA11245@halloran-eldar.lcs.mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Sender: current-owner@freebsd.org Precedence: bulk Garrett Wollman writes: >< said: > >>> Very bad idea, and almost certainly contrary to P1003.2. > >> What says P1003.2 about /bin/sh? > >It's not what it says about the Bourne Shell that's relevant here, >it's what it says about the `make' program. In particular, it says >that all commands are to be executed by means of `/bin/sh -c'. pmake use /bin/sh -c or /bin/sh -ec if (*cp != '\0') { /* * If *cp isn't the null character, we hit a "meta" character and * need to pass the command off to the shell. We give the shell the * -e flag as well as -c if it's supposed to exit when it hits an * error. */ static char *shargv[4] = { "/bin/sh" }; shargv[1] = (errCheck ? "-ec" : "-c"); shargv[2] = cmd; shargv[3] = (char *)NULL; av = shargv; argc = 0; } else { /* * No meta-characters, so no need to exec a shell. Break the command * into words to form an argument vector we can execute. * brk_string sticks our name in av[0], so we have to * skip over it... */ av = brk_string(cmd, &argc, TRUE); >Well, that's yet another way in which pmake is broken with respect to >POSIX. I'm not at all surprised to hear it. We don't need to make >the situation even worse than it already is. Is POSIX a religion? I want a good OS ... -Wolfram