USE_PHP *after* bsd.port.pre.mk

Edwin Groothuis edwin at mavetju.org
Wed Dec 21 01:26:09 PST 2005


For a port with OPTIONS (pgsql vs mysql) and PHP, I want to set
USE_PHP *after* bsd.port.pre.mk is included.

bsd.php.mk says:

# Adding 'USE_PHP=yes' to a port includes this Makefile after bsd.ports.pre.mk.

bsd.port.mk says:

	# Start of pre-makefile section.
	.if !defined(AFTERPORTMK)
	[...]
	.if defined(USE_PHP)
	.include "${PORTSDIR}/Mk/bsd.php.mk"
	.endif
	[...]
	.endif
	# End of pre-makefile section.

	and no further includes of bsd.php.mk


"USE_PHP=yes" before bsd.port.pre.mk gives me:
	depends on file: /usr/local/include/php/main/php.h

"USE_PHP=pgsql" before bsd.port.pre.mk gives me:
	depends on file: /usr/local/include/php/main/php.h
	depends on file: /usr/local/lib/php/20020429/pgsql.so

"USE_PHP=pgsql" after bsd.port.pre.mk gives me:
	...


So yeah, what is the trick?
(besides from submitting my bsd.options.mk)

-- 
Edwin Groothuis      |            Personal website: http://www.mavetju.org
edwin at mavetju.org    |          Weblog: http://weblog.barnet.com.au/edwin/


More information about the freebsd-ports mailing list