-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathMakefile
More file actions
40 lines (31 loc) · 1.16 KB
/
Copy pathMakefile
File metadata and controls
40 lines (31 loc) · 1.16 KB
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
.PHONY: help prepare cookie external html serve build-serve clean
.DEFAULT_GOAL := help
# Add help text after each target name starting with '\#\#'
help: ## show this help
@echo -e "Help for this makefile\n"
@echo "Possible commands are:"
@grep -h "##" $(MAKEFILE_LIST) | grep -v grep | sed -e 's/\(.*\):.*##\(.*\)/ \1: \2/'
prepare:
git submodule update --init --recursive
cookie:
(cd external-content/cookie/docs && \
BASE_URL=/development npx --yes mystmd build --html)
mkdir -p public/development
cp -r external-content/cookie/docs/_build/html/. public/development/
external: cookie
html: ## Build learn site in `./content/_build/html`
html: prepare
(cd content && myst build --html)
html-all: ## Build learn site with external content in `./public`
html-all: html
mkdir -p public && cp -r content/_build/html/. public/
$(MAKE) external
serve: ## Serve site, typically on http://localhost:3000
serve: prepare
(cd content && myst start)
build-serve: ## Build full site (learn + cookie) and serve `./public` at http://localhost:3000
build-serve: html-all
python3 scripts/serve.py 3000 public
clean: ## Remove built files
clean:
rm -rf content/_build public