instsetoo_native/CustomTarget_emscripten-install.mk |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

New commits:
commit c91c190379f727f2a98bbdf6e7c0846b830433a4
Author:     Stephan Bergmann <stephan.bergm...@allotropia.de>
AuthorDate: Fri Jul 26 17:27:17 2024 +0200
Commit:     Stephan Bergmann <stephan.bergm...@allotropia.de>
CommitDate: Fri Jul 26 23:00:21 2024 +0200

    Fix --with-package-format=emscripten
    
    For one, a dependency on 
gb_Postprocess_get_target,AllModulesButInstsetNative
    was missing, so copying from instdir might have kicked in too early, before 
the
    instdir files had been updated (e.g., in an incremental build).  For 
another, in
    a from-scratch build, files like instdir/program/qt_soffice.html might not 
yet
    have been around, but I'm too dumb to get gbuild to do what I want here 
(i.e.,
    copy files from instdir to workdir once the files are available in instdir 
and
    only if the files in instdir are newer than those in workdir).  So just make
    this .PHONY and always copy all the files (in line with how other PKGFORMATs
    also always rebuild their artifacts, IIUC).
    
    Change-Id: I8b84677cdf867a2b66027ec4a4d781cd1fe623b7
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171077
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <stephan.bergm...@allotropia.de>

diff --git a/instsetoo_native/CustomTarget_emscripten-install.mk 
b/instsetoo_native/CustomTarget_emscripten-install.mk
index a4a2031c45cb..23a5ee81885b 100644
--- a/instsetoo_native/CustomTarget_emscripten-install.mk
+++ b/instsetoo_native/CustomTarget_emscripten-install.mk
@@ -24,12 +24,12 @@ emscripten_install_files := \
     soffice.worker.js \
     $(if $(ENABLE_SYMBOLS_FOR),soffice.wasm.dwp) \
 
+.PHONY: $(call gb_CustomTarget_get_target,instsetoo_native/emscripten-install)
 $(call gb_CustomTarget_get_target,instsetoo_native/emscripten-install): \
-    $(foreach 
i,$(emscripten_install_files),$(WORKDIR)/installation/LibreOffice/emscripten/$(i))
-
-$(foreach 
i,$(emscripten_install_files),$(WORKDIR)/installation/LibreOffice/emscripten/$(i)):
 \
-$(WORKDIR)/installation/LibreOffice/emscripten/%: $(INSTDIR)/program/%
-       mkdir -p $(dir $@)
-       cp $< $@
+    | $(call gb_Postprocess_get_target,AllModulesButInstsetNative)
+       mkdir -p $(WORKDIR)/installation/LibreOffice/emscripten
+       for i in $(emscripten_install_files); do \
+        cp $(INSTDIR)/program/$$i 
$(WORKDIR)/installation/LibreOffice/emscripten/ || exit 1; \
+    done
 
 # vim: set noet sw=4 ts=4:

Reply via email to