[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Dynamic AC_OUPUT
Re: Dynamic AC_OUPUT
Thu, 24 Apr 2008 00:14:25 +0200
* Gary Kramlich wrote on Wed, Apr 23, 2008 at 01:58:02PM CEST:
> Ralf Wildenhues wrote:
>> * Gary Kramlich wrote on Wed, Apr 23, 2008 at 03:08:38AM CEST:
>>> This python script also determines what directories should have
>>> makefiles created and so on. I've gotten far enough to trick configure
>>> into outputting all of the make files. (This is done by appending the
>>> directories to ac_config_files before AC_OUTPUT).
>> Bad. ac_config_files is not defined in the Autoconf manual. Please use
>> AC_CONFIG_FILES([file ...]).
> I know it's bad which is why I said I'm tricking configure :).
> Unfortunately it's the only way I could find that works, since
> AC_CONFIG_FILES and AC_OUTPUT will not expand a variable.
>>> I was working on this in an already configured tree, and thought I had
>>> it with the ac_config_files hack. However, turns out automake when
>>> being run from my autogen doesn't like this. I realize it's just
>>> reading in the contents of AC_OUTPUT, and tried to work around this by
>>> specifying the directories to the initial call of automake. However, it
>>> drops out every time refusing to create depmod.
>> FYI, automake heavily uses something called "autoconf traces" which is
>> pretty much asking m4 "show me the args whenever the macros
>> AC_CONFIG_FILES, AC_INIT, ... are called".
> Okay... And that's revelvent how? Also that should have been depcomp
> before, not sure what I was thinking when it typed it.
Traces don't know what to do with shell variables.
You can get depcomp installed with
If that wasn't your problem, then please post the error or warning you
see, along with the problem that produces it.
> As you can see it's already becoming quite a pain to find a given config
> file, which is why I'm trying to automate it.
I recommend automating the production of an input file to autoconf.
> What I'm trying to solve is the problem of adding another plugin to this
> package and forgetting to drop it in configure.ac as well as the issues
> of these seemingly never ending list. What I'm trying to accomplish is
> to move all the info about each plugin into a plugin.cfg xml file so
> that I can easily handle everything from build dependencies, to
> autogenerated documentation and so. Being able to determine at
> autogen/configure time what directories need to be output would go a
> long end to save quite a few headaches.
Put this in configure.ac:
Put something like this before autoreconf into your bootstrap or
for file in $list_of_config_files; do
done > output_list.m4
automake will add output_list.m4 to the list of configure dependencies,
i.e., if you update it, autoconf will be rerun automatically.
Hope that helps.