On Sat, Jan 03, 2009 at 02:55:24PM +0100, Rainer Jung wrote: > Most build variables for httpd are used via APACHE_SUBST, which means > they get added to build/config_vars.mk. > > A) Where to define them? > ======================== > > There are two places, were a lot of ariables are added via APACHE_SUBST: > > 1) Macro APACHE_GEN_CONFIG_VARS > > Defined in acinclude.m4 and called in configure.in. > It contains 75 calls to APACHE_SUBST. > > 2) Directly in configure.in > > It contains about 21 calls to APACHE_SUBST. > > Is there any concept, whether APACHE_SUBST for a new variable should be > put into APACHE_GEN_CONFIG_VARS or directly into configure.in?
Generally, I'd put new SUBST calls in configure.in, grouped near to the places where the new variables are being defined. > I can see that the ones in the macro will be included last into > config_vars.mk, but apart from that any rules? Not really, it's a bit random! > B) Should they be installed? > ============================ > > The script build/config_vars.sh deletes a lot of variables before > installing build/config_vars.mk. Is there any concept, which variables > should get installed, and which ones should be removed before installing > the file? It should be trimmed by config_vars.sh unless you have a good reason why an external module would need to use the new variable at build time. Generally, I'd say: try to export as little as possible in config_vars.mk because otherwise it becomes part of the API and some third-party module will depend on it. Regards, Joe