update to coccinelle 1.0rc3 and fix running the regression tests

- Better handling of the case of a matched declaration that should only
  be replaced by other top level things.
- Improved filtering of result of matching atomic patterns
- Drop positions before creating function prototype rules
- Adjust position of { introduced by adding multiple statements in a
  single-statement position
- Drop newline after function call ( when all arguments on that line are
  eliminated
- Accept removal of a single declaration, replaced by arbitrary,
  non-declaration code
- smpl_spacing takes into account newlines, indentation
This commit is contained in:
sthen 2011-06-16 23:24:49 +00:00
parent c76a26180f
commit a87194c4ac
5 changed files with 33 additions and 15 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.4 2011/06/12 12:31:47 sthen Exp $
# $OpenBSD: Makefile,v 1.5 2011/06/16 23:24:49 sthen Exp $
SHARED_ONLY = Yes
@ -6,7 +6,7 @@ COMMENT = program matching and transformation engine
# if updating, check for any additional use of diff/grep which
# may need to be switched to gdiff/ggrep
DISTNAME = coccinelle-1.0.0-rc2
DISTNAME = coccinelle-1.0.0-rc3
PKGNAME = ${DISTNAME:S/-rc/rc/}
EXTRACT_SUFX = .tgz
@ -47,9 +47,14 @@ pre-configure:
${SUBST_CMD} ${WRKSRC}/configure ${WRKSRC}/pycaml/Makefile
perl -pi -e s,/usr/local,${TRUEPREFIX},g ${WRKSRC}/scripts/spatch*
# can't use MODOCAML_NATIVE because it also needs dynlink
# can't use MODOCAML_NATIVE here because we need not
# just native code, but also dynlink
.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64"
ALL_TARGET = all.opt
# "world"=build both bytecode and native binaries
# "all.opt"=only build native binaries (but regression
# tests didn't work with this)
ALL_TARGET = world
INSTALL_TARGET = install-common install-def
PKG_ARGS += -DOCAMLOPT=.opt
.else
WANTLIB += curses

View File

@ -1,5 +1,5 @@
MD5 (coccinelle-1.0.0-rc2.tgz) = f7P3N7apm3k12ZZRVcgBUw==
RMD160 (coccinelle-1.0.0-rc2.tgz) = G7Lg06sH1KjeBBOYxk9gxgwfHFk=
SHA1 (coccinelle-1.0.0-rc2.tgz) = BXEc0aEojKkP62i/Im9p32jpbWA=
SHA256 (coccinelle-1.0.0-rc2.tgz) = yQAjN+oBpvmLCICgwj5ce6hJxPREHb8HsG89d5A4Mow=
SIZE (coccinelle-1.0.0-rc2.tgz) = 2308758
MD5 (coccinelle-1.0.0-rc3.tgz) = qqyLSlI24I5R8s4VmGKxNw==
RMD160 (coccinelle-1.0.0-rc3.tgz) = Bly0e5gaiio0TjiUT9RJ5yKloeI=
SHA1 (coccinelle-1.0.0-rc3.tgz) = noSqkdWTOMiSUvWaEfIAYWTAY2E=
SHA256 (coccinelle-1.0.0-rc3.tgz) = 0fmzALgp2e9LKV6NOf2dQ4jbN5VFIOGv8ZQXhmAwqCs=
SIZE (coccinelle-1.0.0-rc3.tgz) = 2308876

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-Makefile,v 1.1 2011/06/16 23:24:49 sthen Exp $
--- Makefile.orig Thu Jun 16 23:49:44 2011
+++ Makefile Thu Jun 16 23:50:02 2011
@@ -331,7 +331,7 @@ install-common:
$(INSTALL_DATA) commons/*.cmi $(DESTDIR)$(SHAREDIR)/commons/
$(INSTALL_DATA) globals/iteration.cmi $(DESTDIR)$(SHAREDIR)/globals/
$(INSTALL_DATA) docs/spatch.1 $(DESTDIR)$(MANDIR)/man1/
- $(INSTALL_DATA) docs/Coccilib.3cocci $(DESTDIR)$(MANDIR)/man3/
+ $(INSTALL_DATA) docs/Coccilib.3cocci $(DESTDIR)$(MANDIR)/man3/Coccilib.3
@if [ $(FEATURE_PYTHON) -eq 1 ]; then $(MAKE) install-python; fi
install-bash:

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-cocci_ml,v 1.1.1.1 2011/05/14 15:02:50 sthen Exp $
--- cocci.ml.orig Wed Apr 13 06:25:58 2011
+++ cocci.ml Mon May 9 08:08:26 2011
$OpenBSD: patch-cocci_ml,v 1.2 2011/06/16 23:24:49 sthen Exp $
--- cocci.ml.orig Fri Jun 3 17:55:52 2011
+++ cocci.ml Thu Jun 16 23:48:24 2011
@@ -263,8 +263,8 @@ let show_or_not_diff2 cfile outfile =
let line =
@ -12,7 +12,7 @@ $OpenBSD: patch-cocci_ml,v 1.1.1.1 2011/05/14 15:02:50 sthen Exp $
let xs =
let res = Common.cmd_to_list line in
match (!Flag.patch,res) with
@@ -495,7 +495,7 @@ let worth_trying cfiles tokens =
@@ -501,7 +501,7 @@ let worth_trying cfiles tokens =
| _ -> s
) in
@ -21,7 +21,7 @@ $OpenBSD: patch-cocci_ml,v 1.1.1.1 2011/05/14 15:02:50 sthen Exp $
in
(match Sys.command com with
| 0 (* success *) -> true
@@ -1979,7 +1979,7 @@ let check_duplicate_modif2 xs =
@@ -1995,7 +1995,7 @@ let check_duplicate_modif2 xs =
match res2 with
| None -> false
| Some res2 ->

View File

@ -1,9 +1,10 @@
@comment $OpenBSD: PLIST,v 1.3 2011/06/12 12:31:47 sthen Exp $
@comment $OpenBSD: PLIST,v 1.4 2011/06/16 23:24:49 sthen Exp $
bin/spatch
@comment bin/spatch.byte
@comment bin/spatch.opt
lib/dllpycaml_stubs.so
@man man/man1/spatch.1
@man man/man3/Coccilib.3
share/coccinelle/
share/coccinelle/commons/
share/coccinelle/commons/common.cmi