-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
47 lines (41 loc) · 2.07 KB
/
Makefile
File metadata and controls
47 lines (41 loc) · 2.07 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
# Minimal makefile for Sphinx documentation
#
# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?= -j auto --color
SPHINXBUILD ?= sphinx-build
SOURCEDIR = content
BUILDDIR = _build
# Hardware submodule asset directories
MAINBOARD_ASSETS = hardware/mainboard/assets
MK2WIFI_ASSETS = hardware/expansion_boards/mk2Wifi-C6/assets
INDICATOR_ASSETS = hardware/Indicator/assets
IMG_DIR = $(SOURCEDIR)/img
# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
.PHONY: help Makefile copy-assets
# Copy hardware renders into content/img/ before building
copy-assets:
@if [ -d "$(MAINBOARD_ASSETS)" ]; then \
cp $(MAINBOARD_ASSETS)/3phaseDiverter-front.png $(IMG_DIR)/mainboard-front.png; \
cp $(MAINBOARD_ASSETS)/3phaseDiverter-back.png $(IMG_DIR)/mainboard-back.png; \
cp $(MAINBOARD_ASSETS)/3phaseDiverter-smd.png $(IMG_DIR)/mainboard-smd.png; \
cp $(MAINBOARD_ASSETS)/3phaseDiverter-bare.png $(IMG_DIR)/mainboard-bare.png; \
fi
@if [ -d "$(MK2WIFI_ASSETS)" ]; then \
cp $(MK2WIFI_ASSETS)/mk2Wifi-C6-front.png $(IMG_DIR)/mk2wifi-front.png; \
cp $(MK2WIFI_ASSETS)/mk2Wifi-C6-back.png $(IMG_DIR)/mk2wifi-back.png; \
cp $(MK2WIFI_ASSETS)/mk2Wifi-C6-smd.png $(IMG_DIR)/mk2wifi-smd.png; \
cp $(MK2WIFI_ASSETS)/mk2Wifi-C6-bare.png $(IMG_DIR)/mk2wifi-bare.png; \
fi
@if [ -d "$(INDICATOR_ASSETS)" ]; then \
cp $(INDICATOR_ASSETS)/Indicator-front.png $(IMG_DIR)/indicator-front.png; \
cp $(INDICATOR_ASSETS)/Indicator-back.png $(IMG_DIR)/indicator-back.png; \
cp $(INDICATOR_ASSETS)/Indicator-bare-front.png $(IMG_DIR)/indicator-bare-front.png; \
cp $(INDICATOR_ASSETS)/Indicator-bare-back.png $(IMG_DIR)/indicator-bare-back.png; \
fi
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile copy-assets
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) --show-traceback