-
Notifications
You must be signed in to change notification settings - Fork 31
/
Makefile
executable file
·55 lines (45 loc) · 923 Bytes
/
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
# Makefile
#
# NWMatcher distribution builder
#
# currently just a wrapper for:
#
# - nwjslint.sh (writes to lint.log)
# - nwpackjs.sh (writes to dist.log)
#
# getting path
SOURCES=./
# resets default rules
.SUFFIXES:
# just in case they exists
.PHONY: all clean dist lint test
# add a SILENT flag to stop
# showing directories access
ifeq ($(filter -s,$(MAKEFLAGS)),)
MAKEFLAGS += -s
endif
# shell scripts
SCRIPTS=${SOURCES}/build/scripts
# default all stages
all:
@make clean ${SOURCES}
@make lint ${SOURCES}
@make dist ${SOURCES}
@make test ${SOURCES}
# clean stage
clean:
@rm -f dist/nwmatcher.js
@rm -f dist/nwmatcher-min.js
@rm -f dist/nwmatcher-pac.js
@rm -f dist/nwmatcher-src.js
@rm -f dist/nwmatcher-zip.js
@rm -f dist/lint.log
# dist stage
dist:
@${SCRIPTS}/nwpackjs.sh ${SOURCES}
# lint stage
lint:
@${SCRIPTS}/nwjslint.sh ${SOURCES}
# test stage
test:
@${SCRIPTS}/nwtestjs.sh ${SOURCES}