diff options
author | Florian Dold <florian@dold.me> | 2022-03-08 12:56:30 +0100 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2022-03-08 12:57:07 +0100 |
commit | 9c758d1fe9cc0f372a9f38fb757ede55b8ce5ac0 (patch) | |
tree | 7b13c666e190c761a044c2ae525cff98db4a8301 | |
parent | 3e6f6eb3d7effc81f864bef91c771ad8cef0f5de (diff) |
improve performance of 'make install'
We now only build workspace dependencies of taler-wallet-cli instead of
the whole workspace.
-rw-r--r-- | build-system/Makefile | 49 |
1 files changed, 37 insertions, 12 deletions
diff --git a/build-system/Makefile b/build-system/Makefile index 92c3fefea..20c6ce889 100644 --- a/build-system/Makefile +++ b/build-system/Makefile @@ -1,8 +1,10 @@ # This Makefile has been placed in the public domain. src = src +poname = taler-wallet-webex tsc = node_modules/typescript/bin/tsc +pogen = node_modules/@gnu-taler/pogen/bin/pogen.js typedoc = node_modules/typedoc/bin/typedoc ava = node_modules/.bin/ava nyc = node_modules/nyc/bin/nyc.js @@ -10,11 +12,6 @@ git-archive-all = ./build-system/taler-build-scripts/archive-with-submodules/git include ./build-system/config.mk -.PHONY: compile -compile: - pnpm i -r --frozen-lockfile - pnpm run compile - .PHONY: dist dist: $(git-archive-all) --include ./configure taler-wallet-$(shell git describe --tags --abbrev=0).tar.gz @@ -25,7 +22,9 @@ dist-git: $(git-archive-all) --include ./configure taler-wallet-$(shell git describe --tags).tar.gz .PHONY: publish -publish: compile +publish: + pnpm i -r --frozen-lockfile + pnpm run compile pnpm publish -r --no-git-checks # make documentation from docstrings @@ -42,24 +41,49 @@ submodules-update: git submodule update --recursive --remote .PHONY: check -check: compile +check: + pnpm i -r --frozen-lockfile + pnpm run compile pnpm run check .PHONY: webextensions -webextension: compile +webextension: + pnpm i -r --frozen-lockfile + pnpm run compile cd ./packages/taler-wallet-webextension/ && ./pack.sh .PHONY: webextension-dev-view -webextension-dev-view: compile +webextension-dev-view: + pnpm i -r --frozen-lockfile + pnpm run compile pnpm run --filter @gnu-taler/taler-wallet-webextension storybook .PHONY: integrationtests integrationtests: compile + pnpm i -r --frozen-lockfile + pnpm run compile ./packages/taler-integrationtests/testrunner '*' .PHONY: i18n -i18n: compile - pnpm run --filter @gnu-taler/taler-wallet-webextension i18n +i18n: compile + # extract translatable strings + find $(src) \( -name '*.ts' -or -name '*.tsx' \) ! -name '*.d.ts' \ + | xargs node $(pogen) \ + | msguniq \ + | msgmerge src/i18n/poheader - \ + > src/i18n/$(poname).pot + # merge existing translations + @for pofile in src/i18n/*.po; do \ + echo merging $$pofile; \ + msgmerge -o $$pofile $$pofile src/i18n/$(poname).pot; \ + done; + # generate .ts file containing all translations + cat src/i18n/strings-prelude > src/i18n/strings.ts + @for pofile in src/i18n/*.po; do \ + echo appending $$pofile; \ + ./contrib/po2ts $$pofile >> src/i18n/strings.ts; \ + done; + ./node_modules/.bin/prettier --config .prettierrc --write src/i18n/strings.ts # Some commands are only available when ./configure has been run @@ -71,7 +95,8 @@ install: warn-noprefix else install_target = $(prefix)/lib/taler-wallet-cli .PHONY: install -install: compile +install: + pnpm install --frozen-lockfile --filter @gnu-taler/taler-wallet-cli... install -d $(prefix)/bin install -d $(install_target)/bin install -d $(install_target)/node_modules/taler-wallet-cli |