Release coccinelle-0.1.2
[bpt/coccinelle.git] / Makefile
index a6c7122..36cac02 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -57,8 +57,8 @@ LIBS=commons/commons.cma globals/globals.cma\
 
 MAKESUBDIRS=commons globals menhirlib $(PYDIR) ctl parsing_cocci parsing_c \
  engine popl09 extra python
-INCLUDEDIRS=commons globals menhirlib $(PYDIR) ctl parsing_cocci parsing_c \
- engine popl09 extra python
+INCLUDEDIRS=commons commons/ocamlextra globals menhirlib $(PYDIR) ctl \
parsing_cocci parsing_c engine popl09 extra python
 
 ##############################################################################
 # Generic variables
@@ -107,10 +107,10 @@ BYTECODE_STATIC=-custom
 ##############################################################################
 # Top rules
 ##############################################################################
-
 all: rec $(EXEC)
 opt: rec.opt $(EXEC).opt
 all.opt: opt
+top: $(EXEC).top
 
 rec:
        set -e; for i in $(MAKESUBDIRS); \
@@ -120,6 +120,9 @@ rec.opt:
 clean::
        set -e; for i in $(MAKESUBDIRS); do $(MAKE) -C $$i clean; done 
 
+eclipse: depend all
+configure:
+       ./configure
 
 $(EXEC): $(LIBS) $(OBJS)
        $(OCAMLC) $(BYTECODE_STATIC) -o $@ $(SYSLIBS)  $^
@@ -138,7 +141,7 @@ clean::
        rm -f dllpycaml_stubs.so
 
 
-.PHONY: tools
+.PHONY: tools all configure
 
 tools:
        $(MAKE) -C tools
@@ -211,6 +214,7 @@ OCAMLVERSION=$(shell ocaml -version |perl -p -e 's/.*version (.*)/$$1/;')
 #  cvs update -d -P
 #  touch **/*
 #  make licensify
+#  remember to comment the -g -dtypes in this Makefile
 
 # Procedure to do each time:
 #  cvs update
@@ -250,14 +254,14 @@ srctar:
 bintar: all
        rm -f $(TMP)/$(PACKAGE)
        ln -s `pwd` $(TMP)/$(PACKAGE)
-       cd $(TMP); tar cvfz $(PACKAGE)-bin-x86.tgz $(BINSRC2)
+       cd $(TMP); tar cvfz $(PACKAGE)-bin-x86.tgz --exclude=CVS $(BINSRC2)
        rm -f $(TMP)/$(PACKAGE)
 
 staticbintar: all.opt
        rm -f $(TMP)/$(PACKAGE)
        ln -s `pwd` $(TMP)/$(PACKAGE)
        make static
-       cd $(TMP); tar cvfz $(PACKAGE)-bin-x86-static.tgz $(BINSRC2)
+       cd $(TMP); tar cvfz $(PACKAGE)-bin-x86-static.tgz --exclude=CVS $(BINSRC2)
        rm -f $(TMP)/$(PACKAGE)
 
 # add ocaml version in name ?
@@ -265,7 +269,7 @@ bytecodetar: all
        rm -f $(TMP)/$(PACKAGE)
        ln -s `pwd` $(TMP)/$(PACKAGE)
        make purebytecode
-       cd $(TMP); tar cvfz $(PACKAGE)-bin-bytecode-$(OCAMLVERSION).tgz $(BINSRC2)
+       cd $(TMP); tar cvfz $(PACKAGE)-bin-bytecode-$(OCAMLVERSION).tgz --exclude=CVS $(BINSRC2)
        rm -f $(TMP)/$(PACKAGE)
 
 clean::
@@ -316,6 +320,17 @@ syncwiki:
 darcsweb:
 #      @echo pull from ~/public_html/darcs/c-coccinelle and c-commons and lib-xxx
 
+DARCSFORESTS=commons \
+ parsing_c parsing_cocci engine
+
+update_darcs:
+       darcs pull
+       set -e; for i in $(DARCSFORESTS); do cd $$i; darcs pull; cd ..; done 
+
+#darcs diff -u
+diff_darcs:
+       set -e; for i in $(DARCSFORESTS); do cd $$i; darcs diff -u; cd ..; done 
+
 
 ##############################################################################
 # Developer rules
@@ -343,8 +358,9 @@ tags:
 
 dependencygraph:
        find  -name "*.ml" |grep -v "scripts" | xargs ocamldep -I commons -I globals -I ctl -I parsing_cocci -I parsing_c -I engine -I popl09 -I extra > /tmp/dependfull.depend
-       ocamldot -fullgraph /tmp/dependfull.depend > /tmp/dependfull.dot
+       ocamldot -lr /tmp/dependfull.depend > /tmp/dependfull.dot
        dot -Tps /tmp/dependfull.dot > /tmp/dependfull.ps
+       ps2pdf /tmp/dependfull.ps /tmp/dependfull.pdf
 
 ##############################################################################
 # Misc rules