22
22
# ----------------------------------------------------------------------------
24
# A few settings differ on Windows versus Unix.
28
# ----------------------------------------------------------------------------
23
29
# Installation paths.
25
31
# TEMPORARY GODIVA and Linux do not agree on the standard paths...
43
49
ifeq ($(TARGET),byte)
44
50
MENHIRLIB := menhirLib.cmi menhirLib.cmo
46
MENHIRLIB := menhirLib.cmi menhirLib.cmo menhirLib.cmx menhirLib.o
52
MENHIRLIB := menhirLib.cmi menhirLib.cmo menhirLib.cmx menhirLib.$(OBJ)
49
55
# ----------------------------------------------------------------------------
58
# Installation time settings are recorded within src/installation.ml.
59
# This file is recreated every time so as to avoid becoming stale.
52
61
.PHONY: all install uninstall
56
src/menhir: src/installation.ml
57
$(MAKE) -C src -f Makefile
58
$(MAKE) -C src -f Makefile $(MENHIRLIB)
60
# Record some installation time settings within the menhir binary.
63
echo "let libdir = \"${libdir}\"" > $@
64
rm -f src/installation.ml
65
echo "let libdir = \"${libdir}\"" > src/installation.ml
64
66
if $(USE_OCAMLFIND) ; then \
65
echo "let ocamlfind = true" >> $@ ; \
67
echo "let ocamlfind = true" >> src/installation.ml ; \
67
echo "let ocamlfind = false" >> $@ ; \
69
echo "let ocamlfind = false" >> src/installation.ml ; \
71
$(MAKE) $(MFLAGS) -C src -f Makefile
72
$(MAKE) $(MFLAGS) -C src -f Makefile $(MENHIRLIB)
70
74
# ----------------------------------------------------------------------------
78
install src/menhir $(bindir)
82
install src/$(MENHIREXE) $(bindir)
79
83
install -m 644 $(MLYLIB) $(libdir)
80
84
cp -r $(DOCS) $(docdir)
81
85
cp -r $(MANS) $(mandir)