use windows doxygen in wsl-as-helper case

basically reverts f7fe6a0bed

avoiding the penalty for accessing files in the windows-realm from
within the wsl-container significantly accelerates the doc-generation

Change-Id: I95af905bda7225a9c1924a41e952656dffbfbc0b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167279
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
This commit is contained in:
Christian Lohmaier 2024-05-07 14:19:50 +02:00
parent fbd8cfb046
commit 83d3f9b819
2 changed files with 20 additions and 6 deletions

View file

@ -9488,8 +9488,9 @@ else
fi
else
AC_MSG_CHECKING([for doxygen])
DOXYGEN=$with_doxygen
AC_MSG_RESULT([$DOXYGEN])
PathFormat "$with_doxygen"
DOXYGEN="$formatted_path_unix"
AC_MSG_RESULT([$formatted_path])
fi
if test -n "$DOXYGEN"; then
DOXYGEN_VERSION=`$DOXYGEN --version 2>/dev/null`
@ -9498,6 +9499,19 @@ else
AC_MSG_ERROR([found doxygen is too old; need at least version 1.8.4 or specify --without-doxygen])
fi
fi
if test -n "$WSL_ONLY_AS_HELPER"; then
dnl what really should be tested is whether it is doxygen from windows-realm
dnl i.e. one that runs on the windows-side and deals with windows-pathnames
dnl using doxygen from wsl container would be possible, but there's a performance
dnl penalty when accessing the files outside the container
AC_MSG_CHECKING([whether doxygen is a windows executable])
if $(file "$DOXYGEN" | grep -q "PE32"); then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
AC_MSG_ERROR([please provide a path to a windows version of doxygen or use --without-doxygen])
fi
fi
fi
fi
AC_SUBST([DOXYGEN])

View file

@ -22,8 +22,8 @@ odk_cpp_INCFILELIST := com/sun/star/uno/Any.h \
com/sun/star/uno/Type.h \
com/sun/star/uno/Type.hxx
# Cygwin Doxygen needs unix paths, wsl-as-helper needs paths into windows-realm
odk_cygwin_path = $(if $(MSYSTEM),$(call gb_Helper_wsl_path,$(1)),$(call gb_Helper_cyg_path,$(1)))
# Cygwin Doxygen needs unix paths, wsl-as-helper works in windows-realm
odk_cygwin_path = $(if $(MSYSTEM),$(1),$(call gb_Helper_cyg_path,$(1)))
odk_cpp_PREFIX := $(call odk_cygwin_path,$(INSTDIR)/$(SDKDIRNAME)/include/)
odk_cpp_DOXY_INPUT := $(call odk_cygwin_path,$(SRCDIR)/odk/docs/cpp/main.dox \
$(SRCDIR)/include/sal/log-areas.dox \
@ -57,7 +57,7 @@ $(gb_CustomTarget_workdir)/odk/docs/cpp/doxygen.log : \
$(call gb_Package_get_target,odk_headers_generated)
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),GEN,1)
$(call gb_Trace_StartRange,$(subst $(WORKDIR)/,,$@),GEN)
rm -rf $(odk_cpp_DOXY_WORKDIR)/ && $(call gb_Helper_wsl_path,$(WSL) $(DOXYGEN) $<) > $@
rm -rf $(odk_cpp_DOXY_WORKDIR)/ && $(DOXYGEN) $< > $@
$(call gb_Trace_EndRange,$(subst $(WORKDIR)/,,$@),GEN)
$(eval $(call gb_CustomTarget_register_targets,odk/docs,\
@ -98,7 +98,7 @@ $(gb_CustomTarget_workdir)/odk/docs/idl/doxygen.log : \
$(SRCDIR)/odk/docs/idl/main.dox
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),GEN,1)
$(call gb_Trace_StartRange,$(subst $(WORKDIR)/,,$@),GEN)
rm -rf $(odk_idl_DOXY_WORKDIR)/ && $(call gb_Helper_wsl_path,$(WSL) $(DOXYGEN) $<) > $@
rm -rf $(odk_idl_DOXY_WORKDIR)/ && $(DOXYGEN) $< > $@
$(call gb_Trace_EndRange,$(subst $(WORKDIR)/,,$@),GEN)
# vim: set noet sw=4 ts=4: