Passing make flags to a dependency

Max Baker maxbaker at users.sourceforge.net
Mon Feb 7 13:01:46 PST 2005


Clement,

On Mon, Feb 07, 2005 at 11:46:12AM +0100, Clement Laforet wrote:
> > > This is a good point.  I could change the scope of this dependency to
> > > be "SSL would be a good idea".   Going on that, is there a way that I
> > > could specify that SSL be turned on if apache2 does get built by my
> > > port, else give a warning that it's a Good Idea and/or bug out?
> 
> These solutions violates ports concept. Since mod_ssl is *NOT* 
> required to make application run, any dirty hack can't be allowed.
> 
> to warn users:
> just add at the end of the Makefile. (and remove '.include 
> <bsd.port.mk>')
> 
> .include <bsd.port.pre.mk>
> 
> .if exists(${LOCALBASE}/libexec/apache2/mod_ssl.so)
> pre-everything::
> 	@${ECHO_MSG} "${PORTNAME} should be accessed in HTTPS, please"
> 	@${ECHO_MSG} "consider using apache2 with mod_ssl."
> .endif
> 
> .include <bsd.port.post.mk>
> 
> Of course, limitations are:
> - message will be printed if apache2 is not installed before
> - you can't detect static mod_ssl.

Thanks for the heads up.  This answer the question of how I can give an
advisory that people should have mod_ssl turned on.  

Any ideas for the question of how to add Makefile flags to the dependencies?
This would cover the case that a. the user does not have apache2 installed
yet and b. my port triggers the port to install.  Or do we have to start
making a million apache2+mod_blah type ports like apache1 has?

-m


More information about the freebsd-ports mailing list