Skip to content

Commit 1426db6

Browse files
committed
Add workshop recipes
1 parent 48670d6 commit 1426db6

File tree

4 files changed

+64
-0
lines changed

4 files changed

+64
-0
lines changed

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ REPORTS_DIR ?= $(ROOT_DIR)/reports
4848
COVERAGE_DIR ?= $(REPORTS_DIR)/coverage
4949
COMPLEXITY_DIR ?= $(REPORTS_DIR)/complexity
5050

51+
# Define the directory for workshops:
52+
WORKSHOPS_DIR ?= $(ROOT_DIR)/workshops
53+
5154
# Define the directory for documentation:
5255
DOCS_DIR ?= $(ROOT_DIR)/docs
5356

tools/make/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ include $(TOOLS_MAKE_LIB_DIR)/benchmark/Makefile
4242
include $(TOOLS_MAKE_LIB_DIR)/examples/Makefile
4343
include $(TOOLS_MAKE_LIB_DIR)/complexity/Makefile
4444
include $(TOOLS_MAKE_LIB_DIR)/docs/Makefile
45+
include $(TOOLS_MAKE_LIB_DIR)/workshops/Makefile
4546
include $(TOOLS_MAKE_LIB_DIR)/markdown-equations/Makefile
4647
include $(TOOLS_MAKE_LIB_DIR)/debug/Makefile
4748

tools/make/lib/workshops/Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
2+
# DEPENDENCIES #
3+
4+
include $(TOOLS_MAKE_LIB_DIR)/workshops/numeric_computing.mk
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
2+
# VARIABLES #
3+
4+
# Determine the host kernel:
5+
KERNEL ?= $(shell uname -s)
6+
7+
# Based on the kernel, determine the `open` command:
8+
ifeq ($(KERNEL), Darwin)
9+
OPEN ?= open
10+
else
11+
OPEN ?= xdg-open
12+
endif
13+
# TODO: add Windows command
14+
15+
# Define the path to the [xslide][1] executable.
16+
#
17+
# To install xslide:
18+
# $ npm install xslide
19+
#
20+
# [1]: https://github.com/substack/xslide
21+
22+
XSLIDE ?= $(BIN_DIR)/xslide
23+
24+
# Define the port for viewing slides:
25+
XSLIDE_PORT ?= 8001
26+
27+
# Define the command-line options to be used when invoking the `xslide` executable:
28+
XSLIDE_FLAGS ?= -p $(XSLIDE_PORT)
29+
30+
# Define the slide directory:
31+
NUMERIC_COMPUTING_SLIDES_DIR ?= $(WORKSHOPS_DIR)/numeric-computing/slides
32+
33+
# Define the slides file to open:
34+
NUMERIC_COMPUTING_SLIDES ?= $(NUMERIC_COMPUTING_SLIDES_DIR)/00.md
35+
36+
37+
# TARGETS #
38+
39+
# Launch a slide server.
40+
#
41+
# This target launches a server for viewing workshop slides.
42+
43+
workshops-numeric-computing-slides: $(NODE_MODULES)
44+
$(XSLIDE) $(NUMERIC_COMPUTING_SLIDES) $(XSLIDE_FLAGS)
45+
46+
.PHONY: workshops-numeric-computing-slides
47+
48+
49+
# View slides.
50+
#
51+
# This target opens workshop slides in a local web browser.
52+
53+
view-workshops-numeric-computing-slides:
54+
$(OPEN) http://localhost:$(XSLIDE_PORT)
55+
56+
.PHONY: view-workshops-numeric-computing-slides

0 commit comments

Comments
 (0)