From owner-freebsd-hackers@freebsd.org Sun Nov 22 00:09:19 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 08664A34D25 for ; Sun, 22 Nov 2015 00:09:19 +0000 (UTC) (envelope-from tim@kientzle.com) Received: from monday.kientzle.com (kientzle.com [142.254.26.11]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A403B1618 for ; Sun, 22 Nov 2015 00:09:18 +0000 (UTC) (envelope-from tim@kientzle.com) Received: (from root@localhost) by monday.kientzle.com (8.14.4/8.14.4) id tALNq118045803; Sat, 21 Nov 2015 23:52:01 GMT (envelope-from tim@kientzle.com) Received: from [192.168.2.108] (192.168.1.101 [192.168.1.101]) by kientzle.com with SMTP id 7i5njn4d8ac48gbc8zjwjs5p56; Sat, 21 Nov 2015 23:52:01 +0000 (UTC) (envelope-from tim@kientzle.com) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 9.1 \(3096.5\)) Subject: Re: Here documents: do they work in FreeBSD make? From: Tim Kientzle In-Reply-To: <5650FB25.2060408@rawbw.com> Date: Sat, 21 Nov 2015 15:51:01 -0800 Cc: Freebsd hackers list Content-Transfer-Encoding: 7bit Message-Id: References: <5650FB25.2060408@rawbw.com> To: Yuri X-Mailer: Apple Mail (2.3096.5) 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 00:09:19 -0000 > On Nov 21, 2015, at 3:15 PM, 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. If you really need to build files programmatically as part of your makefile, create separate shell scripts and invoke those from make instead: In makefile: ${TOPDIR}/build-file ${MY_DIR}/my-file