-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
53 lines (41 loc) · 1.55 KB
/
Makefile
File metadata and controls
53 lines (41 loc) · 1.55 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
# Top-level Makefile for creating the Spectral Python (SPy) website
SPHINXDIR = sphinx
SPHINXOPTS = -W
PYTHON = python
SPECTRAL_DATA := $(SPHINXDIR)/data:$(SPECTRAL_DATA)
# The name of a sample data file so we know whether to init/update the git submodule
IMAGE_FILE = $(SPHINXDIR)/data/92AV3C.lan
.PHONY: sphinx-html, images, upload, clean, help, git-submodules
help:
@echo "Build targets:"
@echo " sphinx-html Makes Sphinx HTML files without creating externally"
@echo " generated images (faster and useful for debugging)."
@echo " images Makes external images referenced by Sphinx."
@echo " site Builds all website content."
@echo " clean Removes all generated content."
@echo " upload Uploads web site content to server."
@echo ""
sphinx-html: $(IMAGE_FILE)
@echo "Building Sphinx files..."
$(MAKE) -C $(SPHINXDIR) html SPHINXOPTS=$(SPHINXOPTS)
images:
@echo "Creating image files..."
$(PYTHON) scripts/create_images.py -o $(SPHINXDIR)/images
$(IMAGE_FILE):
@echo "Retrieving sample data files from GitHub..."
git submodule init
git submodule update
git-submodules:
@echo "Retrieving sample data files from GitHub..."
git submodule init
git submodule update
site: images sphinx-html
cp static/CNAME sphinx/_build/html
cp static/.nojekyll sphinx/_build/html
upload:
ghp-import sphinx/_build/html/ && \
git checkout master && git merge gh-pages -m "gh-pages merge" && \
git push origin --all && git checkout source
clean:
$(MAKE) -C $(SPHINXDIR) clean
rm -rf $(SPHINXDIR)/images