forked from whatwg/webidl
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
35 lines (31 loc) · 1.08 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
bs_installed := $(shell command -v bikeshed 2> /dev/null)
npm_installed := $(shell command -v npm 2> /dev/null)
pp_webidl_installed := $(shell npm ls webidl-grammar-post-processor --parseable --depth=0 2> /dev/null)
all : index.html
index.html : index.bs
ifdef bs_installed
bikeshed spec index.bs
else
@echo Can't find a local version of Bikeshed. To install it, visit:
@echo
@echo https://github.com/tabatkins/bikeshed/blob/master/docs/install.md
@echo
@echo Trying to build the spec using the online API at: https://api.csswg.org/bikeshed/
@echo This will fail if you are not connected to the network.
curl https://api.csswg.org/bikeshed/ -F [email protected] > index.html
endif
ifdef pp_webidl_installed
npm run pp-webidl -- --input index.html
else ifdef npm_installed
npm install
npm run pp-webidl -- --input index.html
else
@echo You need node.js and npm to apply post-processing. To install it, visit:
@echo
@echo https://nodejs.org/en/download/
@echo
@echo Until then, post-processing will be done dynamically, in JS, on page load.
endif
clean :
rm -f index.html
.PHONY : all clean