From owner-freebsd-ports@FreeBSD.ORG Thu Jan 12 04:25:27 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 BBDFC106564A; Thu, 12 Jan 2012 04:25:27 +0000 (UTC) (envelope-from stephen@missouri.edu) Received: from wilberforce.math.missouri.edu (wilberforce.math.missouri.edu [128.206.184.213]) by mx1.freebsd.org (Postfix) with ESMTP id 7A5508FC17; Thu, 12 Jan 2012 04:25:27 +0000 (UTC) Received: from [127.0.0.1] (wilberforce.math.missouri.edu [128.206.184.213]) by wilberforce.math.missouri.edu (8.14.5/8.14.5) with ESMTP id q0C4PQ1Z045026; Wed, 11 Jan 2012 22:25:26 -0600 (CST) (envelope-from stephen@missouri.edu) Message-ID: <4F0E60B6.4040904@missouri.edu> Date: Wed, 11 Jan 2012 22:25:26 -0600 From: Stephen Montgomery-Smith User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.24) Gecko/20111108 Thunderbird/3.1.16 MIME-Version: 1.0 To: Da Rock References: <4F0E395B.6020201@herveybayaustralia.com.au> <4F0E4D20.405@missouri.edu> <4F0E5809.4020700@herveybayaustralia.com.au> <4F0E5A92.2050607@missouri.edu> <4F0E5E1E.20904@herveybayaustralia.com.au> In-Reply-To: <4F0E5E1E.20904@herveybayaustralia.com.au> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: ahze@FreeBSD.org, FreeBSD Ports 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 04:25:27 -0000 On 01/11/2012 10:14 PM, Da Rock wrote: > On 01/12/12 13:59, Stephen Montgomery-Smith wrote: >> On 01/11/2012 09:48 PM, Da Rock wrote: >>> On 01/12/12 13:01, Stephen Montgomery-Smith wrote: >>>> I usually see this error when there is a command that doesn't belong >>>> to a target. For example, if I create a Makefile that contains only: >>>> echo xxx >>>> I get the same error. So I think it is something in the part you >>>> snipped out that makes this error happen. >>> Yes, I have run that scenario too and learnt from it. >>> >>> The snipped bit is basically the same- but it works :/ >> >> I tried this Makefile, and got the same error. >> all: >> XXX= xxx >> echo xxx >> Putting in the assignment seems to split the command "echo xxx" from >> the target "all:". >> >> So it looks like you need to separate the assignments from the commands. > How do I do that, though? I have tried the assignment following the > commands (as it is now), but obviously thats not working either. > > And why does it work in the other settings? Maybe WITH_PAM is not defined. But try something like this: .if (conditionA) XXX=yyyy .endif .if (conditionB) ZZZ=wwww .endif post-extract: .if (conditionA) @echo Doing A with ${XXX} .endif .if (conditionB) @echo Doing B with ${ZZZ} .endif >> >> >> >>> >>> @if [ -f ${WRKDIR}/etc/ldap.conf ]; then \ >>> ${MV} ${WRKDIR}/etc/ldap.conf ${WRKDIR}/etc/ldap.conf.dist; \ >>> fi >>> .if defined(WITH_PAM) >>> PLIST_SUB+= PAM="" >>> .else >>> @if [ -f ${WRKDIR}/lib/security/pam_ldap.so ]; then \ >>> ${RM} -rf ${WRKDIR}/lib/; \ >>> fi >>> @if [ -f ${WRKDIR}/usr/share/doc/nss_ldap-264/COPYING.pam_ldap ]; then \ >>> ${RM} ${WRKDIR}/usr/share/doc/nss_ldap-264/*.pam*; \ >>> ${RM} -rf ${WRKDIR}/usr/share/doc/nss_ldap-264/pam.d; \ >>> fi >>> @if [ -f ${WRKDIR}/usr/share/man/man5/pam_ldap.5.gz ]; then \ >>> ${RM} ${WRKDIR}/usr/share/man/man5/pam_ldap.5.gz; \ >>> fi >>> PLIST_SUB+= PAM="@comment " >>> .endif >>> >>> Again, the indent is as is. >>> >>> Removing the @ didn't work either... >>>> >>>> On 01/11/2012 07:37 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. > >