From owner-freebsd-hackers@freebsd.org Sun Nov 22 03:25:11 2015 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D096AA35FF1 for ; Sun, 22 Nov 2015 03:25:11 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1b.ore.mailhop.org (outbound1b.ore.mailhop.org [54.200.247.200]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ADD561C83 for ; Sun, 22 Nov 2015 03:25:11 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from ilsoft.org (unknown [73.34.117.227]) by outbound1.ore.mailhop.org (Halon Mail Gateway) with ESMTPSA; Sun, 22 Nov 2015 03:25:23 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id tAM3P3x3004177; Sat, 21 Nov 2015 20:25:03 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: <1448162703.1398.5.camel@freebsd.org> Subject: Re: Here documents: do they work in FreeBSD make? From: Ian Lepore To: Yuri , Freebsd hackers list Date: Sat, 21 Nov 2015 20:25:03 -0700 In-Reply-To: <5650FB25.2060408@rawbw.com> References: <5650FB25.2060408@rawbw.com> Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.16.5 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Nov 2015 03:25:11 -0000 On Sat, 2015-11-21 at 15:15 -0800, Yuri wrote: > This syntax doesn't work for me: > @cat <${MY_DIR}/my-file \ > #!/bin/sh \ > \ > echo 'Hello World!' \ > EOF \ > > ${MY_DIR}/my-file is created empty. > > Could anybody give me a hint what am I doing wrong? > The \ line-splicing is being done by make, the shell sees one long string which has a comment delim right after the filename and no here document at all. You should be able to see that if you take the @ off the line (or make -dl). -- Ian