Skip to content

Commit d9e4ce5

Browse files
Fix build (#368)
* update dependencies * output all files from src dir. This will require the use of function stubs in the .re files, like in the OCaml track * add function stubs to .re files * change script to copy all files from /src, then overwrite the exercise files with Example.re. This allows extra modules to be copied from the /src folder * update template files to reflect changes
1 parent 9ab0250 commit d9e4ce5

File tree

91 files changed

+109045
-74064
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+109045
-74064
lines changed

Makefile

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
EXERCISE ?= ""
44
IGNOREDIRS := "^(\.git|docs|bin|node_modules|.idea|.vscode)$$"
5-
EXERCISES = $(shell find ./exercises/practice -maxdepth 1 -mindepth 1 -type d | cut -d'/' -f3 | sort | grep -Ev $(IGNOREDIRS))
5+
EXERCISES = $(shell find ./exercises/practice -maxdepth 1 -mindepth 1 -type d | cut -d'/' -f4 | sort | grep -Ev $(IGNOREDIRS))
66

77
# output directories
88
OUTDIR ?= "tmp"
@@ -25,9 +25,11 @@ PKG_LOCK_FILES= $(shell find ./exercises/practice/*/* -maxdepth 1 -name package-
2525
# copy example, interface and test files for single exercise to OUTDIR
2626
# Rename Example.re to ExerciseName.re in the process
2727
copy-exercise:
28+
@cp exercises/practice/$(EXERCISE)/src/*.re $(OUTDIR)/src/ 2>/dev/null || true
29+
@cp exercises/practice/$(EXERCISE)/src/*.rei $(OUTDIR)/src/ 2>/dev/null || true
2830
@cp exercises/practice/$(EXERCISE)/.meta/src/$(EXAMPLE) $(OUTDIR)/src/$(SRCFILE).$(FILEEXT)
29-
@cp exercises/practice/$(EXERCISE)/src/$(SIGFILE) $(OUTDIR)/src/
30-
@cp exercises/practice/$(EXERCISE)/__tests__/$(TSTFILE) $(OUTDIR)/__tests__/
31+
@cp exercises/practice/$(EXERCISE)/__tests__/$(TSTFILE) $(OUTDIR)/__tests__/ 2>/dev/null || true
32+
3133

3234
# copy source files for all exercises to OUTDIR - easier to compile from there
3335
copy-all-exercises:
@@ -69,4 +71,4 @@ clean:
6971
@echo "Cleaning tmp directory..."
7072
@rm -rf $(OUTDIR)
7173

72-
.PHONY: clean
74+
.PHONY: clean

0 commit comments

Comments
 (0)