Coccinelle archive mirror
 help / color / mirror / Atom feed
From: Olaf Hering <olaf@aepfle.de>
To: cocci@inria.fr
Subject: [cocci] [PATCH v1] remove unused version files
Date: Mon, 17 Mar 2025 23:10:29 +0100	[thread overview]
Message-ID: <20250317221044.25197-1-olaf@aepfle.de> (raw)

The file scripts/genversion.sh is unused since commit ad7cfbe97
("Documentation build improvement.").

The file version.ml is unused since commit 3277ba7a1 ("Next Makefile").

The last user of CONFVERSION is removed, which makes
AC_COCCI_CONFVERSION obsolete.

Resolves coccinelle/coccinelle#121

Signed-off-by: Olaf Hering <olaf@aepfle.de>
---
 .gitignore            |  1 -
 configure.ac          |  2 --
 scripts/genversion.sh | 11 -----------
 setup/cocci.m4        | 34 ----------------------------------
 version.ml.in         |  2 --
 5 files changed, 50 deletions(-)
 delete mode 100755 scripts/genversion.sh
 delete mode 100644 version.ml.in

diff --git a/.gitignore b/.gitignore
index ed2ecf88f..623370c8c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -20,7 +20,6 @@ scripts/spatch.byte
 *.swo
 *.swp
 .depend
-version.ml
 
 .flatpak-builder/
 _flatpak-build/
diff --git a/configure.ac b/configure.ac
index f0c585329..83273a07e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -14,7 +14,6 @@ AC_MSG_NOTICE([configuring coccinelle $COCCI_VERSION in $COCCI_SRCDIR])
 AM_INIT_AUTOMAKE
 
 AC_CONFIG_SRCDIR([cocci.ml])    dnl  this file must be present in our src directory
-AC_COCCI_CONFVERSION
 
 dnl  reminder that this configure depends on macros generated by aclocal
 AC_MSG_NOTICE([this configure program uses pkg-config m4 macros])
@@ -605,7 +604,6 @@ dnl
 
 AC_CONFIG_FILES([
   Makefile.config
-  version.ml
   commons/commands.ml
   globals/cocciconfig.ml globals/regexp.ml python/pycocci.ml
   ocaml/prepare_ocamlcocci.ml
diff --git a/scripts/genversion.sh b/scripts/genversion.sh
deleted file mode 100755
index b70b837db..000000000
--- a/scripts/genversion.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-#! /bin/sh
-
-# fallback date (in RFC format)
-VERSION=`date "+%a, %d %b %Y %H:%M:%S %z"`
-
-# use the date information from git, if git is present
-if test -d ".git" && which git &>/dev/null; then
-VERSION=`git log -1 --date-order --date=rfc --pretty="format:%cd"`
-fi
-
-echo "let version_date = \"$VERSION\""
diff --git a/setup/cocci.m4 b/setup/cocci.m4
index 88fce3a05..d4dbb0ad4 100644
--- a/setup/cocci.m4
+++ b/setup/cocci.m4
@@ -205,40 +205,6 @@ AC_DEFUN([AC_COCCI_PYVER],
 ])
 
 
-dnl  determine version date (RTC format)
-AC_DEFUN([AC_COCCI_CONFVERSION],
-[dnl
-  AC_SUBST([CONFVERSION])
-  AC_MSG_NOTICE([determining version suffix])
-
-  AS_IF([test -z "$CONFVERSION" -a -d "./.git"],
-  [dnl  git administration found
-    AC_MSG_NOTICE([building a version from a git repository])
-    AC_PATH_TOOL([GIT],[git])
-    AS_IF([test -n "$GIT"],
-    [dnl  ask git
-      CONFVERSION=`$GIT log -1 --date-order --date=rfc --pretty="format:%cd"`
-    ])
-  ])
-
-  AS_IF([test -z "$CONFVERSION"],
-  [dnl  otherwise, take the current date
-    AC_PATH_TOOL([DATE],[date])
-    AS_IF([test -n "$DATE"],
-    [dnl
-      CONFVERSION=`$DATE "+%a, %d %b %Y %H:%M:%S %z"`
-    ])
-  ])
-
-  AS_IF([test -z "$CONFVERSION"],
-  [dnl  fallback
-    CONFVERSION=unknown
-  ])
-
-  AC_MSG_NOTICE([version suffix set to $CONFVERSION])
-])
-
-
 dnl  find a tool, with specialized macros for certain cases
 dnl  $1: name of the variable
 dnl  $2: name of the tool
diff --git a/version.ml.in b/version.ml.in
deleted file mode 100644
index a5969ce20..000000000
--- a/version.ml.in
+++ /dev/null
@@ -1,2 +0,0 @@
-let version_date = "@CONFVERSION@"
-let configure_flags = "@CONFIGURE_FLAGS@"

base-commit: cca22217d1b4316224e80a18d0b08dd351234497

             reply	other threads:[~2025-03-17 22:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-17 22:10 Olaf Hering [this message]
2025-03-20  9:41 ` [cocci] [PATCH v1] remove unused version files Victor Gambier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250317221044.25197-1-olaf@aepfle.de \
    --to=olaf@aepfle.de \
    --cc=cocci@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).