configure.ac                |   18 ++++++++++++++++--
 odk/CustomTarget_doxygen.mk |    8 ++++----
 2 files changed, 20 insertions(+), 6 deletions(-)

New commits:
commit 83d3f9b819ee23efa314953fc2fde4412d90a60b
Author:     Christian Lohmaier <lohmaier+libreoff...@googlemail.com>
AuthorDate: Tue May 7 14:19:50 2024 +0200
Commit:     Christian Lohmaier <lohmaier+libreoff...@googlemail.com>
CommitDate: Tue May 7 17:08:44 2024 +0200

    use windows doxygen in wsl-as-helper case
    
    basically reverts f7fe6a0bed2c2aee19535a26181a2edfb103e587
    
    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+libreoff...@googlemail.com>

diff --git a/configure.ac b/configure.ac
index e04f4a846642..5954533a7f1b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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])
diff --git a/odk/CustomTarget_doxygen.mk b/odk/CustomTarget_doxygen.mk
index 42132387457b..03b43c0c7180 100644
--- a/odk/CustomTarget_doxygen.mk
+++ b/odk/CustomTarget_doxygen.mk
@@ -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:

Reply via email to