Skip to content

Commit e135098

Browse files
committed
Add examples and tests stubs
1 parent 4d5c41f commit e135098

File tree

4 files changed

+71
-0
lines changed

4 files changed

+71
-0
lines changed

Makefile

+12
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,20 @@ all:
44
$(MAKE) -C lib
55

66
test:
7+
./env_trampoline test_trampoline
8+
9+
test_trampoline: all
710
$(MAKE) -C lib test
11+
$(MAKE) -C tests test
12+
13+
examples:
14+
./env_trampoline examples_trampoline
15+
16+
examples_trampoline: all
17+
$(MAKE) -C examples
818

919
clean:
1020
$(MAKE) -C lib clean
21+
$(MAKE) -C tests clean
22+
$(MAKE) -C examples clean
1123

env_trampoline

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/env sh
2+
3+
export OCAMLPATH=$PWD/lib:$OCAMLPATH
4+
5+
make $1

examples/Makefile

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
CAMLP4=
2+
OCAMLC_OPTS=
3+
OCAMLOPT_OPTS=$(OCAMLC_OPTS)
4+
5+
NON_LIB_MODULES=
6+
7+
native_bin=$(NON_LIB_MODULES:%.ml=%.native)
8+
9+
byte_bin=$(NON_LIB_MODULES:%.ml=%.byte)
10+
11+
.PHONY: all native-code byte-code test clean
12+
13+
all: native-code byte-code
14+
15+
native-code: $(native_bin)
16+
17+
byte-code: $(byte_bin)
18+
19+
test: all
20+
21+
clean: extra_clean
22+
23+
extra_clean:
24+
-rm -f *.native *.byte *.cmx *.cmo *.o *.cmi
25+
26+
# Dependencies
27+
include ../lib/Ocamlrules.mk.in

tests/Makefile

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
CAMLP4=
2+
OCAMLC_OPTS=
3+
OCAMLOPT_OPTS=$(OCAMLC_OPTS)
4+
5+
NON_LIB_MODULES=
6+
7+
native_bin=$(NON_LIB_MODULES:%.ml=%.native)
8+
9+
byte_bin=$(NON_LIB_MODULES:%.ml=%.byte)
10+
11+
.PHONY: all native-code byte-code test clean
12+
13+
all: native-code byte-code
14+
15+
native-code: $(native_bin)
16+
17+
byte-code: $(byte_bin)
18+
19+
test: all
20+
21+
clean: extra_clean
22+
23+
extra_clean:
24+
-rm -f *.native *.byte *.cmx *.cmo *.o *.cmi
25+
26+
# Dependencies
27+
include ../lib/Ocamlrules.mk.in

0 commit comments

Comments
 (0)