[Pkg-ocaml-maint-commits] [SCM] Debian packaging for coccinelle branch, fixes/system-menhir, updated. upstream/0.1.6.deb+a-7-g6adb55e
Eugeniy Meshcheryakov
eugen at debian.org
Thu Apr 16 18:42:11 UTC 2009
The following commit has been merged in the fixes/system-menhir branch:
commit 6adb55e141f56d3427efbbc5dbbb55b4a289654a
Merge: a10ffc60204e87abb638334986afbbc989316078 df6f9a4139b63a4b9140209ce76a8bf7084e7844
Author: Eugeniy Meshcheryakov <eugen at debian.org>
Date: Thu Apr 16 20:38:07 2009 +0200
Merge commit 'refs/top-bases/fixes/system-menhir' into fixes/system-menhir
Conflicts:
Makefile
diff --combined Makefile
index c0620b7,631c43b..e1b883e
--- a/Makefile
+++ b/Makefile
@@@ -24,7 -24,7 +24,7 @@@
-include Makefile.config
- VERSION=$(shell cat globals/config.ml |grep version |perl -p -e 's/.*"(.*)".*/$$1/;')
+ VERSION=$(shell cat globals/config.ml.in |grep version |perl -p -e 's/.*"(.*)".*/$$1/;')
##############################################################################
# Variables
@@@ -33,7 -33,6 +33,6 @@@ TARGET=spatc
SRC=flag_cocci.ml cocci.ml testing.ml test.ml main.ml
-
ifeq ($(FEATURE_PYTHON),1)
PYCMA=pycaml.cma
PYDIR=
@@@ -47,18 -46,24 +46,24 @@@ PYLIB
OPTLIBFLAGS=
endif
+ SEXPSYSCMA=bigarray.cma nums.cma
- SYSLIBS=str.cma unix.cma
- LIBS=commons/commons.cma globals/globals.cma\
+ SYSLIBS=str.cma unix.cma $(SEXPSYSCMA)
+ LIBS=commons/commons.cma \
+ ocamlsexp/sexplib1.cma commons/commons_sexp.cma \
+ globals/globals.cma \
ctl/ctl.cma \
parsing_cocci/cocci_parser.cma parsing_c/parsing_c.cma \
- engine/cocciengine.cma popl09/popl.cma \
+ engine/cocciengine.cma \
extra/extra.cma $(PYCMA) python/coccipython.cma
- MAKESUBDIRS=commons globals $(PYDIR) ctl parsing_cocci parsing_c \
- engine popl09 extra python
- INCLUDEDIRS=commons commons/ocamlextra globals $(PYDIR) ctl \
- parsing_cocci parsing_c engine popl09 extra python
+ #used for clean: and depend: and a little for rec & rec.opt
+ MAKESUBDIRS=commons ocamlsexp \
- globals menhirlib $(PYDIR) ctl parsing_cocci parsing_c \
++ globals $(PYDIR) ctl parsing_cocci parsing_c \
+ engine extra python
+ INCLUDEDIRS=commons commons/ocamlextra ocamlsexp \
- globals menhirlib $(PYDIR) ctl \
++ globals $(PYDIR) ctl \
+ parsing_cocci parsing_c engine extra python
##############################################################################
# Generic variables
@@@ -101,25 -106,33 +106,33 @@@ BYTECODE_STATIC=-custo
##############################################################################
# Top rules
##############################################################################
- .PHONY: all all.opt opt top clean configure
+ .PHONY: all all.opt opt top clean distclean configure
.PHONY: $(MAKESUBDIRS) $(MAKESUBDIRS:%=%.opt) subdirs subdirs.opt
- all:
+ all: .depend
$(MAKE) subdirs
$(MAKE) $(EXEC)
- opt:
+ opt: .depend
$(MAKE) subdirs.opt
$(MAKE) $(EXEC).opt
all.opt: opt
top: $(EXEC).top
+ world: all opt
+
subdirs:
- +for D in $(MAKESUBDIRS); do $(MAKE) $$D ; done
+ $(MAKE) -C commons
+ $(MAKE) -C ocamlsexp
+ $(MAKE) -C commons sexp
+ +for D in $(MAKESUBDIRS); do $(MAKE) $$D || exit 1 ; done
subdirs.opt:
- +for D in $(MAKESUBDIRS); do $(MAKE) $$D.opt ; done
+ $(MAKE) all.opt -C commons
+ $(MAKE) -C ocamlsexp all.opt
+ $(MAKE) -C commons sexp.opt
+ +for D in $(MAKESUBDIRS); do $(MAKE) $$D.opt || exit 1 ; done
$(MAKESUBDIRS):
$(MAKE) -C $@ OCAMLCFLAGS="$(OCAMLCFLAGS)" all
@@@ -127,6 -140,7 +140,7 @@@
$(MAKESUBDIRS:%=%.opt):
$(MAKE) -C $(@:%.opt=%) OCAMLCFLAGS="$(OCAMLCFLAGS)" all.opt
+ #dependencies:
# commons:
# globals:
# menhirlib:
@@@ -134,28 -148,12 +148,12 @@@
# parsing_c:parsing_cocci
# ctl:globals commons
# engine: parsing_cocci parsing_c ctl
# extra: parsing_cocci parsing_c ctl
# pycaml:
# python:pycaml parsing_cocci parsing_c
- #
- # commons.opt:
- # globals.opt:
- # menhirlib.opt:
- # parsing_cocci.opt: commons.opt globals.opt menhirlib.opt
- # parsing_c.opt:parsing_cocci.opt
- # ctl.opt:globals.opt commons.opt
- # engine.opt: parsing_cocci.opt parsing_c.opt ctl.opt
- # popl09.opt:engine.opt
- # extra.opt: parsing_cocci.opt parsing_c.opt ctl.opt
- # pycaml.opt:
- # python.opt:pycaml.opt parsing_cocci.opt parsing_c.opt
clean::
- set -e; for i in $(MAKESUBDIRS); do $(MAKE) -C $$i clean; done
-
- configure:
- ./configure
+ set -e; for i in $(MAKESUBDIRS); do $(MAKE) -C $$i $@; done
$(LIBS): $(MAKESUBDIRS)
$(LIBS:.cma=.cmxa): $(MAKESUBDIRS:%=%.opt)
@@@ -179,14 -177,17 +177,17 @@@ clean:
rm -f dllpycaml_stubs.so
- .PHONY: tools all configure
+ .PHONY: tools configure
+
+ configure:
+ ./configure
tools:
$(MAKE) -C tools
+
clean::
$(MAKE) -C tools clean
-
static:
rm -f spatch.opt spatch
$(MAKE) STATIC="-ccopt -static" spatch.opt
@@@ -224,23 -225,44 +225,44 @@@ install-python
$(DESTDIR)$(SHAREDIR)/python/coccilib
$(INSTALL_DATA) python/coccilib/coccigui/*.py \
$(DESTDIR)$(SHAREDIR)/python/coccilib/coccigui
+ $(INSTALL_DATA) python/coccilib/coccigui/pygui.glade \
+ $(DESTDIR)$(SHAREDIR)/python/coccilib/coccigui
+ $(INSTALL_DATA) python/coccilib/coccigui/pygui.gladep \
+ $(DESTDIR)$(SHAREDIR)/python/coccilib/coccigui
+
+ install:
+ @if test -x spatch -a ! -x spatch.opt ; then \
+ $(MAKE) install-byte;fi
+ @if test ! -x spatch -a -x spatch.opt ; then \
+ $(MAKE) install-def; $(MAKE) install-opt;fi
+ @if test -x spatch -a -x spatch.opt ; then \
+ $(MAKE) install-byte; $(MAKE) install-opt;fi
+ @if test ! -x spatch -a ! -x spatch.opt ; then \
+ echo "\n\n\t==> Run 'make', 'make opt', or both first. <==\n\n";fi
# user will use spatch to run spatch.opt (native)
- install: all.opt install-common
+ install-def: install-common
$(INSTALL_PROGRAM) spatch.opt $(DESTDIR)$(SHAREDIR)
- cat scripts/spatch.sh | sed "s|SHAREDIR|$(SHAREDIR)|g" > $(DESTDIR)$(BINDIR)/spatch
+ cp scripts/spatch.sh $(DESTDIR)$(BINDIR)/spatch
+ sed -i "s|SHAREDIR|$(SHAREDIR)|g" $(DESTDIR)$(BINDIR)/spatch
+ sed -i "s|LIBDIR|$(LIBDIR)|g" $(DESTDIR)$(BINDIR)/spatch
chmod 755 $(DESTDIR)$(BINDIR)/spatch
# user will use spatch to run spatch (bytecode)
- install-byte: all install-common
+ install-byte: install-common
$(INSTALL_PROGRAM) spatch $(DESTDIR)$(SHAREDIR)
- cat scripts/spatch.sh | sed "s|\.opt||" | sed "s|SHAREDIR|$(SHAREDIR)|g" > $(DESTDIR)$(BINDIR)/spatch
+ cp scripts/spatch.sh $(DESTDIR)$(BINDIR)/spatch
+ sed -i "s|\.opt||" $(DESTDIR)$(BINDIR)/spatch
+ sed -i "s|SHAREDIR|$(SHAREDIR)|g" $(DESTDIR)$(BINDIR)/spatch
+ sed -i "s|LIBDIR|$(LIBDIR)|g" $(DESTDIR)$(BINDIR)/spatch
chmod 755 $(DESTDIR)$(BINDIR)/spatch
# user will use spatch.opt to run spatch.opt (native)
- install-opt: all.opt install-common
+ install-opt: install-common
$(INSTALL_PROGRAM) spatch.opt $(DESTDIR)$(SHAREDIR)
- cat scripts/spatch.sh | sed "s|SHAREDIR|$(SHAREDIR)|g" > $(DESTDIR)$(BINDIR)/spatch.opt
+ cp scripts/spatch.sh $(DESTDIR)$(BINDIR)/spatch.opt
+ sed -i "s|SHAREDIR|$(SHAREDIR)|g" $(DESTDIR)$(BINDIR)/spatch.opt
+ sed -i "s|LIBDIR|$(LIBDIR)|g" $(DESTDIR)$(BINDIR)/spatch.opt
chmod 755 $(DESTDIR)$(BINDIR)/spatch.opt
uninstall:
@@@ -281,6 -303,8 +303,8 @@@ OCAMLVERSION=$(shell ocaml -version |pe
# touch **/*
# make licensify
# remember to comment the -g -dtypes in this Makefile
+ # You can also remove a few things, for instance I removed in this
+ # Makefile things related to popl/ and popl09/
# Procedure to do each time:
# cvs update
@@@ -304,18 -328,18 +328,18 @@@
package:
make srctar
+ ./configure --without-python
make bintar
make staticbintar
make bytecodetar
# I currently pre-generate the parser so the user does not have to
- # install menhir on his machine. I also do a few cleanups like 'rm todo_pos'.
+ # install menhir on his machine. We could also do a few cleanups.
# You may have first to do a 'make licensify'.
srctar:
- make clean
+ make distclean
cp -a . $(TMP)/$(PACKAGE)
cd $(TMP)/$(PACKAGE); cd parsing_cocci/; make parser_cocci_menhir.ml
- cd $(TMP)/$(PACKAGE); rm -f todo_pos
cd $(TMP); tar cvfz $(PACKAGE).tgz --exclude-vcs $(PACKAGE)
rm -rf $(TMP)/$(PACKAGE)
@@@ -349,7 -373,7 +373,7 @@@ clean:
- TOLICENSIFY=ctl engine parsing_cocci popl popl09 python
+ TOLICENSIFY=ctl engine parsing_cocci python
licensify:
ocaml tools/licensify.ml
set -e; for i in $(TOLICENSIFY); do cd $$i; ocaml ../tools/licensify.ml; cd ..; done
@@@ -380,6 -404,7 +404,7 @@@ website
cp $(TMP)/$(PACKAGE)-bin-x86-static.tgz $(WEBSITE)
cp $(TMP)/$(PACKAGE)-bin-bytecode-$(OCAMLVERSION).tgz $(WEBSITE)
rm -f $(WEBSITE)/LATEST* $(WEBSITE)/coccinelle-latest.tgz
+ cp changes.txt $(WEBSITE)/changes-$(VERSION).txt
cd $(WEBSITE); touch LATEST_IS_$(VERSION); ln -s $(PACKAGE).tgz coccinelle-latest.tgz
@@@ -402,6 -427,11 +427,11 @@@ update_darcs
diff_darcs:
set -e; for i in $(DARCSFORESTS); do cd $$i; darcs diff -u; cd ..; done
+ ##############################################################################
+ # Git Developer rules
+ ##############################################################################
+ gitupdate:
+ git cvsimport -d :ext:topps:/var/cvs/cocci coccinelle
##############################################################################
# Developer rules
@@@ -428,7 -458,7 +458,7 @@@ tags
otags -no-mli-tags -r .
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
+ find -name "*.ml" |grep -v "scripts" | xargs ocamldep -I commons -I globals -I ctl -I parsing_cocci -I parsing_c -I engine -I extra > /tmp/dependfull.depend
ocamldot -lr /tmp/dependfull.depend > /tmp/dependfull.dot
dot -Tps /tmp/dependfull.dot > /tmp/dependfull.ps
ps2pdf /tmp/dependfull.ps /tmp/dependfull.pdf
@@@ -473,14 -503,28 +503,28 @@@ beforedepend:: test.m
clean::
rm -f *.cm[iox] *.o *.annot
-
- clean::
rm -f *~ .*~ *.exe #*#
+ distclean:: clean
+ set -e; for i in $(MAKESUBDIRS); do $(MAKE) -C $$i $@; done
+ rm -f .depend
+ rm -f Makefile.config
+ rm -f python/coccilib/output.py
+ rm -f python/pycocci.ml
+ rm -f python/pycocci_aux.ml
+ rm -f globals/config.ml
+ rm -f TAGS
+ rm -f tests/SCORE_actual.sexp
+ rm -f tests/SCORE_best_of_both.sexp
+ find -name ".#*1.*" | xargs rm -f
+
beforedepend::
depend:: beforedepend
$(OCAMLDEP) *.mli *.ml > .depend
- set -e; for i in $(MAKESUBDIRS); do $(MAKE) -C $$i depend; done
+ set -e; for i in $(MAKESUBDIRS); do $(MAKE) -C $$i $@; done
+
+ .depend::
+ @if [ ! -f .depend ] ; then $(MAKE) depend ; fi
-include .depend
diff --combined parsing_cocci/Makefile
index 23bdc0b,cf02ae3..8fb2bfe
--- a/parsing_cocci/Makefile
+++ b/parsing_cocci/Makefile
@@@ -26,7 -26,7 +26,7 @@@ LEXER_SOURCES = lexer_cocci.ml
SCRIPT_LEXER_SOURCES = lexer_script.mll
PARSER_SOURCES = parser_cocci_menhir.mly
SOURCES = flag_parsing_cocci.ml type_cocci.ml ast_cocci.ml ast0_cocci.ml \
- pretty_print_cocci.ml unparse_ast0.ml \
+ pretty_print_cocci.ml unparse_ast0.ml visitor_ast0_types.ml \
visitor_ast.ml visitor_ast0.ml compute_lines.ml comm_assoc.ml \
iso_pattern.ml iso_compile.ml single_statement.ml simple_assignments.ml \
ast0toast.ml check_meta.ml top_level.ml type_infer.ml test_exps.ml \
@@@ -37,11 -37,11 +37,11 @@@ $(LEXER_SOURCES:.mll=.ml) $(PARSER_SOUR
$(SCRIPT_LEXER_SOURCES:.mll=.ml) \
get_constants.ml get_constants2.ml parse_cocci.ml
- LIBS=../commons/commons.cma ../globals/globals.cma
+ LIBS=../commons/commons.cma ../globals/globals.cma
SYSLIBS = str.cma unix.cma
-#MENHIR_PATH=$(shell ocamlfind query menhirLib)
-MENHIR_PATH=../menhirlib
+MENHIR_PATH=$(shell ocamlfind query menhirLib)
+#MENHIR_PATH=../menhirlib
INCLUDES = -I ../commons -I ../commons/ocamlextra -I ../globals \
-I $(MENHIR_PATH)
@@@ -77,7 -77,7 +77,7 @@@ $(LIB): $(GENERATED) $(OBJS
$(OCAMLC) -I $(MENHIR_PATH) -a -o $(LIB) $(MENHIR) $(OBJS)
- $(OPTLIB): $(GENERATED) $(OPTOBJS)
+ $(OPTLIB): $(GENERATED) $(OPTOBJS)
$(OCAMLOPT) -I $(MENHIR_PATH) -a -o $(OPTLIB) $(MENHIRO) $(OPTOBJS)
@@@ -89,7 -89,7 +89,7 @@@ $(EXEC): $(OBJS) main.cmo $(LIBS
clean::
rm -f $(LIB)
- rm -f $(OPTLIB) $(LIB:.cma=.a)
+ rm -f $(OPTLIB) $(LIB:.cma=.a)
rm -f $(TARGET)
@@@ -122,7 -122,10 +122,10 @@@ clean:
# clean rule for others files
clean::
rm -f *.cm[iox] *.o *.annot
- rm -f *~ .*~ #*#
+ rm -f *~ .*~ #*#
+
+ distclean::
+ rm -f .depend
depend: $(GENERATED)
$(OCAMLDEP) *.mli *.ml > .depend
--
Debian packaging for coccinelle
More information about the Pkg-ocaml-maint-commits
mailing list