Skip to contentSkip to conversation

doxygen: fix reproducibility issue of doxygen-src

PATCH Superseded [email protected] 1 participant 1 message Oct 10, 2025

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 doxygen: fix reproducibility issue of doxygen-src

From: Changqing Li <[email protected]>

[ snip of CMakeLists.txt ]
BISON_TARGET(constexp

             ${CMAKE_CURRENT_LIST_DIR}/constexp.y
             ${GENERATED_SRC}/ce_parse.cpp
             COMPILE_FLAGS "${YACC_FLAGS}")

[ end of snip ]

bison embeds full paths in its generated headers, eg:
bison -o /full/build/path/generated/example.cpp ... The header will include:

This make doxygen-src not reproducible, fix by replacing full build path

---
 meta-oe/recipes-devtools/doxygen/doxygen_1.14.0.bb | 10 ++++++++++
 1 file changed, 10 insertions(+)
meta-oe/recipes-devtools/doxygen/doxygen_1.14.0.bb +10 -0
index 512a63549e..73594fc09f 100644
@@ -22,4 +22,14 @@ EXTRA_OECMAKE += "\
     -DBISON_TARGET_ARG_COMPILE_FLAGS='--no-lines' \
 "
 
+do_install:append() {
+    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
+
+    sed -i -e 's;^#ifndef.*GENERATED_SRC_CE_PARSE_HPP_INCLUDED$;#ifndef GENERATED_SRC_CE_PARSE_HPP_INCLUDED;g' ${B}/generated_src/ce_parse.hpp
+    sed -i -e 's;^# define.*GENERATED_SRC_CE_PARSE_HPP_INCLUDED$;# define GENERATED_SRC_CE_PARSE_HPP_INCLUDED;g' ${B}/generated_src/ce_parse.hpp
+    sed -i -e 's;^#endif.*GENERATED_SRC_CE_PARSE_HPP_INCLUDED.*$;#endif;g' ${B}/generated_src/ce_parse.hpp
+}
+
 BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
2.34.1