[Libreoffice-commits] online.git: loleaflet/Makefile.am

Henry Castro (via logerrit) logerrit at kemper.freedesktop.org
Fri May 29 01:12:21 UTC 2020


 loleaflet/Makefile.am |   14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

New commits:
commit 5abf8900ddce81910cdf349d9d21a5cc940f23aa
Author:     Henry Castro <hcastro at collabora.com>
AuthorDate: Tue May 26 20:17:22 2020 -0400
Commit:     Henry Castro <hcastro at collabora.com>
CommitDate: Fri May 29 03:12:01 2020 +0200

    loleaflet: makefile: simplify global file rule
    
    Change-Id: I9c9bf7fa48f8c9dcd318195235cb99e407215543
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/94913
    Tested-by: Jenkins
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Henry Castro <hcastro at collabora.com>

diff --git a/loleaflet/Makefile.am b/loleaflet/Makefile.am
index b085eab02..157705865 100644
--- a/loleaflet/Makefile.am
+++ b/loleaflet/Makefile.am
@@ -375,6 +375,13 @@ define prereq_all
 		$(NODE_MODULES_JS_SRC) $(LOLEAFLET_LIBS_JS_SRC))
 endef
 
+define global_file
+	$(if $(filter DEBUG,$(1)),
+		@cp $< $@,
+		@echo "Uglify global.js file..."
+		@$(NODE) node_modules/uglify-js/bin/uglifyjs $< --output $@)
+endef
+
 all-local: build-loleaflet
 	$(abs_top_srcdir)/scripts/unocommands.py --check $(abs_top_srcdir)
 
@@ -428,12 +435,9 @@ $(DIST_FOLDER)/bundle.js: $(INTERMEDIATE_DIR)/loleaflet-src.js $(call prereq_all
 	@mkdir -p $(dir $@)
 	$(call bundle_all,$(BUNDLE))
 
-if ENABLE_DEBUG
-else
 $(DIST_FOLDER)/global.js: $(srcdir)/js/global.js
-	@echo "Uglify global.js file..."
-	@$(NODE) node_modules/uglify-js/bin/uglifyjs $< --output $@
-endif
+	@mkdir -p $(dir $@)
+	$(call global_file,$(BUNDLE))
 
 $(DIST_FOLDER)/loleaflet.html: $(srcdir)/html/loleaflet.html.m4 \
 	$(LOLEAFLET_HTML_DST) \


More information about the Libreoffice-commits mailing list