Skip to contentSkip to conversation

remove unused version files

PATCH Applied Olaf Hering 2 participants 2 messages Mar 17, 2025 – Mar 20, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 remove unused version files

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

---
 .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
.gitignore +0 -1
index ed2ecf88f..623370c8c 100644
@@ -20,7 +20,6 @@ scripts/spatch.byte
 *.swo
 *.swp
 .depend
-version.ml
 
 .flatpak-builder/
 _flatpak-build/
configure.ac +0 -2
index f0c585329..83273a07e 100644
@@ -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
scripts/genversion.sh deleted +0 -11
deleted file mode 100755
index b70b837db..000000000
@@ -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\""
setup/cocci.m4 +0 -34
index 88fce3a05..d4dbb0ad4 100644
@@ -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
version.ml.in deleted +0 -2
deleted file mode 100644
index a5969ce20..000000000
@@ -1,2 +0,0 @@
-let version_date = "@CONFVERSION@"
-let configure_flags = "@CONFIGURE_FLAGS@"

base-commit: cca22217d1b4316224e80a18d0b08dd351234497

#1 lore raw

Merged to master. Thank you!

Quoted 125 lines · Olaf Hering

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

---
  .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

.gitignore +0 -1
index ed2ecf88f..623370c8c 100644
@@ -20,7 +20,6 @@ scripts/spatch.byte
  *.swo
  *.swp
  .depend
-version.ml
 
  .flatpak-builder/
  _flatpak-build/
configure.ac +0 -2
index f0c585329..83273a07e 100644
@@ -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
scripts/genversion.sh deleted +0 -11
deleted file mode 100755
index b70b837db..000000000
@@ -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\""
setup/cocci.m4 +0 -34
index 88fce3a05..d4dbb0ad4 100644
@@ -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
version.ml.in deleted +0 -2
deleted file mode 100644
index a5969ce20..000000000
@@ -1,2 +0,0 @@
-let version_date = "@CONFVERSION@"
-let configure_flags = "@CONFIGURE_FLAGS@"

base-commit: cca22217d1b4316224e80a18d0b08dd351234497