> >> I spend some thoungs on the new flexible configuration scheme. My > >> fontconfig version uses XML as configuration language. I'm familiar > >> with XML (Python, C++) and would like to propose to use Perl as > >> configuration languages instead of writting a new parser. > > Why not use sh or bash as the language for the config files? > Makes it more compatible with extant build systems, as well as > more extensible (IMHO). It might be as simple as making dpkg-cross > pay attention to more environment variables and then defining some > convenience functions. FAI has an approach something like this. > Or perhaps the config file can be simply something that spits > out a shell script to then be executed? My main concern is that > tying ourselves to any one set of syntax is... shortsighted.
Currently dpkg-cross configuration is used for two things: - setting environment variables (/etc/dpkg/cross-compile) - giving helper information for tool autodetection (/etc/dpkg/crosstools) (there are also /etc/dpkg/cross-config.* that are for autotools, and in autotools-defined format - those are out of what is being curreently discussed). If you see some other type of configuration data for dpkg-cross, please tell us. As for the above two, for those I'm currently thinking of perl configuration file (perl is a natural choise of configuration format because dpkg-cross is written in perl), in form of function calls. For example: define_var(name, value, scope, mode, package, arch); undefine_var(name, mode, scope, mode, package, arch); set_tool(tool, arch, mode, pathname) So configuration file may be actually a perl file where allowed statements are those described above, plus some construct to include other files. To avoid 6-parameter define_var, a separate call may be used to set 'current default values' for later 4 args, or some form of hash arguments may be used.

