-
Notifications
You must be signed in to change notification settings - Fork 182
/
Makefile
115 lines (86 loc) · 2.14 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
BOWER ?= node_modules/.bin/bower
GULP ?= node_modules/.bin/gulp
TSLINT ?= node_modules/.bin/tslint
MOCHA ?= node_modules/.bin/mocha
TEX = pdflatex
NPM_DEPS = $(GULP) $(TSLINT) $(MOCHA)
BUILD_DEPS = $(NPM_DEPS) bower_components
SYSTEMGO = github.com/rvolosatovs/systemgo
INIT = fs/usr/bin/init
SYSTEMCTL = fs/usr/bin/systemctl
# quiet output, but allow us to look at what commands are being
# executed by passing 'V=1' to make, without requiring temporarily
# editing the Makefile.
ifneq ($V, 1)
MAKEFLAGS += -s
endif
# GNU make, you are the worst.
.SUFFIXES:
%: %,v
%: RCS/%,v
%: RCS/%
%: s.%
%: SCCS/s.%
.SUFFIXES: .tex .pdf
all: test-once
dist: $(BUILD_DEPS)
@echo " DIST"
$(GULP) 'build:dist'
.tex.pdf: report.bib
@echo " LATEX $@"
$(TEX) $<
bibtex $(shell echo $< | cut -d '.' -f 1).aux
$(TEX) $<
$(TEX) $<
report: report.pdf
test-once: $(BUILD_DEPS)
@echo " TEST"
$(GULP)
shell: serve
serve: $(BUILD_DEPS)
@echo " SERVE"
$(GULP) serve
browsix-spec: $(BUILD_DEPS)
@echo " Browsix SPEC"
$(GULP) browsix-spec
node_modules: bower_components package.json
@echo " NPM"
npm install
touch -c $@
$(BOWER):
@echo " NPM bower"
npm install bower
touch -c $@
$(NPM_DEPS): node_modules
touch -c $@
bower_components: $(BOWER) bower.json
@echo " BOWER"
$(BOWER) install --silent
touch -c $@
syscall-api: $(BUILD_DEPS)
@echo " SYSCALL"
node_modules/.bin/gulp dist-syscall-api
bin: $(BUILD_DEPS)
@echo " BIN"
node_modules/.bin/gulp index-fs
systemgo: init systemctl
init: $(BUILD_DEPS)
@echo " INIT"
browsix-gopherjs build $(SYSTEMGO)/cmd/init -o $(INIT)
rm $(INIT).map
chmod +x $(INIT)
systemctl: $(BUILD_DEPS)
@echo " SYSTEMCTL"
browsix-gopherjs build $(SYSTEMGO)/cmd/systemctl -o $(SYSTEMCTL)
rm $(SYSTEMCTL).map
chmod +x $(SYSTEMCTL)
test-browser: $(BUILD_DEPS)
@echo " TEST BROWSER"
$(GULP) test-browser
test: test-browser
clean:
rm -rf dist lib lib-dist fs report.{pdf,aux,bbl,blg,log} test/*.js
find . -name '*~' | xargs rm -f
distclean: clean
rm -rf node_modules bower_components
.PHONY: all clean distclean test test-browser test-node report test-once shell serve init systemctl