2015-05-19 06:29:55 -05:00
|
|
|
# Version number of the bundled 'draw' thing
|
|
|
|
DRAW_VERSION=0.2.4
|
|
|
|
|
2018-04-12 14:57:00 -05:00
|
|
|
L10N_PO = $(wildcard $(srcdir)/po/*.po)
|
2018-09-07 08:17:37 -05:00
|
|
|
|
2018-11-09 14:28:46 -06:00
|
|
|
if !ENABLE_IOSAPP
|
2018-10-16 17:22:24 -05:00
|
|
|
if !ENABLE_GTKAPP
|
2018-04-12 14:57:00 -05:00
|
|
|
L10N_JSON = $(patsubst $(srcdir)/po/%.po,$(builddir)/dist/l10n/%.json,$(L10N_PO))
|
2018-09-07 08:17:37 -05:00
|
|
|
endif
|
2018-11-09 14:28:46 -06:00
|
|
|
endif
|
|
|
|
|
|
|
|
if ENABLE_IOSAPP
|
|
|
|
L10N_IOS_ALL_JS = $(builddir)/dist/l10n-all.js
|
|
|
|
L10N_JSON = $(L10N_IOS_ALL_JS)
|
|
|
|
|
|
|
|
$(L10N_IOS_ALL_JS) : $(wildcard $(srcdir)/po/ui-*.po) $(shell find $(srcdir)/l10n -name '*.*')
|
|
|
|
for F in $(wildcard $(srcdir)/po/ui-*.po); do \
|
|
|
|
$(srcdir)/util/po2json.py $$F -o $$F.json; \
|
|
|
|
done
|
|
|
|
@mkdir -p $(dir $@)
|
|
|
|
perl $(srcdir)/util/create-l10n-all-js.pl >$@
|
|
|
|
for F in $(wildcard $(srcdir)/po/ui-*.po); do \
|
|
|
|
rm $$F.json; \
|
|
|
|
done
|
|
|
|
endif
|
2017-05-05 04:18:26 -05:00
|
|
|
|
2017-11-10 00:00:06 -06:00
|
|
|
JQUERY_UI_IMAGE_PATH = node_modules/jquery-ui/themes/ui-lightness/images
|
|
|
|
JQUERY_UI_IMAGES = $(wildcard $(JQUERY_UI_IMAGE_PATH)/*.png)
|
2018-04-12 14:57:00 -05:00
|
|
|
JQUERY_UI_DIST_IMAGES = $(patsubst $(JQUERY_UI_IMAGE_PATH)/%.png,$(builddir)/dist/images/%.png,$(JQUERY_UI_IMAGES))
|
|
|
|
|
2018-05-24 13:44:04 -05:00
|
|
|
LOLEAFLET_IMAGES_SRC = $(shell find $(srcdir)/images -name '*.*')
|
2018-04-12 14:57:00 -05:00
|
|
|
LOLEAFLET_IMAGES_DST = $(patsubst $(srcdir)/%,$(builddir)/dist/%,$(LOLEAFLET_IMAGES_SRC))
|
|
|
|
|
|
|
|
LOLEAFLET_L10N_SRC = $(shell find $(srcdir)/l10n -name '*.*')
|
2018-11-09 14:28:46 -06:00
|
|
|
if !ENABLE_IOSAPP
|
2018-04-12 14:57:00 -05:00
|
|
|
LOLEAFLET_L10N_DST = $(patsubst $(srcdir)/l10n/%,$(builddir)/dist/l10n/%,$(LOLEAFLET_L10N_SRC))
|
2018-11-09 14:28:46 -06:00
|
|
|
endif
|
2018-04-12 14:57:00 -05:00
|
|
|
|
|
|
|
LOLEAFLET_DRAW_JS_SRC = $(shell find $(srcdir)/plugins/draw-$(DRAW_VERSION)/src -name '*.js')
|
2018-05-17 16:13:24 -05:00
|
|
|
LOLEAFLET_DRAW_JS_DST = $(patsubst $(srcdir)/plugins/%.js,$(builddir)/dist/plugins/%.js,$(LOLEAFLET_DRAW_JS_SRC))
|
|
|
|
|
2018-04-12 14:57:00 -05:00
|
|
|
LOLEAFLET_DRAW_CSS_SRC = $(shell find $(srcdir)/plugins/draw-$(DRAW_VERSION)/dist -name '*.css')
|
|
|
|
|
|
|
|
LOLEAFLET_HTML_SRC = $(shell find $(srcdir)/html -name '*.html')
|
|
|
|
LOLEAFLET_HTML_DST = $(patsubst $(srcdir)/html/%.html,$(builddir)/dist/%.html,$(LOLEAFLET_HTML_SRC))
|
|
|
|
|
2018-05-10 12:41:37 -05:00
|
|
|
LOLEAFLET_ADMIN_SRC = $(shell find $(srcdir)/admin -name '*.html')
|
2018-05-26 15:57:40 -05:00
|
|
|
LOLEAFLET_ADMIN_ALL = $(shell find $(srcdir)/admin -name '*')
|
2018-05-10 12:41:37 -05:00
|
|
|
LOLEAFLET_ADMIN_DST = $(patsubst $(srcdir)/admin/%,$(builddir)/dist/admin/%,$(LOLEAFLET_ADMIN_SRC))
|
|
|
|
|
2018-04-12 14:57:00 -05:00
|
|
|
define file_target
|
|
|
|
$(1): $(2)
|
|
|
|
@cp $$< $$@
|
|
|
|
|
|
|
|
endef
|
|
|
|
|
|
|
|
define file_targets
|
|
|
|
$(foreach file,$(1),$(call file_target,\
|
|
|
|
$(builddir)/dist/$(notdir $(file)),\
|
|
|
|
$(file)))
|
|
|
|
endef
|
|
|
|
|
|
|
|
LOLEAFLET_CSS =\
|
2018-09-02 09:28:52 -05:00
|
|
|
$(builddir)/node_modules/select2/dist/css/select2.css \
|
2018-04-12 14:57:00 -05:00
|
|
|
$(srcdir)/css/w2ui-1.5.rc1.css \
|
|
|
|
$(srcdir)/css/leaflet.css \
|
|
|
|
$(srcdir)/css/selectionMarkers.css \
|
|
|
|
$(srcdir)/css/loleaflet.css \
|
|
|
|
$(srcdir)/css/toolbar.css \
|
|
|
|
$(srcdir)/css/partsPreviewControl.css \
|
|
|
|
$(srcdir)/css/scrollBar.css \
|
|
|
|
$(srcdir)/css/searchControl.css \
|
|
|
|
$(srcdir)/css/spreadsheet.css \
|
|
|
|
$(srcdir)/css/editor.css \
|
2018-11-15 09:25:08 -06:00
|
|
|
$(srcdir)/css/jquery.mCustomScrollbar.css \
|
2018-04-12 14:57:00 -05:00
|
|
|
$(srcdir)/plugins/draw-$(DRAW_VERSION)/dist/leaflet.draw.css \
|
|
|
|
$(builddir)/node_modules/jquery-contextmenu/dist/jquery.contextMenu.css \
|
|
|
|
$(builddir)/node_modules/vex-js/css/vex.css \
|
|
|
|
$(builddir)/node_modules/vex-js/css/vex-theme-plain.css \
|
|
|
|
$(builddir)/node_modules/vex-js/css/vex-theme-bottom-right-corner.css \
|
|
|
|
$(builddir)/node_modules/smartmenus/dist/css/sm-core-css.css \
|
|
|
|
$(builddir)/node_modules/smartmenus/dist/css/sm-simple/sm-simple.css \
|
|
|
|
$(srcdir)/css/menubar.css \
|
2018-05-25 07:56:23 -05:00
|
|
|
$(builddir)/node_modules/jquery-ui/themes/ui-lightness/jquery-ui.css
|
2018-04-12 14:57:00 -05:00
|
|
|
|
|
|
|
LOLEAFLET_CSS_DST = $(foreach file,$(LOLEAFLET_CSS),$(builddir)/dist/$(notdir $(file)))
|
|
|
|
LOLEAFLET_CSS_M4 = $(strip $(foreach file,$(LOLEAFLET_CSS),$(notdir $(file))))
|
|
|
|
|
|
|
|
$(eval $(call file_targets,$(LOLEAFLET_CSS)))
|
|
|
|
|
|
|
|
NODE_MODULES_JS =\
|
|
|
|
node_modules/jquery/dist/jquery.js \
|
|
|
|
node_modules/jquery-mousewheel/jquery.mousewheel.js \
|
|
|
|
node_modules/jquery-contextmenu/dist/jquery.contextMenu.js \
|
|
|
|
node_modules/jquery-ui/jquery-ui.js \
|
|
|
|
node_modules/smartmenus/dist/jquery.smartmenus.js \
|
|
|
|
node_modules/timeago/jquery.timeago.js \
|
|
|
|
node_modules/autolinker/dist/Autolinker.js \
|
|
|
|
node_modules/json-js/json2.js \
|
|
|
|
node_modules/select2/dist/js/select2.js \
|
|
|
|
node_modules/vex-js/js/vex.js \
|
|
|
|
node_modules/vex-js/js/vex.dialog.js
|
|
|
|
|
2018-09-07 08:17:37 -05:00
|
|
|
if !ENABLE_IOSAPP
|
2018-10-16 17:22:24 -05:00
|
|
|
if !ENABLE_GTKAPP
|
2018-09-07 08:17:37 -05:00
|
|
|
NODE_MODULES_JS +=\
|
|
|
|
node_modules/l10n-for-node/l10n.js
|
|
|
|
endif
|
2018-10-16 17:22:24 -05:00
|
|
|
endif
|
2018-09-07 08:17:37 -05:00
|
|
|
|
2018-04-12 14:57:00 -05:00
|
|
|
NODE_MODULES_JS_SRC = $(patsubst %.js,$(builddir)/%.js,$(NODE_MODULES_JS))
|
|
|
|
NODE_MODULES_JS_DST = $(patsubst %.js,$(builddir)/dist/%.js,$(NODE_MODULES_JS))
|
|
|
|
|
|
|
|
GLOBAL_JS =\
|
|
|
|
global.js
|
|
|
|
|
|
|
|
LOLEAFLET_JS = $(strip $(shell NODE_PATH=$(abs_builddir)/node_modules $(NODE) -e "try {console.log(require('$(1)').getFiles().join(' '))} catch(e) {}"))
|
|
|
|
|
|
|
|
PLUGINS_JS =\
|
2018-11-15 09:25:08 -06:00
|
|
|
jquery.mCustomScrollbar.js \
|
2018-04-12 14:57:00 -05:00
|
|
|
w2ui-1.5.rc1.js \
|
2018-05-19 16:28:39 -05:00
|
|
|
toolbar.js \
|
|
|
|
main.js
|
2018-04-12 14:57:00 -05:00
|
|
|
|
2018-08-14 09:38:17 -05:00
|
|
|
PLUGINS_JS_SRC = $(shell find $(srcdir)/js -name '*.js')
|
|
|
|
PLUGINS_JS_DST = $(patsubst $(srcdir)/js/%.js,$(builddir)/dist/%.js,$(PLUGINS_JS_SRC))
|
|
|
|
|
2018-04-12 14:57:00 -05:00
|
|
|
LOLEAFLET_JS_SRC = $(shell find $(srcdir)/src -name '*.js')
|
|
|
|
LOLEAFLET_JS_DST = $(patsubst $(srcdir)/src/%.js,$(builddir)/dist/src/%.js,$(LOLEAFLET_JS_SRC))
|
|
|
|
|
|
|
|
COMMA := ,
|
|
|
|
EMPTY :=
|
|
|
|
SPACE := $(EMPTY) $(EMPTY)
|
|
|
|
LOLEAFLET_VERSION = $(shell cd $(srcdir) && git log -1 --pretty=format:"%h")
|
2018-05-10 12:41:37 -05:00
|
|
|
LOLEAFLET_PREFIX := $(if $(ENABLE_DEBUG),$(abs_builddir),$(abs_builddir)/build)
|
2017-11-10 00:00:06 -06:00
|
|
|
|
2017-08-25 02:08:13 -05:00
|
|
|
EXTRA_DIST = $(shell find . -type f -not -path './.git/*' | sed 's/.\///')
|
2017-01-03 22:24:55 -06:00
|
|
|
|
2018-05-26 23:20:29 -05:00
|
|
|
all-local:
|
|
|
|
@$(MAKE) node_modules
|
|
|
|
@$(MAKE) build-loleaflet
|
2018-05-26 09:26:47 -05:00
|
|
|
|
2018-11-08 17:03:45 -06:00
|
|
|
if !ENABLE_IOSAPP
|
|
|
|
if !ENABLE_GTKAPP
|
|
|
|
ADMIN_BUNDLE = $(builddir)/dist/admin-bundle.js
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2018-05-26 09:26:47 -05:00
|
|
|
build-loleaflet: | $(LOLEAFLET_L10N_DST) \
|
2018-04-12 14:57:00 -05:00
|
|
|
$(L10N_JSON) \
|
|
|
|
$(LOLEAFLET_IMAGES_DST) \
|
|
|
|
$(JQUERY_UI_DIST_IMAGES) \
|
2018-05-10 12:41:37 -05:00
|
|
|
$(LOLEAFLET_PREFIX)/dist/loleaflet-src.js \
|
2018-11-08 17:03:45 -06:00
|
|
|
$(ADMIN_BUNDLE) \
|
2018-04-12 14:57:00 -05:00
|
|
|
$(builddir)/dist/bundle.css \
|
|
|
|
$(builddir)/dist/bundle.js \
|
|
|
|
$(builddir)/dist/loleaflet.html
|
|
|
|
@echo "build loleaflet completed"
|
|
|
|
|
2018-05-26 15:57:40 -05:00
|
|
|
$(builddir)/dist/admin-bundle.js: $(LOLEAFLET_ADMIN_DST) \
|
|
|
|
$(LOLEAFLET_PREFIX)/dist/admin-src.js
|
|
|
|
@NODE_PATH=$(abs_builddir)/node_modules:$(LOLEAFLET_PREFIX)/dist $(NODE) node_modules/browserify/bin/cmd.js -g browserify-css $(if $(ENABLE_DEBUG),--debug,-g uglifyify) -o $@ $(srcdir)/admin/main-admin.js
|
|
|
|
|
|
|
|
$(LOLEAFLET_PREFIX)/dist/admin-src.js: $(LOLEAFLET_ADMIN_ALL)
|
|
|
|
@echo "Checking for admin JS errors..."
|
2018-05-26 22:57:26 -05:00
|
|
|
@NODE_PATH=$(abs_builddir)/node_modules $(NODE) node_modules/eslint/bin/eslint.js $(srcdir)/admin/src --ignore-path $(srcdir)/.eslintignore --config $(srcdir)/.eslintrc
|
2018-05-26 22:24:34 -05:00
|
|
|
@awk 'FNR == 1 {print ""} 1' $(patsubst %.js,$(srcdir)/%.js,$(call LOLEAFLET_JS,$(srcdir)/admin/build/build.js)) > $@
|
2018-04-12 14:57:00 -05:00
|
|
|
|
|
|
|
if ENABLE_DEBUG
|
2018-08-14 09:38:17 -05:00
|
|
|
$(LOLEAFLET_PREFIX)/dist/loleaflet-src.js: $(LOLEAFLET_JS_DST) $(LOLEAFLET_DRAW_JS_DST) $(PLUGINS_JS_DST)
|
2018-05-27 06:50:37 -05:00
|
|
|
@echo "Checking for loleaflet JS errors..."
|
2018-05-24 12:39:21 -05:00
|
|
|
@NODE_PATH=$(abs_builddir)/node_modules $(NODE) node_modules/eslint/bin/eslint.js $(srcdir)/src $(srcdir)/plugins/draw-$(DRAW_VERSION)/src $(srcdir)/js --ignore-path $(srcdir)/.eslintignore --config $(srcdir)/.eslintrc
|
2018-04-12 14:57:00 -05:00
|
|
|
@touch $@
|
|
|
|
|
|
|
|
$(builddir)/dist/bundle.css: $(LOLEAFLET_CSS_DST)
|
|
|
|
@touch $@
|
|
|
|
|
|
|
|
$(builddir)/dist/bundle.js: $(NODE_MODULES_JS_DST) \
|
2018-05-10 12:41:37 -05:00
|
|
|
$(LOLEAFLET_PREFIX)/dist/loleaflet-src.js \
|
2018-05-19 16:28:39 -05:00
|
|
|
$(builddir)/dist/global.js \
|
|
|
|
$(builddir)/dist/w2ui-1.5.rc1.js \
|
|
|
|
$(builddir)/dist/toolbar.js \
|
|
|
|
$(builddir)/dist/main.js
|
2018-04-12 14:57:00 -05:00
|
|
|
@touch $@
|
|
|
|
else
|
2018-05-10 12:41:37 -05:00
|
|
|
$(LOLEAFLET_PREFIX)/dist/loleaflet-src.js: $(LOLEAFLET_JS_SRC)
|
2018-04-12 14:57:00 -05:00
|
|
|
@mkdir -p $(dir $@)
|
2018-05-26 15:57:40 -05:00
|
|
|
@echo "Checking for loleaflet JS errors..."
|
2018-05-24 12:39:21 -05:00
|
|
|
@NODE_PATH=$(abs_builddir)/node_modules $(NODE) node_modules/eslint/bin/eslint.js $(srcdir)/src $(srcdir)/plugins/draw-$(DRAW_VERSION)/src $(srcdir)/js --ignore-path $(srcdir)/.eslintignore --config $(srcdir)/.eslintrc
|
2018-04-12 14:57:00 -05:00
|
|
|
@(cat $(srcdir)/src/copyright.js | sed 's/{VERSION}/$(LOLEAFLET_VERSION)/' - \
|
|
|
|
&& echo "(function (window, document, undefined) {" \
|
2018-05-17 16:13:24 -05:00
|
|
|
&& awk 'FNR == 1 {print ""} 1' \
|
|
|
|
$(patsubst %.js,$(srcdir)/%.js,$(call LOLEAFLET_JS,$(srcdir)/build/build.js)) \
|
|
|
|
$(patsubst %.js,$(srcdir)/plugins/draw-$(DRAW_VERSION)/%.js,$(call LOLEAFLET_JS,$(srcdir)/plugins/draw-$(DRAW_VERSION)/build/build.js)) \
|
2018-04-12 14:57:00 -05:00
|
|
|
&& echo "}(window, document));") > $@
|
|
|
|
|
|
|
|
$(builddir)/dist/bundle.css: $(LOLEAFLET_CSS)
|
|
|
|
@echo "Uglify loleaflet css files..."
|
2018-05-26 09:39:20 -05:00
|
|
|
@NODE_PATH=$(abs_builddir)/node_modules $(NODE) node_modules/uglifycss/uglifycss $(LOLEAFLET_CSS) > $@
|
2018-04-12 14:57:00 -05:00
|
|
|
|
|
|
|
$(builddir)/dist/bundle.js: $(NODE_MODULES_JS_SRC) \
|
2018-05-10 12:41:37 -05:00
|
|
|
$(LOLEAFLET_PREFIX)/dist/loleaflet-src.js \
|
2018-05-19 16:28:39 -05:00
|
|
|
$(srcdir)/js/global.js \
|
2018-11-15 09:25:08 -06:00
|
|
|
$(srcdir)/js/jquery.mCustomScrollbar.js \
|
2018-05-19 16:28:39 -05:00
|
|
|
$(srcdir)/js/w2ui-1.5.rc1.js \
|
|
|
|
$(srcdir)/js/toolbar.js \
|
|
|
|
$(srcdir)/js/main.js
|
2018-04-12 14:57:00 -05:00
|
|
|
@echo "Uglify loleaflet js files..."
|
2018-11-09 14:28:46 -06:00
|
|
|
NODE_PATH=$(abs_builddir)/node_modules $(NODE) node_modules/uglify-js/bin/uglifyjs \
|
2018-04-12 14:57:00 -05:00
|
|
|
$(srcdir)/js/global.js \
|
2018-11-09 14:28:46 -06:00
|
|
|
$(L10N_IOS_ALL_JS) \
|
2018-04-12 14:57:00 -05:00
|
|
|
$(NODE_MODULES_JS) \
|
2018-11-15 09:25:08 -06:00
|
|
|
$(srcdir)/js/jquery.mCustomScrollbar.js \
|
2018-04-12 14:57:00 -05:00
|
|
|
$(srcdir)/js/w2ui-1.5.rc1.js \
|
2018-05-19 16:28:39 -05:00
|
|
|
$(builddir)/build/dist/loleaflet-src.js \
|
2018-04-12 14:57:00 -05:00
|
|
|
$(srcdir)/js/toolbar.js \
|
2018-05-19 16:28:39 -05:00
|
|
|
$(srcdir)/js/main.js \
|
2018-04-12 14:57:00 -05:00
|
|
|
--source-map --output $@
|
|
|
|
endif
|
|
|
|
|
2018-05-27 08:16:52 -05:00
|
|
|
$(builddir)/dist/loleaflet.html: $(srcdir)/html/loleaflet.html.m4 $(LOLEAFLET_HTML_DST) \
|
2018-04-12 14:57:00 -05:00
|
|
|
$(builddir)/dist/bundle.css $(builddir)/dist/bundle.js
|
|
|
|
@echo "Generating loleaflet.html..."
|
|
|
|
@m4 -E -DDEBUG=$(ENABLE_DEBUG) \
|
2018-08-31 05:24:17 -05:00
|
|
|
-DIOSAPP=$(ENABLE_IOSAPP) \
|
2018-10-16 17:22:24 -05:00
|
|
|
-DGTKAPP=$(ENABLE_GTKAPP) \
|
2018-11-26 16:35:57 -06:00
|
|
|
-DMOBILEAPPNAME="$(MOBILE_APP_NAME)" \
|
2018-04-12 14:57:00 -05:00
|
|
|
-DLOLEAFLET_CSS="$(subst $(SPACE),$(COMMA),$(LOLEAFLET_CSS_M4))" \
|
2018-05-17 16:13:24 -05:00
|
|
|
-DLOLEAFLET_JS="$(subst $(SPACE),$(COMMA),$(GLOBAL_JS) $(NODE_MODULES_JS) \
|
|
|
|
$(call LOLEAFLET_JS,$(srcdir)/build/build.js) \
|
|
|
|
$(patsubst %.js,plugins/draw-$(DRAW_VERSION)/%.js,$(call LOLEAFLET_JS,$(srcdir)/plugins/draw-$(DRAW_VERSION)/build/build.js)) \
|
|
|
|
$(PLUGINS_JS))" \
|
2018-05-27 08:16:52 -05:00
|
|
|
$(srcdir)/html/loleaflet.html.m4 > $@
|
2016-08-07 11:27:29 -05:00
|
|
|
|
2016-12-12 04:24:43 -06:00
|
|
|
node_modules: npm-shrinkwrap.json
|
2018-05-26 09:26:47 -05:00
|
|
|
@npm install
|
|
|
|
@touch node_modules
|
2016-12-12 04:24:43 -06:00
|
|
|
|
2018-05-17 16:13:24 -05:00
|
|
|
$(builddir)/dist/plugins/%.js: $(srcdir)/plugins/%.js
|
|
|
|
@mkdir -p $(dir $@)
|
|
|
|
@cp $< $@
|
|
|
|
|
2018-04-12 14:57:00 -05:00
|
|
|
$(builddir)/dist/images/%: $(srcdir)/images/%
|
|
|
|
@mkdir -p $(dir $@)
|
|
|
|
@cp $< $@
|
|
|
|
|
|
|
|
$(builddir)/dist/%.html: $(srcdir)/html/%.html
|
|
|
|
@mkdir -p $(dir $@)
|
|
|
|
@cp $< $@
|
|
|
|
|
|
|
|
$(builddir)/dist/src/%.js: $(srcdir)/src/%.js
|
|
|
|
@mkdir -p $(dir $@)
|
|
|
|
@cp $< $@
|
|
|
|
|
|
|
|
$(builddir)/dist/%.js: $(srcdir)/js/%.js
|
|
|
|
@mkdir -p $(dir $@)
|
|
|
|
@cp $< $@
|
|
|
|
|
|
|
|
$(builddir)/dist/node_modules/%.js: $(builddir)/node_modules/%.js
|
|
|
|
@mkdir -p $(dir $@)
|
|
|
|
@cp $< $@
|
|
|
|
|
|
|
|
$(builddir)/dist/$(JQUERY_UI_IMAGE_PATH)/%.png: $(JQUERY_UI_IMAGE_PATH)/%.png
|
|
|
|
@mkdir -p $(dir $@)
|
|
|
|
@cp $< $@
|
|
|
|
|
|
|
|
$(builddir)/dist/images/%.png: $(JQUERY_UI_IMAGE_PATH)/%.png
|
|
|
|
@mkdir -p $(dir $@)
|
|
|
|
@cp $< $@
|
|
|
|
|
|
|
|
$(builddir)/dist/l10n/%: $(srcdir)/l10n/%
|
|
|
|
@mkdir -p $(dir $@)
|
|
|
|
@cp $< $@
|
2017-11-10 00:00:06 -06:00
|
|
|
|
2018-04-12 14:57:00 -05:00
|
|
|
$(builddir)/dist/l10n/%.json: $(srcdir)/po/%.po
|
|
|
|
@$(srcdir)/util/po2json.py $< -o $@
|
2017-01-04 08:08:33 -06:00
|
|
|
|
2018-05-10 12:41:37 -05:00
|
|
|
$(builddir)/dist/admin/%: $(srcdir)/admin/%
|
|
|
|
@mkdir -p $(dir $@)
|
|
|
|
@cp $< $@
|
|
|
|
|
2017-01-04 08:08:33 -06:00
|
|
|
install-data-hook:
|
|
|
|
mkdir -p $(DESTDIR)$(pkgdatadir)/loleaflet; \
|
|
|
|
cp -ar dist/ $(DESTDIR)$(pkgdatadir)/loleaflet/;
|
|
|
|
|
2016-02-08 10:20:05 -06:00
|
|
|
pot:
|
2016-08-10 05:36:57 -05:00
|
|
|
xgettext --from-code=UTF-8 --keyword=_ --output=po/templates/loleaflet-ui.pot \
|
2018-05-26 15:57:40 -05:00
|
|
|
admin/admin.strings.js \
|
2018-05-26 22:24:34 -05:00
|
|
|
admin/src/AdminSocketAnalytics.js \
|
|
|
|
admin/src/AdminSocketBase.js \
|
|
|
|
admin/src/AdminSocketOverview.js \
|
|
|
|
admin/src/AdminSocketSettings.js \
|
|
|
|
admin/src/Util.js \
|
2018-11-15 04:13:06 -06:00
|
|
|
js/toolbar.js \
|
2018-01-17 09:55:11 -06:00
|
|
|
src/control/Control.AlertDialog.js \
|
2017-04-12 15:22:49 -05:00
|
|
|
src/control/Control.ContextMenu.js \
|
2016-09-20 02:52:24 -05:00
|
|
|
src/control/Control.DocumentRepair.js \
|
2016-05-23 15:49:11 -05:00
|
|
|
src/control/Control.Menubar.js \
|
2017-03-13 07:03:00 -05:00
|
|
|
src/control/Control.Scroll.Annotation.js \
|
2016-05-31 16:26:02 -05:00
|
|
|
src/control/Control.Tabs.js \
|
2018-12-04 04:54:20 -06:00
|
|
|
src/control/Signing.js \
|
2018-11-15 04:13:06 -06:00
|
|
|
src/control/Ruler.js \
|
2016-06-09 08:26:08 -05:00
|
|
|
src/control/Toolbar.js \
|
2016-05-31 09:36:21 -05:00
|
|
|
src/core/Socket.js \
|
2018-11-15 04:13:06 -06:00
|
|
|
src/errormessages.js \
|
2017-03-13 07:03:00 -05:00
|
|
|
src/layer/marker/Annotation.js \
|
|
|
|
src/layer/tile/TileLayer.js \
|
2016-08-19 07:34:21 -05:00
|
|
|
src/map/Map.js \
|
2018-11-15 04:13:06 -06:00
|
|
|
src/map/handler/Map.FileInserter.js \
|
|
|
|
src/map/handler/Map.WOPI.js
|
2016-05-31 16:26:02 -05:00
|
|
|
|
2018-05-11 09:38:47 -05:00
|
|
|
html2po --pot --input=html/loleaflet-help.html --output=po/templates/loleaflet-help.pot --duplicates=merge
|
2016-02-08 10:20:05 -06:00
|
|
|
|
|
|
|
l10n: pot
|
2016-08-10 05:36:57 -05:00
|
|
|
for i in po/ui-*.po; do pot2po --input=po/templates/loleaflet-ui.pot --template=$$i --output=$$i.new; mv $$i.new $$i;done
|
|
|
|
for i in po/help-*.po; do pot2po --input=po/templates/loleaflet-help.pot --template=$$i --output=$$i.new; mv $$i.new $$i;done
|
2016-02-08 10:20:05 -06:00
|
|
|
|
2016-12-12 06:23:32 -06:00
|
|
|
clean-local:
|
|
|
|
rm -rf node_modules
|
2018-05-17 16:13:24 -05:00
|
|
|
rm -rf $(builddir)/dist
|
|
|
|
rm -rf $(builddir)/build/dist
|
2016-12-12 06:23:32 -06:00
|
|
|
|
2015-09-11 02:41:23 -05:00
|
|
|
spec/data/load-test:
|
|
|
|
if [ ! -d spec/data/load_test ]; then \
|
|
|
|
mkdir -p spec/data/load_test; \
|
|
|
|
for i in $$(seq 1 125); \
|
|
|
|
do \
|
|
|
|
cp spec/data/eval.odt spec/data/load_test/eval$$i.odt; \
|
|
|
|
cp spec/data/eval.odp spec/data/load_test/eval$$i.odp; \
|
|
|
|
cp spec/data/eval.ods spec/data/load_test/eval$$i.ods; \
|
|
|
|
cp spec/data/eval.odg spec/data/load_test/eval$$i.odg; \
|
|
|
|
done; \
|
|
|
|
fi
|
|
|
|
|
|
|
|
load-test: spec/data/load-test
|
|
|
|
rm -rf load_test_out; \
|
|
|
|
mkdir load_test_out; \
|
|
|
|
for i in $$(seq 1 20); \
|
|
|
|
do \
|
2016-03-07 04:59:14 -06:00
|
|
|
node_modules/.bin/mocha spec/headlessLoadTest.js > load_test_out/$$i.out 2>&1 & \
|
2015-09-11 02:41:23 -05:00
|
|
|
done;
|