On 11/01/2012 16:10, Eitan Adler wrote:
>>> post-extract:
>>> >>                 .if defined(WITH_PAM)
>>> >>                     PLIST_FILES+=lib/security/pam_ldap.so
>>> >>
>>> >>
>>> >>                 .else
>>> >>                     @if [ -f ${WRKDIR}/lib/security/pam_ldap.so ]; then \
>>> >>                         ${RM} ${WRKDIR}/lib/security/pam_ldap.so
>>> >>                         ${DIRRM} ${WRKDIR}/lib/;
>>> >>                     fi
>> >
>> >                    ^^^^^

>> > This is what's wrong.  In port Makefiles, it's .if, .else, .endif not fi.

> You need both: .endif and fi in this case (the 'fi' is part of the shell 
> script)

Also the shell script part needs to be backslashed, and statements
separated by semi-colons, like so:

      @if [ -f ${WRKDIR}/lib/security/pam_ldap.so ]; then \
          ${RM} ${WRKDIR}/lib/security/pam_ldap.so ; \
          ${DIRRM} ${WRKDIR}/lib/ ; \
      fi

Looking back at the OP's previous posts, it's this backslashing thing
which is missing: the (make) .if is properly closed with a .endif, which
unfortunately got cropped in one of the replies upthread.

Another point: its not usual to modify variables like PLIST_FILES or
PORTDOCS as part of the post-extract target.  Usually that's done
earlier in the Makefile before any of the actual make targets.

        Cheers,

        Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.                   7 Priory Courtyard
                                                  Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey     Ramsgate
JID: matt...@infracaninophile.co.uk               Kent, CT11 9PW

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to