From owner-freebsd-current  Mon Aug 14 10:14:31 1995
Return-Path: current-owner
Received: (from majordom@localhost)
          by freefall.FreeBSD.org (8.6.11/8.6.6) id KAA02513
          for current-outgoing; Mon, 14 Aug 1995 10:14:31 -0700
Received: from mail.cs.tu-berlin.de (mail.cs.tu-berlin.de [130.149.17.13])
          by freefall.FreeBSD.org (8.6.11/8.6.6) with ESMTP id KAA02488
          for <current@freebsd.org>; Mon, 14 Aug 1995 10:14:18 -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 TAA02053; Mon, 14 Aug 1995 19:04:12 +0200
From: Wolfram Schneider <wosch@cs.tu-berlin.de>
Received: (wosch@localhost) by caramba.cs.tu-berlin.de (8.6.12/8.6.9) id TAA17375; Mon, 14 Aug 1995 19:04:04 +0200
Date: Mon, 14 Aug 1995 19:04:04 +0200
Message-Id: <199508141704.TAA17375@caramba.cs.tu-berlin.de>
To: Bruce Evans <bde@zeta.org.au>
Cc: wollman@halloran-eldar.lcs.mit.edu, current@freebsd.org
Subject: Re: make(1) extension for SHELL COMMANDS
In-Reply-To: <199508141637.CAA22537@godzilla.zeta.org.au>
References: <199508141637.CAA22537@godzilla.zeta.org.au>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
Sender: current-owner@freebsd.org
Precedence: bulk

Bruce Evans writes:
>>pmake use /bin/sh -c or /bin/sh -ec
>
>>    } 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);
>
>Does it handle weird $IFS's?

No. 
$ egrep IFS /src/usr.bin/make/* | grep -v WIFS


This do only gnu-make:

make-3.74/job.c:
/* Figure out the argument list necessary to run LINE as a command.  Try to
   avoid using a shell.  This routine handles only ' quoting, and " quoting
   when no backslash, $ or ` characters are seen in the quotes.  Starting
   quotes may be escaped with a backslash.  If any of the characters in
   sh_chars[] is seen, or any of the builtin commands listed in sh_cmds[]
   is the first word of a line, the shell is used.

   If RESTP is not NULL, *RESTP is set to point to the first newline in LINE.
   If *RESTP is NULL, newlines will be ignored.

   SHELL is the shell to use, or nil to use the default shell.
   IFS is the value of $IFS, or nil (meaning the default).  */


Wolfram