]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Fix run_doxygen for Doxygen 1.10 man page format
authorJonathan Wakely <jwakely@redhat.com>
Thu, 25 Apr 2024 12:24:56 +0000 (13:24 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Thu, 25 Apr 2024 17:38:43 +0000 (18:38 +0100)
Doxygen switched from \fC to \fR in its man page output:
https://github.com/doxygen/doxygen/pull/10497

This breaks our script that expects \fC so change the regaulr expression
to work with either style.

libstdc++-v3/ChangeLog:

* scripts/run_doxygen: Adjust sed pattern to match '\fR' for
new man output that Doxygen 1.10 generates.

libstdc++-v3/scripts/run_doxygen

index fbd601b11cc2e5bca98666074904c9221d1f73d9..ea9bcb565530168978406c644ab323c04da694d4 100644 (file)
@@ -294,7 +294,11 @@ $gxx $cppflags $cxxflags ${srcdir}/doc/doxygen/stdheader.cc -o ./stdheader || ex
 problematic=`grep -E -l '#include <.*h>' [a-z]*.3`
 for f in $problematic; do
     # this is also slow, but safe and easy to debug
-    oldh=`sed -n '/fC#include </s/.*<\(.*\)>.*/\1/p' $f`
+    oldh=`sed -n '/f[CR]#include </s/.*<\(.*\)>.*/\1/p' $f`
+    if [ "$oldh" == "" ]; then
+      echo "ERROR: Doxygen man page formatting changed" 2>&1
+      continue
+    fi
     newh=`echo $oldh | sed 's/\\\\&\\././g' | ./stdheader`
     sed "s=${oldh/\\/.}=${newh}=" $f > TEMP && mv TEMP $f
 done