Date: Mon, 26 Mar 2018 10:56:43 -0600 From: Gary Aitken <freebsd@dreamchaser.org> To: Don Lewis <truckman@FreeBSD.org> Cc: FreeBSD Mailing List <freebsd-ports@freebsd.org> Subject: Re: .if and Makefile issues Message-ID: <8e6d703c-5ac6-c741-b705-aebf5e909ee8@dreamchaser.org> In-Reply-To: <tkrat.197ad5a70131afd1@FreeBSD.org> References: <85769c6d-a71a-f2c6-8a65-ac9b82f534ab@dreamchaser.org> <tkrat.f98dfb3939b1bfe1@FreeBSD.org> <tkrat.197ad5a70131afd1@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 03/26/18 01:11, Don Lewis wrote: > On 25 Mar, Don Lewis wrote: >> On 25 Mar, Gary Aitken wrote: <snip> > I forgot that all of the lines from the "if" up to but not including > "fi" need to end with a \ so that make treats them all as one > multi-line shell command: > > post-build: > <ht>echo "***** post-build *****" > <ht># Avoid executable name conflict with dcraw port > <ht>if [ -e ${WRKSRC}/dcraw ]; then \ > <ht><ht>echo ===== dcraw exists ===== \ > <ht><ht>mv ${WRKSRC}/dcraw ${WRKSRC}/${PORTNAME}-dcraw \ > <ht>else \ > <ht><ht>echo ===== dcraw does not exist ===== \ > <ht>fi Thanks, and thanks also to Theron Tarigo for his solution. In case anyone in the future is looking at this: The above doesn't work because of a few missing ; (not a Makefile related issue; a shell syntax issue) What works: post-build: <ht>echo "***** post-build *****" #<ht>Avoid executable name conflict with dcraw port <ht>if [ -e ${WRKSRC}/dcraw ] ; then \ <ht><ht>echo "===== dcraw exists =====" ; \ <ht><ht>mv ${WRKSRC}/dcraw ${WRKSRC}/${PORTNAME}-dcraw ; \ <ht>else \ <ht><ht>echo "===== dcraw does not exist =====" ; \ <ht>fi Thanks again, Gary
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?8e6d703c-5ac6-c741-b705-aebf5e909ee8>