Une MAJ de sécurité est nécessaire sur notre version actuelle. Elle sera effectuée lundi 02/08 entre 12h30 et 13h. L'interruption de service devrait durer quelques minutes (probablement moins de 5 minutes).

Commit e23ddaa0 authored by bguillaum's avatar bguillaum
Browse files

chose best ocaml compilers

git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/semagramme/libcaml-grew/trunk@7080 7838e531-6607-4d57-9587-6c381814729c
parent 51c7e492
......@@ -8,8 +8,12 @@ all:
include config/Makefile
conf:
cd config && rm -rf ac_lib_checking.*
cd config && wget https://gforge.inria.fr/scm/viewvc.php/*checkout*/ac_lib_checking/ac_lib_checking.m4?root=semagramme --no-check-certificate || true
cd config && mv ac_lib_checking.m4?root=semagramme ac_lib_checking.m4 || true
cd config && aclocal
autoconf -o configure config/configure.in
cd config && autoconf -o ../configure configure.in
rm -rf config.status config.log autom4te.cache config/autom4te.cache config/ac_lib_checking.m4
purge_makefile:
@make -C src purge_makefile
......@@ -22,11 +26,11 @@ clean:
uninstall:
rm -rf $(OCAMLFIND_DIR)/for_mac_libgrew
ocamlfind remove libgrew > /dev/null
$(OCAMLFIND) remove libgrew > /dev/null
uninstall_dev:
rm -rf $(OCAMLFIND_DIR)/for_mac_libgrew
ocamlfind remove libgrew_dev > /dev/null
$(OCAMLFIND) remove libgrew_dev > /dev/null
LIB_DEP = libgrew.cma libgrew.cmxa libgrew.a libgrew.cmi
......@@ -40,7 +44,7 @@ ifneq ($(DESTDIR),)
endif
mkdir -p $(DESTDIR)$(DATA_DIR)/
cp data/style.css $(DESTDIR)$(DATA_DIR)/
cd src && ocamlfind install libgrew ../META $(LIB_DEP)
cd src && $(OCAMLFIND) install libgrew ../META $(LIB_DEP)
mv META_ META
install_dev: uninstall_dev
......@@ -48,7 +52,7 @@ install_dev: uninstall_dev
sed -itmp "s|@VERSION@|$(VERSION)|g" META
sed -itmp "s|@DEV@|_dev|g" META
rm -rf METAtmp
cd src && ocamlfind install libgrew_dev ../META $(LIB_DEP)
cd src && $(OCAMLFIND) install libgrew_dev ../META $(LIB_DEP)
mv META_ META
cp data/style.css $(DESTDIR)$(DATA_DIR)/
......
LOG_DIR = @LOG_INCLUDE@
LOG_BYTE = $(LOG_DIR) log.cma
LOG_OPT = $(LOG_DIR) log.cmxa
DEP2PICT=@DEP2PICT@
DEP2PICT_DIR = @DEP2PICT_INCLUDE@
DEP2PICT_BYTE = $(DEP2PICT_DIR) dep2pict.cma
DEP2PICT_OPT = $(DEP2PICT_DIR) dep2pict.cmxa
ANSITERMINAL_DIR = @ANSITERMINAL_INCLUDE@
ANSITERMINAL_BYTE = $(ANSITERMINAL_DIR) ANSITerminal.cma
ANSITERMINAL_OPT = $(ANSITERMINAL_DIR) ANSITerminal.cmxa
VERSION = 0.10.0
INSTALL_DIR_LIB = @OCAMLLIB@
INSTALL_DIR = @prefix@/bin/
DATA_DIR = @prefix@@datarootdir@/libgrew/
DOC_DIR = @prefix@@datarootdir@/libgrew-doc/
OCAMLC = @OCAMLC@
OCAMLOPT = @OCAMLOPT@
OCAMLLIB = @OCAMLLIB@
OCAMLFIND = @OCAMLFIND@
OCAMLLEX = @OCAMLLEX@
MENHIR = @MENHIR@
OCAMLFIND_DIR=`$(OCAMLFIND) printconf destdir`
BYTE_FLAGS = -g -dtypes
OPT_FLAGS = -g -dtypes
......@@ -26,9 +21,19 @@ WARNING = @WARNING@
MESSAGE = @MESSAGE@
INFO = @INFO@
OCAMLFIND_DIR=`ocamlfind printconf destdir`
LOG_DIR = @LOG_INCLUDE@
LOG_BYTE = $(LOG_DIR) log.cma
LOG_OPT = $(LOG_DIR) log.cmxa
DEP2PICT=@DEP2PICT@
DEP2PICT_DIR = @DEP2PICT_INCLUDE@
DEP2PICT_BYTE = $(DEP2PICT_DIR) dep2pict.cma
DEP2PICT_OPT = $(DEP2PICT_DIR) dep2pict.cmxa
ANSITERMINAL_DIR = @ANSITERMINAL_INCLUDE@
ANSITERMINAL_BYTE = $(ANSITERMINAL_DIR) ANSITerminal.cma
ANSITERMINAL_OPT = $(ANSITERMINAL_DIR) ANSITerminal.cmxa
VERSION = 0.10.0
cleanup:
rm -rf *.cmo *.cmx *.cmi *.annot *.o *.*~
......@@ -47,17 +52,20 @@ infos:
@echo "data install dir -> " $(DATA_DIR)
@echo "doc install dir -> " $(DOC_DIR)
@echo ""
@echo "OCAMLC -> " $(OCAMLC)
@echo "OCAMLOPT -> " $(OCAMLOPT)
@echo "OCAMLLIB -> " $(OCAMLLIB)
@echo "OCAMLFIND -> " $(OCAMLFIND)
@echo "byte compil flags -> " $(BYTE_FLAGS)
@echo "native compil flags -> " $(OPT_FLAGS)
@echo ""
@echo "log -> " $(LOG_OPT)
@echo "dep2pict -> " $(DEP2PICT_OPT)
@echo "ansiterminal -> " $(ANSITERMINAL_OPT)
@echo ""
@echo "byte compil flags -> " $(BYTE_FLAGS)
@echo "native compil flags -> " $(OPT_FLAGS)
@echo ""
@echo "DEBUG -> " $(DEBUG)
@echo "WARNING -> " $(WARNING)
@echo "MESSAGE -> " $(MESSAGE)
@echo "INFO -> " $(INFO)
@echo ""
@echo "use dep2pict -> " $(DEP2PICT)
AC_PREREQ([2.63])
AC_INIT(grew, 1.0, paul.masson@inria.fr)
echo ""
echo "Checking essential libraries, tools and programs."
echo ""
AC_INIT(libcaml-grew, 1.0, bruno.guillaume@inria.fr)
AC_ARG_ENABLE(
[config],
[AS_HELP_STRING(
[--enable-config],
[Enable configuration check (default is yes)])],
[AS_HELP_STRING([--enable-config],[Enable configuration check (default is yes)])],
[config=$enableval],
[config=yes])
AC_ARG_ENABLE(
[dep2pict],
[AS_HELP_STRING(
[--enable-dep2pict],
[Enable dep2pict (default is yes)])],
[AS_HELP_STRING([--enable-dep2pict],[Enable dep2pict (default is yes)])],
[dep2pict=$enableval],
[dep2pict=yes])
if test "$config" = yes ; then
# Look for ocamlfind
AC_PATH_PROG(OCAMLFIND,ocamlfind,no)
# Checks for programs.
AC_CHECK_PROGS(OCAMLC,ocamlc.opt ocamlc,no)
if test "$OCAMLC" = no ; then
AC_MSG_ERROR(Cannot find ocamlc)
fi
AC_SUBST(OCAMLC)
AC_CHECK_PROGS(OCAMLOPT,ocamlopt.opt ocamlopt,no)
if test "$OCAMLOPT" = no ; then
AC_MSG_ERROR(Cannot find ocamlopt)
fi
AC_SUBST(OCAMLOPT)
AC_CHECK_PROGS(OCAMLLEX,ocamllex.opt ocamllex,no)
if test "$OCAMLLEX" = no ; then
AC_MSG_ERROR(Cannot find ocamllex)
fi
AC_SUBST(OCAMLLEX)
# Checks for libraries.
AC_MSG_CHECKING(for ocaml library path)
OCAMLLIB=$(ocamlc -where)
OCAMLLIB=$($OCAMLC -where)
AC_MSG_RESULT($OCAMLLIB)
if test "$OCAMLLIB" = ""; then
AC_MSG_ERROR(Cannot find ocaml library path)
fi
AC_SUBST(OCAMLLIB)
# Look for ocamlfind
AC_PATH_PROG(OCAMLFIND,ocamlfind,no)
if test "$OCAMLFIND" = no ; then
AC_MSG_ERROR(Cannot find ocamlfind)
fi
AC_SUBST(OCAMLFIND)
AC_PATH_PROG(MENHIR,menhir,no)
if test "$MENHIR" = "no"; then
AC_MSG_ERROR(Cannot find menhir)
fi
AC_SUBST(MENHIR)
m4_include(ac_lib_checking.m4)
#Look for ANSITerminal
AC_MSG_CHECKING([for ANSITerminal])
if test -f c_check_ANSITerminal.ml ; then
if test -w c_check_ANSITerminal.ml ; then
rm c_check_ANSITerminal.* >& /dev/null
else
AC_MSG_ERROR(Cannot remove c_check_ANSITerminal.ml. Please change its right with chmod 666 c_check_ANSITerminal.ml)
fi
fi
echo "open ANSITerminal;;" > c_check_ANSITerminal.ml
if (ocaml ANSITerminal.cma c_check_ANSITerminal.ml >& /dev/null) ; then
AC_MSG_RESULT(standard)
else
if test "$OCAMLFIND" = no ; then
AC_MSG_ERROR(The ANSITerminal library is missing.)
else
if $OCAMLFIND query ANSITerminal > /dev/null 2>&1 ; then
ANSITERMINAL_INCLUDE="-I `$OCAMLFIND query ANSITerminal`"
AC_MSG_RESULT(ocamlfind)
else
AC_MSG_ERROR(The ANSITerminal library is missing.)
fi
fi
fi
rm c_check_ANSITerminal.ml >& /dev/null
AC_LIB_CHECKING(ANSITerminal,ANSITerminal,ANSITerminal,ANSITerminal,ANSITerminal,"",true)
AC_SUBST(ANSITERMINAL_INCLUDE,$LIB_INCLUDE)
#Look for Log
AC_MSG_CHECKING([for log])
if test -f c_check_log.ml ; then
if test -w c_check_log.ml ; then
rm c_check_log.* >& /dev/null
else
AC_MSG_ERROR(Cannot remove c_check_log.ml. Please change its right with chmod 666 c_check_log.ml)
fi
fi
echo "open Log;;" > c_check_log.ml
if (ocamlc -c log.cma c_check_log.ml >& /dev/null) ; then
AC_MSG_RESULT(standard)
else
if test "$OCAMLFIND" = no ; then
AC_MSG_ERROR(The log library is missing.)
else
if $OCAMLFIND query log > /dev/null 2>&1 ; then
LOG_INCLUDE="-I `$OCAMLFIND query log`"
AC_MSG_RESULT(ocamlfind)
else
AC_MSG_ERROR(The log library is missing.)
fi
fi
fi
rm c_check_log.* >& /dev/null
AC_LIB_CHECKING(Log,log,log,log,Log,"",true)
AC_SUBST(LOG_INCLUDE,$LIB_INCLUDE)
DEP2PICT="no"
if test "$dep2pict" = yes ; then
......@@ -177,10 +147,6 @@ fi
TRUNK=`pwd`
AC_SUBST(TRUNK)
AC_SUBST(OCAMLC)
AC_SUBST(OCAMLOPT)
AC_SUBST(OCAMLLIB)
AC_SUBST(ANSITERMINAL_INCLUDE)
AC_SUBST(LOG_INCLUDE)
AC_SUBST(DEP2PICT_INCLUDE)
......
This diff is collapsed.
......@@ -26,22 +26,22 @@ include ../config/Makefile
#executables
grew.byte: $(FILES_CMO) parser/parser_global.cmo parser_byte parser/grew_parser.cmo grew.ml
ocamlc.opt $(BYTE_FLAGS) -o grew.byte $(ANSITERMINAL_BYTE) $(LOG_BYTE) \
$(OCAMLC) $(BYTE_FLAGS) -o grew.byte $(ANSITERMINAL_BYTE) $(LOG_BYTE) \
$(FILES_CMO) -I parser $(PARSER_CMO) \
grew.ml
grew: $(FILES_CMX) parser/parser_global.cmx parser_opt parser/grew_parser.cmx grew.ml
ocamlopt.opt $(OPT_FLAGS) -o grew str.cmxa unix.cmxa $(ANSITERMINAL_OPT) $(LOG_OPT) \
$(OCAMLOPT) $(OPT_FLAGS) -o grew str.cmxa unix.cmxa $(ANSITERMINAL_OPT) $(LOG_OPT) \
$(FILES_CMX) -I parser $(PARSER_CMX) \
grew.ml
test.byte: parser/parser_global.cmo parser_byte parser/grew_parser.cmo $(FILES_CMO) $(FILES_CMI) test.ml
ocamlc.opt $(BYTE_FLAGS) -o test.byte $(ANSITERMINAL_BYTE) $(LOG_BYTE) \
$(OCAMLC) $(BYTE_FLAGS) -o test.byte $(ANSITERMINAL_BYTE) $(LOG_BYTE) \
$(FILES_CMO) -I parser $(PARSER_CMO) \
test.ml
test: parser/parser_global.cmx parser_opt parser/grew_parser.cmx $(FILES_CMX) $(FILES_CMI) test.ml
ocamlopt.opt $(OPT_FLAGS) -o test str.cmxa unix.cmxa $(ANSITERMINAL_OPT) $(LOG_OPT) \
$(OCAMLOPT) $(OPT_FLAGS) -o test str.cmxa unix.cmxa $(ANSITERMINAL_OPT) $(LOG_OPT) \
$(FILES_CMX) -I parser $(PARSER_CMX) \
test.ml
......@@ -70,20 +70,20 @@ libgrew.mli : grew_types.mli libgrew_.mli
libgrew.cma : $(FILES_CMO) parser_byte libgrew.mli libgrew.ml
ifeq (@DEP2PICT@,no)
ocamlc.opt -c -pp 'camlp4o pa_macro.cmo' $(BYPE_FLAGS) $(FILES_CMO) str.cma -I parser $(PARSER_CMO) libgrew.mli
ocamlc.opt -a -o libgrew.cma $(BYPE_FLAGS) -pp 'camlp4o pa_macro.cmo -DDATA_DIR=\"$(DATA_DIR)\"' -linkall $(FILES_CMO) -I parser $(PARSER_CMO) libgrew.ml
$(OCAMLC) -c -pp 'camlp4o pa_macro.cmo' $(BYPE_FLAGS) $(FILES_CMO) str.cma -I parser $(PARSER_CMO) libgrew.mli
$(OCAMLC) -a -o libgrew.cma $(BYPE_FLAGS) -pp 'camlp4o pa_macro.cmo -DDATA_DIR=\"$(DATA_DIR)\"' -linkall $(FILES_CMO) -I parser $(PARSER_CMO) libgrew.ml
else
ocamlc.opt -c -pp 'camlp4o pa_macro.cmo -DDEP2PICT' $(BYPE_FLAGS) $(FILES_CMO) str.cma -I parser $(PARSER_CMO) libgrew.mli
ocamlc.opt -a -o libgrew.cma $(BYPE_FLAGS) -pp 'camlp4o pa_macro.cmo -DDATA_DIR=\"$(DATA_DIR)\" -DDEP2PICT' -linkall $(FILES_CMO) -I parser $(PARSER_CMO) libgrew.ml
$(OCAMLC) -c -pp 'camlp4o pa_macro.cmo -DDEP2PICT' $(BYPE_FLAGS) $(FILES_CMO) str.cma -I parser $(PARSER_CMO) libgrew.mli
$(OCAMLC) -a -o libgrew.cma $(BYPE_FLAGS) -pp 'camlp4o pa_macro.cmo -DDATA_DIR=\"$(DATA_DIR)\" -DDEP2PICT' -linkall $(FILES_CMO) -I parser $(PARSER_CMO) libgrew.ml
endif
libgrew.cmxa : $(FILES_CMX) parser_opt libgrew.mli libgrew.ml
ifeq (@DEP2PICT@,no)
ocamlopt.opt -c -pp 'camlp4o pa_macro.cmo' $(OPT_FLAGS) $(FILES_CMX) str.cmxa -I parser $(PARSER_CMX) libgrew.mli
ocamlopt.opt -a -o libgrew.cmxa $(OPT_FLAGS) -pp 'camlp4o pa_macro.cmo -DDATA_DIR=\"$(DATA_DIR)\"' -linkall $(FILES_CMX) -I parser $(PARSER_CMX) libgrew.ml
$(OCAMLOPT) -c -pp 'camlp4o pa_macro.cmo' $(OPT_FLAGS) $(FILES_CMX) str.cmxa -I parser $(PARSER_CMX) libgrew.mli
$(OCAMLOPT) -a -o libgrew.cmxa $(OPT_FLAGS) -pp 'camlp4o pa_macro.cmo -DDATA_DIR=\"$(DATA_DIR)\"' -linkall $(FILES_CMX) -I parser $(PARSER_CMX) libgrew.ml
else
ocamlopt.opt -c -pp 'camlp4o pa_macro.cmo -DDEP2PICT' $(FILES_CMX) str.cmxa -I parser $(PARSER_CMX) libgrew.mli
ocamlopt.opt -a -o libgrew.cmxa -pp 'camlp4o pa_macro.cmo -DDATA_DIR=\"$(DATA_DIR)\" -DDEP2PICT' -linkall $(FILES_CMX) -I parser $(PARSER_CMX) libgrew.ml
$(OCAMLOPT) -c -pp 'camlp4o pa_macro.cmo -DDEP2PICT' $(FILES_CMX) str.cmxa -I parser $(PARSER_CMX) libgrew.mli
$(OCAMLOPT) -a -o libgrew.cmxa -pp 'camlp4o pa_macro.cmo -DDATA_DIR=\"$(DATA_DIR)\" -DDEP2PICT' -linkall $(FILES_CMX) -I parser $(PARSER_CMX) libgrew.ml
endif
DEPENDS_DIR= -I parser
......@@ -95,13 +95,13 @@ GREW_CORE_CMO = $(GREW_CORE_DEP:%=%.cmo)
GREW_CORE_CMX = $(GREW_CORE_DEP:%=%.cmx)
grew_core.cmi: $(GREW_CORE_CMI) grew_core.mli
ocamlc.opt -c grew_core.mli
$(OCAMLC) -c grew_core.mli
grew_core.cmo: $(GREW_CORE_CMO) parser_byte grew_core.cmi grew_core.ml
ocamlc.opt $(BYTE_FLAGS) -c $(DEPENDS_DIR) $(GREW_CORE_CMO) grew_core.ml
$(OCAMLC) $(BYTE_FLAGS) -c $(DEPENDS_DIR) $(GREW_CORE_CMO) grew_core.ml
grew_core.cmx: $(GREW_CORE_CMX) parser_opt grew_core.cmi grew_core.ml
ocamlopt.opt $(OPT_FLAGS) -c $(DEPENDS_DIR) $(GREW_CORE_CMX) grew_core.ml
$(OCAMLOPT) $(OPT_FLAGS) -c $(DEPENDS_DIR) $(GREW_CORE_CMX) grew_core.ml
################################################################################
###### grew_utils.ml ##############################################################
......@@ -111,13 +111,13 @@ GREW_UTILS_CMO = $(GREW_UTILS_DEP:%=%.cmo)
GREW_UTILS_CMX = $(GREW_UTILS_DEP:%=%.cmx)
grew_utils.cmi: $(GREW_UTILS_CMI) grew_utils.mli
ocamlc.opt -c grew_utils.mli
$(OCAMLC) -c grew_utils.mli
grew_utils.cmo: $(GREW_UTILS_CMO) grew_utils.cmi grew_utils.ml
ocamlc.opt $(BYTE_FLAGS) -c $(DEPENDS_DIR) grew_utils.ml
$(OCAMLC) $(BYTE_FLAGS) -c $(DEPENDS_DIR) grew_utils.ml
grew_utils.cmx: $(GREW_UTILS_CMX) grew_utils.cmi grew_utils.ml
ocamlopt.opt $(OPT_FLAGS) -c $(DEPENDS_DIR) grew_utils.ml
$(OCAMLOPT) $(OPT_FLAGS) -c $(DEPENDS_DIR) grew_utils.ml
################################################################################
......@@ -128,13 +128,13 @@ GREW_AST_CMO = $(GREW_AST_DEP:%=%.cmo)
GREW_AST_CMX = $(GREW_AST_DEP:%=%.cmx)
grew_ast.cmi: $(GREW_AST_CMI) grew_ast.mli
ocamlc.opt -c grew_ast.mli
$(OCAMLC) -c grew_ast.mli
grew_ast.cmo: $(GREW_AST_CMO) grew_ast.cmi grew_ast.ml
ocamlc.opt $(BYTE_FLAGS) -c $(DEPENDS_DIR) grew_ast.ml
$(OCAMLC) $(BYTE_FLAGS) -c $(DEPENDS_DIR) grew_ast.ml
grew_ast.cmx: $(GREW_AST_CMX) grew_ast.cmi grew_ast.ml
ocamlopt.opt $(OPT_FLAGS) -c $(DEPENDS_DIR) grew_ast.ml
$(OCAMLOPT) $(OPT_FLAGS) -c $(DEPENDS_DIR) grew_ast.ml
################################################################################
......@@ -145,13 +145,13 @@ GREW_HTML_CMO = $(GREW_HTML_DEP:%=%.cmo)
GREW_HTML_CMX = $(GREW_HTML_DEP:%=%.cmx)
grew_html.cmi: $(GREW_HTML_CMI) grew_html.mli
ocamlc.opt -c grew_html.mli
$(OCAMLC) -c grew_html.mli
grew_html.cmo: $(GREW_HTML_CMO) grew_html.cmi grew_html.ml
ocamlc.opt $(BYTE_FLAGS) -pp 'camlp4o pa_macro.cmo -DDATA_DIR=\"$(DATA_DIR)\"' -c $(DEPENDS_DIR) grew_html.ml
$(OCAMLC) $(BYTE_FLAGS) -pp 'camlp4o pa_macro.cmo -DDATA_DIR=\"$(DATA_DIR)\"' -c $(DEPENDS_DIR) grew_html.ml
grew_html.cmx: $(GREW_HTML_CMX) grew_html.cmi grew_html.ml
ocamlopt.opt $(OPT_FLAGS) -pp 'camlp4o pa_macro.cmo -DDATA_DIR=\"$(DATA_DIR)\"' -c $(DEPENDS_DIR) grew_html.ml
$(OCAMLOPT) $(OPT_FLAGS) -pp 'camlp4o pa_macro.cmo -DDATA_DIR=\"$(DATA_DIR)\"' -c $(DEPENDS_DIR) grew_html.ml
################################################################################
###### grew_fs.ml ##############################################################
......@@ -161,13 +161,13 @@ GREW_FS_CMO = $(GREW_FS_DEP:%=%.cmo)
GREW_FS_CMX = $(GREW_FS_DEP:%=%.cmx)
grew_fs.cmi: $(GREW_FS_CMI) grew_fs.mli
ocamlc.opt -c grew_fs.mli
$(OCAMLC) -c grew_fs.mli
grew_fs.cmo: $(GREW_FS_CMO) grew_fs.cmi grew_fs.ml
ocamlc.opt $(BYTE_FLAGS) -c $(DEPENDS_DIR) grew_fs.ml
$(OCAMLC) $(BYTE_FLAGS) -c $(DEPENDS_DIR) grew_fs.ml
grew_fs.cmx: $(GREW_FS_CMX) grew_fs.cmi grew_fs.ml
ocamlopt.opt $(OPT_FLAGS) -c $(DEPENDS_DIR) grew_fs.ml
$(OCAMLOPT) $(OPT_FLAGS) -c $(DEPENDS_DIR) grew_fs.ml
################################################################################
......@@ -178,13 +178,13 @@ GREW_EDGE_CMO = $(GREW_EDGE_DEP:%=%.cmo)
GREW_EDGE_CMX = $(GREW_EDGE_DEP:%=%.cmx)
grew_edge.cmi: $(GREW_EDGE_CMI) grew_edge.mli
ocamlc.opt -c grew_edge.mli
$(OCAMLC) -c grew_edge.mli
grew_edge.cmo: $(GREW_EDGE_CMO) grew_edge.cmi grew_edge.ml
ocamlc.opt $(BYTE_FLAGS) -c $(DEPENDS_DIR) grew_edge.ml
$(OCAMLC) $(BYTE_FLAGS) -c $(DEPENDS_DIR) grew_edge.ml
grew_edge.cmx: $(GREW_EDGE_CMX) grew_edge.cmi grew_edge.ml
ocamlopt.opt $(OPT_FLAGS) -c $(DEPENDS_DIR) grew_edge.ml
$(OCAMLOPT) $(OPT_FLAGS) -c $(DEPENDS_DIR) grew_edge.ml
################################################################################
......@@ -195,13 +195,13 @@ GREW_NODE_CMO = $(GREW_NODE_DEP:%=%.cmo)
GREW_NODE_CMX = $(GREW_NODE_DEP:%=%.cmx)
grew_node.cmi: $(GREW_NODE_CMI) grew_node.mli
ocamlc.opt -c grew_node.mli
$(OCAMLC) -c grew_node.mli
grew_node.cmo: $(GREW_NODE_CMO) grew_node.cmi grew_node.ml
ocamlc.opt $(BYTE_FLAGS) -c $(DEPENDS_DIR) grew_node.ml
$(OCAMLC) $(BYTE_FLAGS) -c $(DEPENDS_DIR) grew_node.ml
grew_node.cmx: $(GREW_NODE_CMX) grew_node.cmi grew_node.ml
ocamlopt.opt $(OPT_FLAGS) -c $(DEPENDS_DIR) grew_node.ml
$(OCAMLOPT) $(OPT_FLAGS) -c $(DEPENDS_DIR) grew_node.ml
################################################################################
......@@ -212,13 +212,13 @@ GREW_GRAPH_CMO = $(GREW_GRAPH_DEP:%=%.cmo)
GREW_GRAPH_CMX = $(GREW_GRAPH_DEP:%=%.cmx)
grew_graph.cmi: $(GREW_GRAPH_CMI) grew_graph.mli
ocamlc.opt -c grew_graph.mli
$(OCAMLC) -c grew_graph.mli
grew_graph.cmo: $(GREW_GRAPH_CMO) grew_graph.cmi grew_graph.ml
ocamlc.opt $(BYTE_FLAGS) -c $(DEPENDS_DIR) grew_graph.ml
$(OCAMLC) $(BYTE_FLAGS) -c $(DEPENDS_DIR) grew_graph.ml
grew_graph.cmx: $(GREW_GRAPH_CMX) grew_graph.cmi grew_graph.ml
ocamlopt.opt $(OPT_FLAGS) -c $(DEPENDS_DIR) grew_graph.ml
$(OCAMLOPT) $(OPT_FLAGS) -c $(DEPENDS_DIR) grew_graph.ml
################################################################################
......@@ -229,13 +229,13 @@ GREW_TYPES_CMO = $(GREW_TYPES_DEP:%=%.cmo)
GREW_TYPES_CMX = $(GREW_TYPES_DEP:%=%.cmx)
grew_types.cmi: $(GREW_TYPES_CMI) grew_types.mli
ocamlc.opt -c grew_types.mli
$(OCAMLC) -c grew_types.mli
grew_types.cmo: $(GREW_TYPES_CMO) grew_types.cmi grew_types.ml
ocamlc.opt $(BYTE_FLAGS) -c $(DEPENDS_DIR) grew_types.ml
$(OCAMLC) $(BYTE_FLAGS) -c $(DEPENDS_DIR) grew_types.ml
grew_types.cmx: $(GREW_TYPES_CMX) grew_types.cmi grew_types.ml
ocamlopt.opt $(OPT_FLAGS) -c $(DEPENDS_DIR) grew_types.ml
$(OCAMLOPT) $(OPT_FLAGS) -c $(DEPENDS_DIR) grew_types.ml
################################################################################
......@@ -246,13 +246,13 @@ GREW_COMMAND_CMO = $(GREW_COMMAND_DEP:%=%.cmo)
GREW_COMMAND_CMX = $(GREW_COMMAND_DEP:%=%.cmx)
grew_command.cmi: $(GREW_COMMAND_CMI) grew_command.mli
ocamlc.opt -c grew_command.mli
$(OCAMLC) -c grew_command.mli
grew_command.cmo: $(GREW_COMMAND_CMO) grew_command.cmi grew_command.ml
ocamlc.opt $(BYTE_FLAGS) -c $(DEPENDS_DIR) grew_command.ml
$(OCAMLC) $(BYTE_FLAGS) -c $(DEPENDS_DIR) grew_command.ml
grew_command.cmx: $(GREW_COMMAND_CMX) grew_command.cmi grew_command.ml
ocamlopt.opt $(OPT_FLAGS) -c $(DEPENDS_DIR) grew_command.ml
$(OCAMLOPT) $(OPT_FLAGS) -c $(DEPENDS_DIR) grew_command.ml
################################################################################
......@@ -264,23 +264,23 @@ GREW_RULE_CMX = $(GREW_RULE_DEP:%=%.cmx)
grew_rule.cmi: $(GREW_RULE_CMI) grew_rule.mli
ifeq (@DEP2PICT@,no)
ocamlc.opt -c -pp 'camlp4o pa_macro.cmo' grew_rule.mli
$(OCAMLC) -c -pp 'camlp4o pa_macro.cmo' grew_rule.mli
else
ocamlc.opt -c -pp 'camlp4o pa_macro.cmo -DDEP2PICT' grew_rule.mli
$(OCAMLC) -c -pp 'camlp4o pa_macro.cmo -DDEP2PICT' grew_rule.mli
endif
grew_rule.cmo: $(GREW_RULE_CMO) grew_rule.cmi grew_rule.ml
ifeq (@DEP2PICT@,no)
ocamlc.opt -pp 'camlp4o pa_macro.cmo' $(BYTE_FLAGS) -c $(DEPENDS_DIR) grew_rule.ml
$(OCAMLC) -pp 'camlp4o pa_macro.cmo' $(BYTE_FLAGS) -c $(DEPENDS_DIR) grew_rule.ml
else
ocamlc.opt -pp 'camlp4o pa_macro.cmo -DDEP2PICT' $(BYTE_FLAGS) -c $(DEPENDS_DIR) $(DEP2PICT_BYTE) grew_rule.ml
$(OCAMLC) -pp 'camlp4o pa_macro.cmo -DDEP2PICT' $(BYTE_FLAGS) -c $(DEPENDS_DIR) $(DEP2PICT_BYTE) grew_rule.ml
endif
grew_rule.cmx: $(GREW_RULE_CMX) grew_rule.cmi grew_rule.ml
ifeq (@DEP2PICT@,no)
ocamlopt.opt -pp 'camlp4o pa_macro.cmo' $(OPT_FLAGS) -c $(DEPENDS_DIR) grew_rule.ml
$(OCAMLOPT) -pp 'camlp4o pa_macro.cmo' $(OPT_FLAGS) -c $(DEPENDS_DIR) grew_rule.ml
else
ocamlopt.opt -pp 'camlp4o pa_macro.cmo -DDEP2PICT' $(OPT_FLAGS) -c $(DEPENDS_DIR) $(DEP2PICT_OPT) grew_rule.ml
$(OCAMLOPT) -pp 'camlp4o pa_macro.cmo -DDEP2PICT' $(OPT_FLAGS) -c $(DEPENDS_DIR) $(DEP2PICT_OPT) grew_rule.ml
endif
################################################################################
......@@ -293,23 +293,23 @@ GREW_GRS_CMX = $(GREW_GRS_DEP:%=%.cmx)
grew_grs.cmi: $(GREW_GRS_CMI) grew_grs.mli
ifeq (@DEP2PICT@,no)
ocamlc.opt -c -pp 'camlp4o pa_macro.cmo' grew_grs.mli
$(OCAMLC) -c -pp 'camlp4o pa_macro.cmo' grew_grs.mli
else
ocamlc.opt -c -pp 'camlp4o pa_macro.cmo -DDEP2PICT' grew_grs.mli
$(OCAMLC) -c -pp 'camlp4o pa_macro.cmo -DDEP2PICT' grew_grs.mli
endif
grew_grs.cmo: $(GREW_GRS_CMO) grew_grs.cmi grew_grs.ml
ifeq (@DEP2PICT@,no)
ocamlc.opt $(BYTE_FLAGS) -pp 'camlp4o pa_macro.cmo -DDATA_DIR=\"$(DATA_DIR)\"' -c $(DEPENDS_DIR) grew_grs.ml
$(OCAMLC) $(BYTE_FLAGS) -pp 'camlp4o pa_macro.cmo -DDATA_DIR=\"$(DATA_DIR)\"' -c $(DEPENDS_DIR) grew_grs.ml
else
ocamlc.opt $(BYTE_FLAGS) -pp 'camlp4o pa_macro.cmo -DDATA_DIR=\"$(DATA_DIR)\" -DDEP2PICT' -c $(DEPENDS_DIR) grew_grs.ml
$(OCAMLC) $(BYTE_FLAGS) -pp 'camlp4o pa_macro.cmo -DDATA_DIR=\"$(DATA_DIR)\" -DDEP2PICT' -c $(DEPENDS_DIR) grew_grs.ml
endif
grew_grs.cmx: $(GREW_GRS_CMX) grew_grs.cmi grew_grs.ml
ifeq (@DEP2PICT@,no)
ocamlopt.opt $(OPT_FLAGS) -pp 'camlp4o pa_macro.cmo -DDATA_DIR=\"$(DATA_DIR)\"' -c $(DEPENDS_DIR) grew_grs.ml
$(OCAMLOPT) $(OPT_FLAGS) -pp 'camlp4o pa_macro.cmo -DDATA_DIR=\"$(DATA_DIR)\"' -c $(DEPENDS_DIR) grew_grs.ml
else
ocamlopt.opt $(OPT_FLAGS) -pp 'camlp4o pa_macro.cmo -DDATA_DIR=\"$(DATA_DIR)\" -DDEP2PICT' -c $(DEPENDS_DIR) grew_grs.ml
$(OCAMLOPT) $(OPT_FLAGS) -pp 'camlp4o pa_macro.cmo -DDATA_DIR=\"$(DATA_DIR)\" -DDEP2PICT' -c $(DEPENDS_DIR) grew_grs.ml
endif
################################################################################
......
......@@ -5,36 +5,36 @@ byte: parser_global.cmo gr_grs_parser.cmo lexer.cmo grew_parser.cmo
include ../../config/Makefile
parser_global.cmo: parser_global.ml
ocamlc.opt -c $(BYTE_FLAGS) parser_global.ml
$(OCAMLC) -c $(BYTE_FLAGS) parser_global.ml
parser_global.cmx: parser_global.ml
ocamlopt.opt -c $(OPT_FLAGS) parser_global.ml
$(OCAMLOPT) -c $(OPT_FLAGS) parser_global.ml
gr_grs_parser.ml: gr_grs_parser.mly
menhir --infer --ocamlc "ocamlc -c -I .. grew_utils.cmo grew_ast.cmo parser_global.cmo" gr_grs_parser.mly
gr_grs_parser.cmx: gr_grs_parser.ml ../grew_utils.cmx ../grew_ast.cmx parser_global.cmo
ocamlopt.opt -c $(OPT_FLAGS) -I .. grew_utils.cmx grew_ast.cmx gr_grs_parser.mli
ocamlopt.opt -c $(OPT_FLAGS) -I .. grew_utils.cmx grew_ast.cmx gr_grs_parser.ml
$(OCAMLOPT) -c $(OPT_FLAGS) -I .. grew_utils.cmx grew_ast.cmx gr_grs_parser.mli
$(OCAMLOPT) -c $(OPT_FLAGS) -I .. grew_utils.cmx grew_ast.cmx gr_grs_parser.ml
gr_grs_parser.cmo: gr_grs_parser.ml ../grew_utils.cmo ../grew_ast.cmx parser_global.cmo
ocamlc.opt -c $(BYTE_FLAGS) -I .. grew_utils.cmo grew_ast.cmo gr_grs_parser.mli
ocamlc.opt -c $(BYTE_FLAGS) -I .. grew_utils.cmo grew_ast.cmo gr_grs_parser.ml
$(OCAMLC) -c $(BYTE_FLAGS) -I .. grew_utils.cmo grew_ast.cmo gr_grs_parser.mli
$(OCAMLC) -c $(BYTE_FLAGS) -I .. grew_utils.cmo grew_ast.cmo gr_grs_parser.ml
lexer.ml: lexer.mll
ocamllex lexer.mll
lexer.cmx: gr_grs_parser.cmx lexer.ml ../grew_ast.cmx
ocamlopt.opt -c $(OPT_FLAGS) -I .. grew_ast.cmx lexer.ml
$(OCAMLOPT) -c $(OPT_FLAGS) -I .. grew_ast.cmx lexer.ml
lexer.cmo: gr_grs_parser.cmo lexer.ml ../grew_ast.cmo
ocamlc.opt -c $(BYTE_FLAGS) -I .. grew_ast.cmo lexer.ml
$(OCAMLC) -c $(BYTE_FLAGS) -I .. grew_ast.cmo lexer.ml
grew_parser.cmx: gr_grs_parser.cmx lexer.cmx grew_parser.ml ../grew_ast.cmx
ocamlopt.opt -c $(OPT_FLAGS) -I .. grew_ast.cmx grew_parser.ml
$(OCAMLOPT) -c $(OPT_FLAGS) -I .. grew_ast.cmx grew_parser.ml
grew_parser.cmo: gr_grs_parser.cmo lexer.cmo grew_parser.ml ../grew_ast.cmo
ocamlc.opt -c $(BYTE_FLAGS) -I .. grew_ast.cmo grew_parser.ml
$(OCAMLC) -c $(BYTE_FLAGS) -I .. grew_ast.cmo grew_parser.ml
clean:
rm -rf *.cmi *.cmx *.cmo lexer.ml gr_grs_parser.ml *.o *.mli *.annot
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment