mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2024-11-10 08:57:25 +01:00
Add Makefile for build automation
This commit is contained in:
parent
dd5f09c982
commit
b44c6a2e7d
47
Makefile
Normal file
47
Makefile
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
TARGET = ./cc-backend
|
||||||
|
VAR = ./var
|
||||||
|
FRONTEND = ./web/frontend
|
||||||
|
|
||||||
|
SVELTE_COMPONENTS = status \
|
||||||
|
analysis \
|
||||||
|
node \
|
||||||
|
systems \
|
||||||
|
job \
|
||||||
|
list \
|
||||||
|
user \
|
||||||
|
jobs \
|
||||||
|
header
|
||||||
|
|
||||||
|
SVELTE_TARGETS = $(addprefix $(FRONTEND)/public/build/,$(addsuffix .js, $(SVELTE_COMPONENTS)))
|
||||||
|
SVELTE_SRC = $(wildcard $(FRONTEND)/src/*.svelte) \
|
||||||
|
$(wildcard $(FRONTEND)/src/*.js) \
|
||||||
|
$(wildcard $(FRONTEND)/src/filters/*.svelte) \
|
||||||
|
$(wildcard $(FRONTEND)/src/plots/*.svelte) \
|
||||||
|
$(wildcard $(FRONTEND)/src/joblist/*.svelte)
|
||||||
|
|
||||||
|
.PHONY: clean test $(TARGET)
|
||||||
|
|
||||||
|
.NOTPARALLEL:
|
||||||
|
|
||||||
|
$(TARGET): $(VAR) $(SVELTE_TARGETS)
|
||||||
|
$(info ===> BUILD cc-backend)
|
||||||
|
@go build ./cmd/cc-backend
|
||||||
|
|
||||||
|
clean:
|
||||||
|
$(info ===> CLEAN)
|
||||||
|
@go clean
|
||||||
|
@rm $(TARGET)
|
||||||
|
|
||||||
|
test:
|
||||||
|
$(info ===> TESTING)
|
||||||
|
@go build ./...
|
||||||
|
@go vet ./...
|
||||||
|
@go test ./...
|
||||||
|
|
||||||
|
$(SVELTE_TARGETS): $(SVELTE_SRC)
|
||||||
|
cd web/frontend && yarn build
|
||||||
|
|
||||||
|
$(VAR):
|
||||||
|
@mkdir $(VAR)
|
||||||
|
@touch ./var/job.db
|
||||||
|
cd web/frontend && yarn install
|
Loading…
Reference in New Issue
Block a user