-
Notifications
You must be signed in to change notification settings - Fork 251
Expand file tree
/
Copy pathMakefile
More file actions
58 lines (42 loc) · 1.6 KB
/
Makefile
File metadata and controls
58 lines (42 loc) · 1.6 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
48
49
50
51
52
53
54
55
56
57
58
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = python3 -msphinx
SPHINXPROJ = Smithy
SHELL := /bin/bash
install:
python3 -m venv build/venv
source build/venv/bin/activate && pip3 install -e .
(cd landing-page && npm install)
clean:
-rm -rf build/* install
html1:
@source build/venv/bin/activate && $(SPHINXBUILD) -M html "source-1.0" "build/1.0" $(SPHINXOPTS) -W --keep-going -n $(O)
html2:
@source build/venv/bin/activate && $(SPHINXBUILD) -M html "source-2.0" "build/2.0" $(SPHINXOPTS) -W --keep-going -n $(O)
md1:
@source build/venv/bin/activate && $(SPHINXBUILD) -M markdown "source-1.0" "build/1.0-md" $(SPHINXOPTS) -W --keep-going -n $(O)
md2:
@source build/venv/bin/activate && $(SPHINXBUILD) -M markdown "source-2.0" "build/2.0-md" $(SPHINXOPTS) -W --keep-going -n $(O)
build-landing-page:
cd landing-page && npm run build
llms-txt: html2
python3 generate_llms_txt.py
markdown: md2 md1 merge-markdown
html: html2 html1 build-landing-page merge-versions markdown llms-txt
serve:
npx http-server build/html
merge-versions:
mkdir -p build/html
cp -R "build/1.0/html" "build/html/1.0"
cp -R "build/2.0/html" "build/html/2.0"
cp -R root/* "build/html"
cp -R landing-page/dist/* "build/html/"
merge-markdown:
mkdir -p build/html/1.0/markdown build/html/2.0/markdown
cp -R "build/1.0-md/markdown/." "build/html/1.0/markdown/"
cp -R "build/2.0-md/markdown/." "build/html/2.0/markdown/"
openhtml:
open "build/html/index.html"
dev: install
@source build/venv/bin/activate && sphinx-autobuild "source-2.0" "build/2.0" $(SPHINXOPTS) $(O)
.PHONY: Makefile clean