include ../Makefile.config
endif
-include Makefile.doc
-
TARGET=cocciocaml
-SRC=coccilib.ml ocamlcocci_aux.ml $(OCAMLCOCCI_FILE) prepare_ocamlcocci.ml run_ocamlcocci.ml
+SRC=exposed_modules.ml coccilib.ml ocamlcocci_aux.ml $(OCAMLCOCCI_FILE) prepare_ocamlcocci.ml run_ocamlcocci.ml
#LIBS=../commons/commons.cma ../parsing_c/parsing_c.cma
#INCLUDES= -I ../commons -I ../parsing_c
##############################################################################
# Top rules
##############################################################################
+ifneq ($(FEATURE_OCAMLBUILD),yes)
all: $(TARGET).cma
all.opt:
@$(MAKE) $(TARGET).cmxa BUILD_OPT=yes
clean::
rm -f $(TARGET).top
+else
+all:
+ cd .. && $(OCAMLBUILD) ocaml/ocaml.cma
+all.opt:
+ cd .. && $(OCAMLBUILD) ocaml/ocaml.cmxa
+
+clean::
+ cd .. && $(OCAMLBUILD) -clean
+endif
+
+include Makefile.doc
##############################################################################
rm -f .depend
distclean: clean
+ rm -f coccilib/coccilib.cmi
.depend depend:
$(OCAMLDEP_CMD) *.mli *.ml > .depend
ifneq ($(MAKECMDGOALS),clean)
ifneq ($(MAKECMDGOALS),distclean)
ifneq ($(MAKECMDGOALS),cleandoc)
+ifneq ($(FEATURE_OCAMLBUILD),yes)
-include .depend
endif
endif
endif
+endif
include ../Makefile.common