Santiago M. Mola wrote: > Alec Warner <[EMAIL PROTECTED]> wrote: > > Thomas Anderson <[EMAIL PROTECTED]> wrote: > >> DEFAULT_SRC_CONFIGURE_USE_{WITHS,ENABLES} > >> DEFAULT_SRC_CONFIGURE_EXTRA_PARAMS
Essentially, this is the suggestion to replace the flexible shell code by some static variables. Besides being less intuitive and less readable (you have to know the meaning of all the variables to understand it) it also works only for fixed cases, e.g. if it is only ./configure (and not ./autogen.sh or something else) which has to be called, and only if it has to be called exactly once in the main directory For all other cases, either *everything* has to be done manually, or you have to introduce even more variables to cover more cases. Your second example shows no advantage either since you could just have rewritten it by standard means anyway: > src_compile() { > local myconf=" > --sysconfdir=/etc/${PN} > --without-xgrid > --enable-pretty-print-stacktrace > --enable-orterun-prefix-by-default > --without-slurm" > > if use threads; then > myconf="${myconf} > --enable-mpi-threads > --with-progress-threads > fi > > econf ${myconf} \ > $(use_enable !nocxx mpi-cxx) \ > $(use_enable romio io-romio) \ > $(use_enable heterogeneous) \ > $(use_with pbs tm) \ > $(use_enable ipv6) \ > || die "econf failed" > > emake || die "emake failed" > } With EAPI=2 you would probably do the above in src_configure which means that you omit the last line anyway. Moreover, if you dislike using a temporary variable and just want to collect options you could have written it this way: src_configure() { econf --sysconfdir=/etc/"${PN}" \ --without-xgrid ... \ --without-slurm \ $(use threads && echo \ --enable-mpi-threads \ --with-progress-threads) \ $(use_enable !nocxx mpi-cxx) ... \ $(use_enable ipv6) \ || die "econf failed" } This is simply more intuitive and readable than your suggestion, and moreover, this can also be used if in the "use threads" part you have other options than --enable-* or --with-* (e.g. some --disable-* or even more options in which case your suggestion would become a mess more and more).