From owner-freebsd-hackers@freebsd.org Sun Nov 22 00:05:14 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 3F4BBA34C41 for ; Sun, 22 Nov 2015 00:05:14 +0000 (UTC) (envelope-from yuri@rawbw.com) Received: from shell1.rawbw.com (shell1.rawbw.com [198.144.192.42]) by mx1.freebsd.org (Postfix) with ESMTP id 291D914C8 for ; Sun, 22 Nov 2015 00:05:13 +0000 (UTC) (envelope-from yuri@rawbw.com) Received: from yuri.doctorlan.com (c-50-184-63-128.hsd1.ca.comcast.net [50.184.63.128]) (authenticated bits=0) by shell1.rawbw.com (8.15.1/8.15.1) with ESMTPSA id tAM05C14008996 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Sat, 21 Nov 2015 16:05:13 -0800 (PST) (envelope-from yuri@rawbw.com) X-Authentication-Warning: shell1.rawbw.com: Host c-50-184-63-128.hsd1.ca.comcast.net [50.184.63.128] claimed to be yuri.doctorlan.com Subject: Re: Here documents: do they work in FreeBSD make? To: Tim Kientzle References: <5650FB25.2060408@rawbw.com> Cc: Freebsd hackers list From: Yuri Message-ID: <565106B2.9090606@rawbw.com> Date: Sat, 21 Nov 2015 16:05:06 -0800 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed 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 00:05:14 -0000 On 11/21/2015 15:51, Tim Kientzle wrote: > If you really need to build files programmatically as > part of your makefile, create separate shell scripts > and invoke those from make instead: Yes, I know this, but I am doing this for the USES module, and I will have to create the second file for this module under Mk/Scripts or something. I am trying to avoid this. Per-line output like this ${ECHO} "..." >> ${MY_DIR}/my-file works, but it suffers from the escaping problem. Requires to modify the source with escaping sequences. I was thinking that 'here document' could help, but they it doesn't work for some reason. I am trying to find the simplest solution. Yuri