diff options
author | Volkmar W. Pogatzki <gentoo@pogatzki.net> | 2023-12-04 15:47:20 +0100 |
---|---|---|
committer | Miroslav Šulc <fordfrog@gentoo.org> | 2024-01-11 10:48:48 +0100 |
commit | dd5e874e34b895fe48d1ca863882e9f25f65719a (patch) | |
tree | bd739d1ba8e9e4a36ed1333999742ff3b7a19d59 /eclass/java-pkg-simple.eclass | |
parent | java-utils-2.eclass: new JAVADOC_CLASSPATH, JAVADOC_SRC_DIRS (diff) | |
download | gentoo-dd5e874e34b895fe48d1ca863882e9f25f65719a.tar.gz gentoo-dd5e874e34b895fe48d1ca863882e9f25f65719a.tar.bz2 gentoo-dd5e874e34b895fe48d1ca863882e9f25f65719a.zip |
java-pkg-simple.eclass: respect JAVADOC_SRC_DIRS
This patch helps to avoid useless runs of ejavadoc in multi-jar
packages where java-pkg-simple_src_compile is called for each jar file.
JAVADOC_SRC_DIRS can be set in the ebuild in global scope and
"use doc && ejavadoc" be called at the end of src_compile. And it no
longer needs to build a useless "ignoreme.jar".
Signed-off-by: Volkmar W. Pogatzki <gentoo@pogatzki.net>
Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>
Diffstat (limited to 'eclass/java-pkg-simple.eclass')
-rw-r--r-- | eclass/java-pkg-simple.eclass | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/eclass/java-pkg-simple.eclass b/eclass/java-pkg-simple.eclass index 143efa707751..97bad414afb7 100644 --- a/eclass/java-pkg-simple.eclass +++ b/eclass/java-pkg-simple.eclass @@ -412,11 +412,15 @@ java-pkg-simple_src_compile() { # javadoc if has doc ${JAVA_PKG_IUSE} && use doc; then - mkdir -p ${apidoc} - ejavadoc -d ${apidoc} \ - -encoding ${JAVA_ENCODING} -docencoding UTF-8 -charset UTF-8 \ - ${classpath:+-classpath ${classpath}} ${JAVADOC_ARGS:- -quiet} \ - @${sources} || die "javadoc failed" + if [[ ${JAVADOC_SRC_DIRS} ]]; then + einfo "JAVADOC_SRC_DIRS exists, you need to call ejavadoc separately" + else + mkdir -p ${apidoc} + ejavadoc -d ${apidoc} \ + -encoding ${JAVA_ENCODING} -docencoding UTF-8 -charset UTF-8 \ + ${classpath:+-classpath ${classpath}} ${JAVADOC_ARGS:- -quiet} \ + @${sources} || die "javadoc failed" + fi fi # package |