diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 30 |
1 files changed, 16 insertions, 14 deletions
@@ -8,27 +8,29 @@ get: go get -tags $(TAGS) ./... go get -tags "$(TAGS) bitmaskd" ./... -build: - go build -tags $(TAGS) -ldflags "-X main.version=`git describe --tags`" +build: $(foreach path,$(wildcard cmd/*),build_$(patsubst cmd/%,%,$(path))) + +build_%: + go build -tags $(TAGS) -ldflags "-X main.version=`git describe --tags`" -o $* ./cmd/$* test: go test -tags "integration $(TAGS)" ./... build_bitmaskd: - go build -tags "$(TAGS) bitmaskd" -ldflags "-X main.version=`git describe --tags`" + go build -tags "$(TAGS) bitmaskd" -ldflags "-X main.version=`git describe --tags`" ./cmd/* build_win: - powershell -Command '$$version=git describe --tags; go build -ldflags "-H windowsgui -X main.version=$$version"' + powershell -Command '$$version=git describe --tags; go build -ldflags "-H windowsgui -X main.version=$$version" ./cmd/*' clean: make -C icon clean - rm bitmask-systray + rm bitmask-vpn icon: make -C icon get_deps: - sudo apt install libgtk-3-dev libappindicator3-dev golang pkg-config + sudo apt install libgtk-3-dev libappindicator3-dev golang pkg-config LANGS ?= $(foreach path,$(wildcard locales/*),$(patsubst locales/%,%,$(path))) @@ -36,17 +38,17 @@ empty := space := $(empty) $(empty) lang_list := $(subst $(space),,$(foreach lang,$(LANGS),$(lang),)) -locales: $(foreach lang,$(LANGS),get_$(lang)) catalog.go +locales: $(foreach lang,$(LANGS),get_$(lang)) cmd/bitmask-vpn/catalog.go generate_locales: $(foreach lang,$(LANGS),locales/$(lang)/out.gotext.json) - make -C transifex + make -C tools/transifex -locales/%/out.gotext.json: systray.go notificator.go - gotext update -lang=$* +locales/%/out.gotext.json: pkg/systray/systray.go pkg/systray/notificator.go pkg/bitmask/standalone.go pkg/bitmask/bitmaskd.go + gotext update -lang=$* ./pkg/systray ./pkg/bitmask -catalog.go: $(foreach lang,$(LANGS),locales/$(lang)/messages.gotext.json) - gotext update -lang=$(lang_list) -out catalog.go +cmd/bitmask-vpn/catalog.go: $(foreach lang,$(LANGS),locales/$(lang)/messages.gotext.json) + gotext update -lang=$(lang_list) -out cmd/bitmask-vpn/catalog.go ./pkg/systray ./pkg/bitmask get_%: - make -C transifex build - curl -L -X GET --user "api:${API_TOKEN}" "https://www.transifex.com/api/2/project/bitmask/resource/RiseupVPN/translation/${subst -,_,$*}/?file" | transifex/transifex t2g locales/$*/ + make -C tools/transifex build + curl -L -X GET --user "api:${API_TOKEN}" "https://www.transifex.com/api/2/project/bitmask/resource/RiseupVPN/translation/${subst -,_,$*}/?file" | tools/transifex/transifex t2g locales/$*/ |