2020-05-01 22:08:34 +02:00
|
|
|
# -*- Makefile -*-
|
|
|
|
|
2021-04-26 08:45:16 +02:00
|
|
|
PORT?=3000
|
2020-05-16 14:03:08 +02:00
|
|
|
|
2020-05-16 10:02:18 +02:00
|
|
|
ESLINT?=eslint
|
|
|
|
|
2020-12-28 10:53:05 +01:00
|
|
|
TIDY?=tidy
|
|
|
|
|
2020-05-16 10:02:18 +02:00
|
|
|
ifeq (, $(shell which $(firstword ${ESLINT})))
|
|
|
|
ESLINT?=npx eslint
|
|
|
|
endif
|
2020-05-01 22:08:34 +02:00
|
|
|
|
2020-05-16 14:03:08 +02:00
|
|
|
.PHONY: all help lang start-dev-server
|
|
|
|
|
2020-10-16 18:34:01 +02:00
|
|
|
all: lang emptydictlist
|
2020-05-16 14:03:08 +02:00
|
|
|
|
2020-05-01 22:08:34 +02:00
|
|
|
help:
|
2020-05-24 21:41:31 +02:00
|
|
|
@echo make extract-lang-dists: extract the distributions per language from Wikipedia
|
2020-05-17 09:03:05 +02:00
|
|
|
@echo make lang: build the translation files
|
|
|
|
@echo make eslint: use ESLint to check conformance against the coding style
|
2020-05-03 13:02:56 +02:00
|
|
|
@echo make start-dev-server: start a development server
|
2020-05-01 22:08:34 +02:00
|
|
|
|
2020-05-17 09:03:05 +02:00
|
|
|
public/l10n/js/fr.js: $(wildcard l10n/po/*/*.po)
|
2020-05-03 11:37:40 +02:00
|
|
|
cd l10n; make
|
2020-05-01 22:08:34 +02:00
|
|
|
|
2020-05-24 21:41:31 +02:00
|
|
|
extract-lang-dists:
|
|
|
|
cd lang-dists-extractor; make
|
2020-05-18 08:32:49 +02:00
|
|
|
|
2020-05-17 09:03:05 +02:00
|
|
|
lang: public/l10n/js/fr.js
|
|
|
|
|
2020-10-16 18:34:01 +02:00
|
|
|
emptydictlist: public/dict/list.js
|
|
|
|
|
|
|
|
public/dict/list.js:
|
|
|
|
mkdir -p public/dict/ && touch public/dict/list.js
|
|
|
|
|
2020-05-07 00:52:46 +02:00
|
|
|
eslint:
|
2020-05-16 10:02:18 +02:00
|
|
|
-${ESLINT} **/*.js
|
2020-05-07 00:52:46 +02:00
|
|
|
|
2020-12-28 10:53:05 +01:00
|
|
|
tidy:
|
|
|
|
-${TIDY} -xml -errors -q public/*.html
|
|
|
|
|
2020-05-17 09:03:05 +02:00
|
|
|
start-dev-server: lang
|
2020-05-03 14:35:33 +02:00
|
|
|
cd server && make start-dev-server
|