doxygen: strip build paths from the generated sources
PATCH 1/1 doxygen: strip build paths from the generated sources
configgen.py writes the absolute path of config.xml into the header of every file it generates, so generated_src/configvalues.h, which is shipped in the doxygen-src package, carries the recipe build directory:
WARNING: doxygen-1.18.0-r0 do_package_qa: QA Issue: File /usr/src/debug/doxygen/1.18.0/generated_src/configvalues.h in package doxygen-src contains reference to TMPDIR [buildpaths]
On builders whose HOME is a parent of the build tree the same file e.g. yocto autobuilder, also trips the build-host HOME variant of the check.
flex leaks the path of the lex file the same way: it emits a #line directive for the %top{} block even when called with --noline, and post_lex.py rewrites it to the absolute path of the original .l file. Those .cpp files are not shipped today, but the leak is the same one.
Strip ${B}/ and ${S}/ from everything under generated_src/ during do_install, before do_package picks the sources up, so the references become relative.
--- meta-oe/recipes-devtools/doxygen/doxygen_1.18.0.bb | 2 ++ 1 file changed, 2 insertions(+)
meta-oe/recipes-devtools/doxygen/doxygen_1.18.0.bb +2 -0
@@ -23,6 +23,8 @@ EXTRA_OECMAKE += "\ " do_install:append() { + find ${B}/generated_src -type f -exec sed -i -e 's;${B}/;;g' -e 's;${S}/;;g' {} + + sed -i -e 's;^#ifndef.*GENERATED_SRC_MSCGEN_LANGUAGE_HPP_INCLUDED$;#ifndef GENERATED_SRC_MSCGEN_LANGUAGE_HPP_INCLUDED;g' ${B}/generated_src/mscgen_language.hpp sed -i -e 's;^# define.*GENERATED_SRC_MSCGEN_LANGUAGE_HPP_INCLUDED$;# define GENERATED_SRC_MSCGEN_LANGUAGE_HPP_INCLUDED;g' ${B}/generated_src/mscgen_language.hpp sed -i -e 's;^#endif.*GENERATED_SRC_MSCGEN_LANGUAGE_HPP_INCLUDED.*$;#endif;g' ${B}/generated_src/mscgen_language.hpp