-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathMakefile
More file actions
47 lines (37 loc) · 1.46 KB
/
Makefile
File metadata and controls
47 lines (37 loc) · 1.46 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
41
42
43
44
45
46
47
.PHONY: help prepare cookie cookie_ruby_deps cookie_web_prepare external html 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
cookie_ruby_deps:
(cd external-content/cookie && \
bundle install)
cookie_web_prepare:
(cd external-content/cookie && \
./helpers/fetch_repo_review_app.sh)
# TEMP (revert me): build cookie via MyST using scientific-python/cookie#792.
# Jekyll prereqs (cookie_ruby_deps, cookie_web_prepare) bypassed — that branch
# removes Gemfile + fetch_repo_review_app.sh. Restore Jekyll target + submodule
# pin 8819e08 before merge. See ADR 0004.
cookie:
(cd external-content/cookie && npm install && \
cd docs && BASE_URL=/development myst build --html && \
mkdir -p ../../../public/development && cp -r _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)
clean: ## Remove built files
clean:
rm -rf content/_build public