define issue - linux-f10-nss_ldap: my first port - be gentle :)

Paul Schmehl pschmehl_lists at
Tue Jan 10 16:11:12 UTC 2012

--On January 10, 2012 10:52:32 AM +1000 Da Rock 
<freebsd-ports at> wrote:

> I'm having some trouble using knobs and "defined" in the Makefile. It
> keeps complaining about the unexpected.
> I've tried .if defined(WITH_PAM) and .ifdefined(WITH_PAM) and it
> complains about an unexpected "(" in the first, and an unexpected word in
> the second.
> How do I conditionally handle the knobs?

You need an if - endif for each knob.  Something like this.

.if defined(WITH_PAM)
CONFIGURE_ARGS+=        --with-pam
PLIST_SUB+=             PAM=""
CONFIGURE_ARGS+=        --without-pam
PLIST_SUB+=             PAM="@comment not installed: "

> freebsd-ports at mailing list
> To unsubscribe, send any mail to "freebsd-ports-unsubscribe at"

Paul Schmehl, Senior Infosec Analyst
As if it wasn't already obvious, my opinions
are my own and not those of my employer.
"It is as useless to argue with those who have
renounced the use of reason as to administer
medication to the dead." Thomas Jefferson
"There are some ideas so wrong that only a very
intelligent person could believe in them." George Orwell

More information about the freebsd-ports mailing list