# make.conf and curdir



## aquouel (Mar 1, 2010)

Hello,

Does all ports support declaration of this type in /etc/make.conf ?


```
.if ${.CURDIR:M*/ftp/wget}
WITH_NLS=true
WITH_OPENSSL=true
.endif
```


Thanks a lot


----------



## phoenix (Mar 1, 2010)

AFAIUI, yes, that will work for any directory under /usr/ports.

If you are going to be doing that for a lot of different ports, you should have a look at ports-mgmt/portconf instead.


----------



## aquouel (Mar 2, 2010)

Thanks for your answer.

But, when i want to install the web server Nginx, it doesn't work.


```
# make
===>  nginx-nopcre-0.7.65 requires at least HTTP_MODULE or MAIL_MODULE to  be defined.  Please 'make config' again.
*** Error code 1

Stop in /usr/ports/www/nginx.
```

And my /etc/make.conf for this port :

```
.if ${.CURDIR:M*/www/nginx}
WITH_HTTP_MODULE=true
.endif
```

Thanks


----------



## DutchDaemon (Mar 2, 2010)

Interesting. The default Makefile has 


```
[X] HTTP_MODULE               Enable HTTP module
```

so it defaults to 'on' (and the extra settings in /etc/make.conf are actually unneeded).

If you remove the checkmark in [cmd=]make config[/cmd] and use the .if setting in /etc/make.conf, the mentioned error _does_ occur.


----------



## aquouel (Mar 3, 2010)

I remove all checkmarks in make config and the error persist.
When you want to install a port using /etc/make.conf, you have nothing to do ?


```
$ cd /usr/ports/www/nginx
$ make
```

No ?


----------



## DutchDaemon (Mar 3, 2010)

Don't remove *all* of the checkmarks  Just run [cmd=]make rmconfig && make install clean[/cmd] in the port dir (just accept the default options in the config screen). This should build/install fine.


----------

