-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.basic
56 lines (40 loc) · 1.27 KB
/
Makefile.basic
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
# SPDX-License-Identifier: GPL-3.0-or-later
# Copyright (C) 2021 S. K. Medlock, E. K. Herman, K. M. Shaw
#
# Makefile cheat-sheet:
#
# $@ : target label
# $< : the first prerequisite after the colon
# $^ : all of the prerequisite files
# $* : wildcard matched part
#
# Target-specific Variable syntax:
# https://www.gnu.org/software/make/manual/html_node/Target_002dspecific.html
#
# patsubst : $(patsubst pattern,replacement,text)
# https://www.gnu.org/software/make/manual/html_node/Text-Functions.html
SHELL=/bin/bash
default: check
check: dbsetup valportaal-static/ejs.3-1-6.js unit-test
@echo "SUCCESS $@"
dbsetup: links portal-dbsetup
links: portal-db-scripts.env dbconfig.env
portal-dbsetup: npmsetup portal-db-scripts.env
bin/db-create-portal-tables.sh portal-db-scripts.env
npmsetup: node_modules/ws/lib/websocket-server.js \
node_modules/jest-fetch-mock/package.json
@echo "$@ complete"
node_modules/ws/lib/websocket-server.js:
npm install
@echo "$@ complete"
node_modules/jest-fetch-mock/package.json:
npm install
@echo "$@ complete"
update:
npm update
valportaal-static/ejs.3-1-6.js:
wget https://github.com/mde/ejs/releases/download/v3.1.6/ejs.js
mv -iv ejs.js $@
unit-test: npmsetup links valportaal-static/ejs.3-1-6.js
npm test
unit: unit-test