-
Notifications
You must be signed in to change notification settings - Fork 57
/
Makefile
39 lines (34 loc) · 873 Bytes
/
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
#
# TypeScript/JSON backend
#
DUNE ?= dune
.PHONY: build
build:
rm -f bin/atdts
$(MAKE) clean-for-dune
$(DUNE) build @all
mkdir -p bin
ln -s ../../_build/install/default/bin/atdts bin/atdts
# The symlink facilitates the development of test code that depends on the
# generated code.
.PHONY: test
test:
$(MAKE) clean-for-dune
# Run atdts to convert ATD -> TypeScript
$(DUNE) runtest -f; status=$$?; \
if [ "$$status" != 0 ]; then \
echo "Run 'dune promote' to accept diffs, if any."; \
fi; \
ln -s ../../../_build/default/atdts/test/ts-tests/everything.ts \
test/ts-tests/everything.ts && \
exit "$$status"
# Compile and run the TypeScript code
$(MAKE) -C test/ts-tests
.PHONY: clean-for-dune
clean-for-dune:
rm -f test/ts-tests/everything.ts
.PHONY: clean
clean:
$(MAKE) clean-for-dune
$(DUNE) clean
rm -rf bin