Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 12 Jan 2012 21:30:11 +0000
From:      Chris Rees <crees@freebsd.org>
To:        Jason Helfman <jhelfman@e-e.com>
Cc:        Stephen Montgomery-Smith <stephen@missouri.edu>, Da Rock <freebsd-ports@herveybayaustralia.com.au>, FreeBSD Ports <freebsd-ports@freebsd.org>, ahze@freebsd.org
Subject:   Re: unassociated shell command
Message-ID:  <CADLo839B%2BcXYQwtUDNAO4rUnJc-mfx%2BAnCz19wfmmS8etmSDwQ@mail.gmail.com>
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>

next in thread | previous in thread | raw e-mail | index | archive | help
On 12 January 2012 06:27, Jason Helfman <jhelfman@e-e.com> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CADLo839B%2BcXYQwtUDNAO4rUnJc-mfx%2BAnCz19wfmmS8etmSDwQ>