Skip to content

Commit 22f2368

Browse files
authored
Makefile cleanup (#428)
* Automate gathering of calendars * Do not re-install existing dependencies
1 parent 7aac2a6 commit 22f2368

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

Makefile

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ help: ## show this help
1111

1212
prepare:
1313
git submodule update --init
14-
pip install -r requirements.txt
15-
pre-commit install
14+
((python -c 'import yaml2ics' && pre-commit) > /dev/null 2>&1) || pip install -q -r requirements.txt
15+
test -f .git/hooks/pre-commit || pre-commit install
1616

1717
CALENDAR_DIR = content/calendars
1818

@@ -22,16 +22,8 @@ $(CALENDAR_DIR):
2222
$(CALENDAR_DIR)/%.ics: calendars/%.yaml $(CALENDAR_DIR)
2323
yaml2ics $< > $@
2424

25-
calendars: $(CALENDAR_DIR)/numpy.ics
26-
calendars: $(CALENDAR_DIR)/scipy.ics
27-
calendars: $(CALENDAR_DIR)/matplotlib.ics
28-
calendars: $(CALENDAR_DIR)/skimage.ics
29-
calendars: $(CALENDAR_DIR)/networkx.ics
30-
calendars: $(CALENDAR_DIR)/sunpy.ics
31-
calendars: $(CALENDAR_DIR)/xarray.ics
32-
calendars: $(CALENDAR_DIR)/contributor-experience.ics
33-
calendars: $(CALENDAR_DIR)/sparse-array.ics
34-
25+
CALENDAR_SOURCES = $(wildcard calendars/*.yaml)
26+
calendars: $(subst calendars,$(CALENDAR_DIR),$(CALENDAR_SOURCES:.yaml=.ics))
3527

3628
TEAMS_DIR = static/teams
3729
TEAMS = community-managers spec-steering-committee community-leaders emeritus-spec-steering-committee emeritus-community-leaders

0 commit comments

Comments
 (0)