forked from w3ctag/privacy-principles
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
35 lines (28 loc) · 1.01 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
# How to snapshot the Privacy Principles document -*- makefile-gmake -*-
# This Makefile expects respec and doctoc to be installed, both of which
# may be installed with NPM. Additionally, respec requires you to have
# Google Chrome installed. This Makefile checks for Chrome in the
# default install locations on macOS and Linux. TODO: make this work on
# Windows too.
.PHONY: all clean update-toc
all: build/index.html update-toc
clean:
rm -rf build *~
build:
mkdir -p build
# There has got to be a cleaner way to do this.
PUPPETEER_SKIP_DOWNLOAD = 1
export PUPPETEER_SKIP_DOWNLOAD
CHROME_ON_MAC="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
CHROME_ON_LINUX="/usr/bin/google-chrome"
build/%.html: %.html Makefile build
if [[ -f $(CHROME_ON_MAC) ]]; then \
export PUPPETEER_EXECUTABLE_PATH=$(CHROME_ON_MAC); \
respec --src $< --out $@; \
fi
if [[ -f $(CHROME_ON_LINUX) ]]; then \
export PUPPETEER_EXECUTABLE_PATH=$(CHROME_ON_LINUX); \
respec --src $< --out $@; \
fi
update-toc:
doctoc README.md