- Try to do better pretty printing when array elements are individually
[bpt/coccinelle.git] / ctl / Makefile
index c67d3ab..418dffd 100644 (file)
@@ -52,6 +52,8 @@ OPTLIB=$(LIB:.cma=.cmxa)
 OBJS = $(SRC:.ml=.cmo)
 OPTOBJS = $(SRC:.ml=.cmx)
 
+
+ifneq ($(FEATURE_OCAMLBUILD),yes)
 all: $(LIB)
 all.opt:
        @$(MAKE) $(OPTLIB) BUILD_OPT=yes
@@ -67,6 +69,21 @@ $(OPTLIB): $(OPTOBJS)
 
 clean::
        rm -f $(LIB)  $(OPTLIB) $(LIB:.cma=.a) $(TARGET).top
+else
+all:
+       cd .. && $(OCAMLBUILD) ctl/ctl.cma
+
+all.opt:
+       cd .. && $(OCAMLBUILD) ctl/ctl.cmxa
+
+clean::
+       cd .. && $(OCAMLBUILD) -clean
+       rm -f test_ctl
+
+test_ctl:
+       cd .. && $(OCAMLBUILD) ctl/test_ctl.byte
+       cp ../_build/ctl/test_ctl.byte test_ctl
+endif
 
 
 .SUFFIXES:
@@ -96,8 +113,10 @@ distclean: clean
 
 ifneq ($(MAKECMDGOALS),clean)
 ifneq ($(MAKECMDGOALS),distclean)
+ifneq ($(FEATURE_OCAMLBUILD),yes)
 -include .depend
 endif
 endif
+endif
 
 include ../Makefile.common