I've been working on some java ebuilds recently, and in src_compile functions, I have often seen code like: local antflags="jar" if use jikes; then antflags="${antflags} -Dbuild.compiler=jikes" fi if use doc; then antflags="${antflags} javadoc" fi if use junit; then antflags="${antflags} test-all" fi Now, I was thinking, it would be nice to have something similar to use_enable and use_with, that one can use with econf / ./configure I don't think there is quite the variety of useflags that will come into play, so I think there could be specific functions for specific useflags, such as jikes, junit, and doc. My suggestion would be to have functions such as (which were based on use_enable/use_with: use_jikes() { local FLAG="jikes" if useq ${FLAG}; then echo "-Dbuild.compiler=jikes" fi return 0; } use_junit() { local FLAG="junit" local TARGET="${1:-test}" if useq "junit"; then echo "${TARGET}" fi return 0; } use_doc() { local TARGET=${1:-javadoc} if useq "doc"; then echo "${TARGET}" fi return 0; } This would allow you to (assuming the right targets are there): ant ${use_jikes) $(use_junit) $(use_doc) And even this would fairly common, so maybe something like eant could be effectively call the above funciton. Reproducible: Always Steps to Reproduce:
This functionality exists more or less in axxo-overlay, so eventually it'll make its way into portage.