forked from scientific-python/scientific-python.org
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
55 lines (37 loc) · 1.58 KB
/
Makefile
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
.PHONY: help prepare html serve serve-dev clean calendars teams teams-clean
.DEFAULT_GOAL := help
SHELL:=/bin/bash
# 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
pip install -r tools/yaml2ics/requirements.txt
CALENDAR_DIR = content/calendars
$(CALENDAR_DIR):
mkdir -p $(CALENDAR_DIR)
$(CALENDAR_DIR)/%.ics: calendars/%.yaml $(CALENDAR_DIR)
python tools/yaml2ics/yaml2ics.py $< > $@
calendars: $(CALENDAR_DIR)/numpy.ics $(CALENDAR_DIR)/scipy.ics $(CALENDAR_DIR)/matplotlib.ics $(CALENDAR_DIR)/skimage.ics $(CALENDAR_DIR)/networkx.ics $(CALENDAR_DIR)/poliastro.ics $(CALENDAR_DIR)/sunpy.ics
TEAMS_DIR = static/teams
TEAMS = community-managers spec-steering-committee community-leaders
TEAMS_QUERY = python themes/scientific-python-hugo-theme/tools/team_query.py
$(TEAMS_DIR):
mkdir -p $(TEAMS_DIR)
$(TEAMS_DIR)/%.md: $(TEAMS_DIR)
$(TEAMS_QUERY) --org scientific-python --team "$*" > $(TEAMS_DIR)/$*.html
teams-clean:
for team in $(TEAMS); do \
rm -f $(TEAMS_DIR)/$${team}.html ;\
done
teams: | teams-clean $(patsubst %,$(TEAMS_DIR)/%.md,$(TEAMS)) ## generates team gallery pages
html: prepare calendars ## build the website in ./public
@hugo
serve: prepare calendars ## serve the website
@hugo --printI18nWarnings server
serve-dev: prepare calendars
@hugo --printI18nWarnings --disableFastRender server
clean:
rm -rf public content/calendars/*.ics