ports makefile question
Greg Larkin
glarkin at FreeBSD.org
Fri May 14 22:39:50 UTC 2010
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Stacy Millions wrote:
> I am trying to set configure args based on the version of sqlite that is
> installed, but SQLITE_VER is not set until after bsd.port.post.mk so I
> end up with something like
>
> ===============================================================
> OPTIONS= SQLITE "Enable SQLITE support" on
>
> .include <bsd.port.options.mk>
>
> .if !defined(WITH_SQLITE)
> PLIST_SUB+= WITH_SQLITE="@comment "
> CONFIGURE_ARGS+= --without-sqlite --without-sqlite3
> .else
> PLIST_SUB+= WITH_SQLITE=""
> USE_SQLITE= yes
> .endif
>
> .include <bsd.port.mk>
>
> .if defined(WITH_SQLITE)
> .if ${SQLITE_VER} == "3" || ${SQLITE_VER} == "34"
> CONFIGURE_ARGS+= --without-sqlite --with-sqlite3
> .else
> CONFIGURE_ARGS+= --without-sqlite3 --with-sqlite
> .endif
> .endif
> ===============================================================
>
> This works, but I can't help but feel there is a better way. Any
> suggestions?
>
> -stacy
Hi Stacy,
Since you specify "USE_SQLITE= yes" when the SQLite option is enabled,
that's going to default to SQLITE_VER == 3. You can just set your
CONFIGURE_ARGS to "--without-sqlite --with-sqlite3". It doesn't look
like you need to handle the SQLite v2 configuration.
Hope that helps,
Greg
- --
Greg Larkin
http://www.FreeBSD.org/ - The Power To Serve
http://www.sourcehosting.net/ - Ready. Set. Code.
http://twitter.com/sourcehosting/ - Follow me, follow you
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iD8DBQFL7dEn0sRouByUApARApULAJwIeanTDTGP0ixJvugRMXeubZSPygCaAgpn
ALrlFt35HAaQq3VyUJtkDmE=
=HyAl
-----END PGP SIGNATURE-----
More information about the freebsd-ports
mailing list