2020-06-22 07:00:45 +02:00
|
|
|
SHELL := /bin/bash
|
|
|
|
|
|
|
|
ifndef SHELLFLAGS
|
|
|
|
SHELLFLAGS :=
|
|
|
|
endif
|
|
|
|
|
|
|
|
.SHELLFLAGS := -eu -o pipefail ${SHELLFLAGS} -c
|
|
|
|
MAKEFLAGS += --warn-undefined-variables
|
|
|
|
MAKEFLAGS += --no-builtin-rules
|
|
|
|
|
|
|
|
ifndef OS
|
|
|
|
OS := unknown
|
|
|
|
endif
|
|
|
|
|
|
|
|
.DELETE_ON_ERROR:
|
|
|
|
.SUFFIXES:
|
|
|
|
|
|
|
|
$(shell mkdir -p .build)
|
|
|
|
|
|
|
|
PHONY: all
|
|
|
|
all: check
|
|
|
|
|
|
|
|
.build/npm: package.json
|
|
|
|
npm i
|
|
|
|
@touch $@
|
|
|
|
|
|
|
|
PROTODEPS := ../proto/backend.proto ../proto/fluent.proto
|
|
|
|
BUILDDEPS := .build/npm webpack.config.js
|
|
|
|
|
|
|
|
.build/proto: $(BUILDDEPS) $(PROTODEPS)
|
|
|
|
npm run proto
|
|
|
|
@touch $@
|
|
|
|
|
|
|
|
PHONY: dev
|
|
|
|
dev: .build/proto
|
|
|
|
npm run dev
|
|
|
|
|
|
|
|
PHONY: build
|
|
|
|
build: .build/build
|
|
|
|
|
2020-06-26 02:42:10 +02:00
|
|
|
PHONY: develop
|
|
|
|
develop: .build/build
|
|
|
|
|
2020-06-22 07:00:45 +02:00
|
|
|
.build/build: .build/proto $(BUILDDEPS) $(wildcard src/*/*.svelte src/*/*.ts)
|
2020-06-26 02:42:10 +02:00
|
|
|
npm i
|
2020-06-22 07:00:45 +02:00
|
|
|
npm run build
|
|
|
|
@touch $@
|
|
|
|
|
|
|
|
.PHONY: check
|
2020-06-26 02:42:10 +02:00
|
|
|
check: .build/build
|
2020-06-22 07:00:45 +02:00
|
|
|
npm run check
|
|
|
|
|
|
|
|
.PHONY: fix
|
2020-06-26 02:42:10 +02:00
|
|
|
fix: .build/build
|
2020-06-22 07:00:45 +02:00
|
|
|
npm run fix
|
2020-06-26 02:42:10 +02:00
|
|
|
|
|
|
|
.PHONY: clean
|
|
|
|
clean:
|
|
|
|
rm -rf .build node_modules src/backend/*
|