File tree Expand file tree Collapse file tree 4 files changed +64
-0
lines changed
Expand file tree Collapse file tree 4 files changed +64
-0
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,9 @@ REPORTS_DIR ?= $(ROOT_DIR)/reports
4848COVERAGE_DIR ?= $(REPORTS_DIR ) /coverage
4949COMPLEXITY_DIR ?= $(REPORTS_DIR ) /complexity
5050
51+ # Define the directory for workshops:
52+ WORKSHOPS_DIR ?= $(ROOT_DIR ) /workshops
53+
5154# Define the directory for documentation:
5255DOCS_DIR ?= $(ROOT_DIR ) /docs
5356
Original file line number Diff line number Diff line change @@ -42,6 +42,7 @@ include $(TOOLS_MAKE_LIB_DIR)/benchmark/Makefile
4242include $(TOOLS_MAKE_LIB_DIR ) /examples/Makefile
4343include $(TOOLS_MAKE_LIB_DIR ) /complexity/Makefile
4444include $(TOOLS_MAKE_LIB_DIR ) /docs/Makefile
45+ include $(TOOLS_MAKE_LIB_DIR ) /workshops/Makefile
4546include $(TOOLS_MAKE_LIB_DIR ) /markdown-equations/Makefile
4647include $(TOOLS_MAKE_LIB_DIR ) /debug/Makefile
4748
Original file line number Diff line number Diff line change 1+
2+ # DEPENDENCIES #
3+
4+ include $(TOOLS_MAKE_LIB_DIR ) /workshops/numeric_computing.mk
Original file line number Diff line number Diff line change 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
You can’t perform that action at this time.
0 commit comments