This is an automated email from the ASF dual-hosted git repository. jimjag pushed a commit to branch AOO42X in repository https://gitbox.apache.org/repos/asf/openoffice.git
commit b5a865c036ea5a65b035a2e3e729ba88dfdb392e Author: Jim Jagielski <[email protected]> AuthorDate: Wed Aug 5 19:43:22 2026 -0400 xmlsecurity, forms: fix dmake "Shell escape" error from inline $(shell) in .IF (cherry picked from commit 41fb6987c238964d85a2b2ce9897603c4ebf7e4a) --- main/forms/util/makefile.mk | 7 ++++++- main/xmlsecurity/util/makefile.mk | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/main/forms/util/makefile.mk b/main/forms/util/makefile.mk index 887f0f1f9d..9574ab5ff3 100644 --- a/main/forms/util/makefile.mk +++ b/main/forms/util/makefile.mk @@ -73,7 +73,12 @@ SHL1TARGET=$(TARGET)$(DLLPOSTFIX) # dependency info, so zlib must be linked explicitly to satisfy libxml2's # HTTP/gzip symbols (deflate, inflate, gzopen, ...) -- when no dylib # exists there. -.IF "$(shell test -f $(LIBXML_PREFIX)/lib/libxml2.dylib && echo yes)"=="yes" +# +# The existence check is resolved into a plain macro first, then branched +# on -- dmake's .IF does not reliably evaluate a $(shell ...) call written +# directly inside the condition string itself. +FORMS_LIBXML2_HAS_DYLIB:=$(shell test -f $(LIBXML_PREFIX)/lib/libxml2.dylib && echo yes) +.IF "$(FORMS_LIBXML2_HAS_DYLIB)"=="yes" FORMS_LIBXML2LIB:=$(LIBXML_PREFIX)/lib/libxml2.dylib .ELSE FORMS_LIBXML2LIB:=$(LIBXML_PREFIX)/lib/libxml2.a $(ZLIB3RDLIB) diff --git a/main/xmlsecurity/util/makefile.mk b/main/xmlsecurity/util/makefile.mk index 2e80734b44..8ac84413a2 100644 --- a/main/xmlsecurity/util/makefile.mk +++ b/main/xmlsecurity/util/makefile.mk @@ -149,7 +149,12 @@ SHL2STDLIBS+= $(NSS3LIB) $(NSPR4LIB) # so the linker resolves those automatically and no extra -lz/-llzma is # needed. Fall back to the static archive (community builds normally only # install that, via --enable-shared=no) when no dylib exists there. -.IF "$(shell test -f $(LIBXML_PREFIX)/lib/libxml2.dylib && echo yes)"=="yes" +# +# The existence check is resolved into a plain macro first, then branched +# on -- dmake's .IF does not reliably evaluate a $(shell ...) call written +# directly inside the condition string itself. +XMLSECURITY_LIBXML2_HAS_DYLIB:=$(shell test -f $(LIBXML_PREFIX)/lib/libxml2.dylib && echo yes) +.IF "$(XMLSECURITY_LIBXML2_HAS_DYLIB)"=="yes" XMLSECURITY_SYSTEM_LIBXML2:=$(LIBXML_PREFIX)/lib/libxml2.dylib XMLSECURITY_SYSTEM_LIBXML2_EXTRALIBS:= .ELSE
