]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Conditionalize libgdiagnostic processing on presence
authorRichard Biener <rguenther@suse.de>
Fri, 23 May 2025 11:32:47 +0000 (13:32 +0200)
committerRichard Biener <rguenther@suse.de>
Fri, 23 May 2025 12:00:40 +0000 (14:00 +0200)
The following makes update_web_docs_git work on branches without
libgdiagnostic.

maintainer_scripts/
* update_web_docs_git: Conditionalize libgdiagnostic processing
on presence.

maintainer-scripts/update_web_docs_git

index 424808847b6b8b1dadfeb3211fde2d74faa493cc..00334ddac7d5c0866bebcfd6782924399a5bf999 100755 (executable)
@@ -242,11 +242,15 @@ popd
 cp -a gcc/gcc/jit/docs/_build/html jit
 mkdir -p $DOCSDIR/jit
 
-pushd gcc/gcc/doc/libgdiagnostics
-make html SPHINXBUILD=$SPHINX_VENV/bin/sphinx-build || true
-popd
-cp -a gcc/gcc/doc/libgdiagnostics/_build/html libgdiagnostics
-mkdir -p $DOCSDIR/libgdiagnostics
+LIBGDIAGNOSTICS=
+if test -d gcc/gcc/doc/libgdiagnostics; then
+  pushd gcc/gcc/doc/libgdiagnostics
+  make html SPHINXBUILD=$SPHINX_VENV/bin/sphinx-build || true
+  popd
+  cp -a gcc/gcc/doc/libgdiagnostics/_build/html libgdiagnostics
+  mkdir -p $DOCSDIR/libgdiagnostics
+  LIBGDIAGNOSTICS=libgdiagnostics
+fi
 
 # Work around makeinfo generated file names and references with
 # "_002d" instead of "-".
@@ -298,7 +302,7 @@ done
 # below them, and with some non-HTML files (.png images from us,
 # plus .css and .js supplied by sphinx, and source files, renamed
 # from .rst to .txt).
-find jit libgdiagnostics \
+find jit $LIBGDIAGNOSTICS \
     -name "*.html" -o -name "*.png" \
     -o -name "*.css" -o -name "*.js" \
     -o -name "*.txt" |