From owner-freebsd-ports@FreeBSD.ORG Thu Jan 12 21:30:43 2012 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 56BB91065670 for ; Thu, 12 Jan 2012 21:30:43 +0000 (UTC) (envelope-from utisoft@gmail.com) Received: from mail-tul01m020-f182.google.com (mail-tul01m020-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 1CAF68FC14 for ; Thu, 12 Jan 2012 21:30:42 +0000 (UTC) Received: by obbta17 with SMTP id ta17so1939887obb.13 for ; Thu, 12 Jan 2012 13:30:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=EMDYeHf1YM7pvO17c1pjpSgve+In4jyzxlpnWe76qeM=; b=xQvfUtjXNj43wkaLMrevhWegNfY+AssPMB8K+RoK5Qei0YO6MfB2/wzHpW3H9Er1xx /dt+hPaaHCHfqGJ4x5q3kl/4RlVm9TtSewAUO+8N9olAMM2Uh4mpp96OEFmkcRdiuiw5 k28UMa/9X8eFxSchtavDuM0tiblTf+r5xYwJM= Received: by 10.50.193.229 with SMTP id hr5mr6378298igc.15.1326403842315; Thu, 12 Jan 2012 13:30:42 -0800 (PST) MIME-Version: 1.0 Sender: utisoft@gmail.com Received: by 10.231.207.7 with HTTP; Thu, 12 Jan 2012 13:30:11 -0800 (PST) In-Reply-To: <20120112062705.GA63861@dormouse.experts-exchange.com> References: <4F0E395B.6020201@herveybayaustralia.com.au> <4F0E4D20.405@missouri.edu> <4F0E5809.4020700@herveybayaustralia.com.au> <4F0E5A92.2050607@missouri.edu> <4F0E5E1E.20904@herveybayaustralia.com.au> <4F0E60B6.4040904@missouri.edu> <20120112062705.GA63861@dormouse.experts-exchange.com> From: Chris Rees Date: Thu, 12 Jan 2012 21:30:11 +0000 X-Google-Sender-Auth: J01wGfDXvrgZp9G-n3aznmLo1IE Message-ID: To: Jason Helfman Content-Type: text/plain; charset=ISO-8859-1 Cc: Stephen Montgomery-Smith , Da Rock , FreeBSD Ports , ahze@freebsd.org Subject: Re: unassociated shell command X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jan 2012 21:30:43 -0000 On 12 January 2012 06:27, Jason Helfman wrote: > On Wed, Jan 11, 2012 at 10:25:26PM -0600, Stephen Montgomery-Smith thus > spake: >> >> On 01/11/2012 10:14 PM, Da Rock wrote: >>>>>>> >>>>>>> I'm still very new to this, but I'm almost complete on my first >>>>>>> port. I >>>>>>> do have an unusual error which crops up from time to time and I'm >>>>>>> usually able to fudge along and clear it- but this last little bit >>>>>>> won't >>>>>>> clear! >>>>>>> >>>>>>> The particular lines in question are as follows: >>>>>>> >>>>>>> post-extract: >>>>>>> [snip] >>>>>>> .if defined(NOPORTDOCS) >>>>>>> @if [ -d ${WRKDIR}/usr/share/doc ]; then \ >>>>>>> ${RM} -rf ${WRKDIR}/usr/share/doc; \ >>>>>>> fi >>>>>>> PLIST_SUB+="@comment " >>>>>>> .else >>>>>>> PLIST_SUB+= PORTDOCS="" >>>>>>> .endif >>>>>>> >>>>>>> and I get the following error make -DNOPORTDOCS install: >>>>>>> "Makefile", line 59: Unassociated shell command "@if [ -d >>>>>>> ${WRKDIR}/usr/share/doc ]; then ${RM} -rf ${WRKDIR}/usr/share/doc; >>>>>>> fi" >>>>>>> make: fatal errors encountered -- cannot continue >>>>>>> >>>>>>> What am I possibly missing? No googling helps, and I've tried many >>>>>>> different tricks that have worked in the past as ${DIRRM}, ${RM}, >>>>>>> individual directory/file removal, etc. >>>>>>> >>>>>>> The indentation is exactly as in the Makefile. > > > Is the indentation whitespace, or using tabs? It should be tabs, in my > experience. > Quite right, it should be tabs! Also, no, you shouldn't (can't) set Make variables inside a target, as covered before. However... instead of .if defined(NOPORTDOCS) PLIST_SUB etc etc stuff, just remove all the PORTDOCS lines from pkg-plist, and use the magic variable PORTDOCS: PORTDOCS= * :) Chris