-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
79 lines (62 loc) · 1.88 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
### Defensive settings for make:
# https://tech.davis-hansson.com/p/make/
SHELL:=bash
.ONESHELL:
.SHELLFLAGS:=-xeu -o pipefail -O inherit_errexit -c
.SILENT:
.DELETE_ON_ERROR:
MAKEFLAGS+=--warn-undefined-variables
MAKEFLAGS+=--no-builtin-rules
CURRENT_DIR:=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
# We like colors
# From: https://coderwall.com/p/izxssa/colored-makefile-for-golang-projects
RED=`tput setaf 1`
GREEN=`tput setaf 2`
RESET=`tput sgr0`
YELLOW=`tput setaf 3`
.PHONY: all
all: build
# Add the following 'help' target to your Makefile
# And add help text after each target name starting with '\#\#'
.PHONY: help
help: ## This help message
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
.PHONY: install-frontend
install-frontend: ## Install React Frontend
$(MAKE) -C "./frontend/" install
.PHONY: build-frontend
build-frontend: ## Build React Frontend
$(MAKE) -C "./frontend/" build
.PHONY: start-frontend
start-frontend: ## Start React Frontend
$(MAKE) -C "./frontend/" start
.PHONY: install-backend
install-backend: ## Create virtualenv and install Plone
$(MAKE) -C "./backend/" build-dev
.PHONY: build-backend
build-backend: ## Build Backend
$(MAKE) -C "./backend/" build-dev
.PHONY: start-backend
start-backend: ## Start Plone Backend
$(MAKE) -C "./backend/" start
.PHONY: install
install: ## Install
@echo "Install Backend & Frontend"
$(MAKE) install-backend
$(MAKE) install-frontend
# TODO production build
.PHONY: build
build: ## Build in development mode
@echo "Build"
$(MAKE) build-backend
$(MAKE) install-frontend
.PHONY: start
start: ## Start
@echo "Starting application"
$(MAKE) start-backend
$(MAKE) start-frontend
.PHONY: clean
clean: ## Clean installation
@echo "Clean installation"
$(MAKE) -C "./backend/" clean
$(MAKE) -C "./frontend/" clean