forked from dperini/nwsapi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
executable file
·58 lines (48 loc) · 943 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
56
57
58
#
# Makefile
#
# NWSAPI distribution builder
#
# currently just a wrapper for:
#
# - nwjslint.sh (writes to lint.log)
# - nwpackjs.sh (writes to dist.log)
#
# minifier by Dean Edwards
#
# getting path
SOURCES=./
# resets default rules
.SUFFIXES:
# just in case they exists
.PHONY: all clean dist lint
# add a SILENT flag to stop
# showing directories access
ifeq ($(filter -s,$(MAKEFLAGS)),)
MAKEFLAGS += -s
endif
# shell scripts directory
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/nwsapi.js
@rm -f dist/nwsapi-min.js
@rm -f dist/nwsapi-pac.js
@rm -f dist/nwsapi-src.js
@rm -f dist/nwsapi-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}