forked from matijapretnar/eff
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.am
63 lines (49 loc) · 1.63 KB
/
Makefile.am
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
ACLOCAL_AMFLAGS = -I build-aux
bin_PROGRAMS = eff
eff_SOURCES =
eff_DATA = pervasives.eff
EXTRA_DIST = pervasives.eff tests examples src etc LICENSE.txt INSTALL.txt README.txt
effdir=$(datarootdir)/eff
# The main program (without the .ml extension)
EFFTARGET=src/eff
# How to compile
EFFOCAMLBUILD=$(OCAMLBUILD) -use-menhir -lib unix -lib nums
.PHONY: test test-validate test-clean \
eff.byte eff.native eff.d.byte eff.p.native
eff: eff.$(BUILDBEST)
cd $(srcdir) && \
cp eff.$(BUILDBEST) eff
eff.byte: src/version.ml
cd $(srcdir) && \
$(EFFOCAMLBUILD) $(EFFTARGET).byte
eff.native: src/version.ml
cd $(srcdir) && \
$(EFFOCAMLBUILD) $(EFFTARGET).native
eff.d.byte: src/version.ml
cd $(srcdir) && $(EFFOCAMLBUILD) $(EFFTARGET).d.byte
eff.p.native: src/version.ml
cd $(srcdir) && $(EFFOCAMLBUILD) $(EFFTARGET).p.native
src/version.ml:
echo "let version=\"$(PACKAGE_VERSION)\";; let effdir=\"$(effdir)\";;" > src/version.ml
# Explain parser conflicts in the file parser.conflicts
conflicts:
cd $(srcdir); \
$(EFFOCAMLBUILD) -yaccflags "--explain" src/parser.mli; \
if [ -f $(srcdir)/_build/src/parser.conflicts ]; \
then \
mv -f $(srcdir)/_build/src/parser.conflicts .; \
fi
# "make test" to see if anything broke
test: eff.$(BUILDBEST)
cd $(srcdir)/tests && sh ./test.sh
# "make test-validate" to see if anything broke and ask for validation of possibly
# broken things.
test-validate:
cd $(srcdir)/tests && sh ./test.sh -v
# Clean up tests
test-clean:
cd $(srcdir) && rm -f tests/*.out tests/*/*.out
clean: test-clean
cd $(srcdir) && \
rm -f eff eff-$(PACKAGE_VERSION) src/version.ml && \
ocamlbuild -clean && rm -f parser.conflicts