Rename version.h to mc-version.h.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2021-03-18 15:25:06 +03:00
parent 32621b96d1
commit 30480df7c9
4 changed files with 9 additions and 9 deletions

View File

@ -11,11 +11,11 @@ EXTRA_DIST =
dist_noinst_SCRIPTS = build-glib2.sh
dist_noinst_HEADERS = $(top_srcdir)/version.h
dist_noinst_HEADERS = $(top_srcdir)/mc-version.h
ACLOCAL_AMFLAGS = -I m4
CONFIG_STATUS_DEPENDENCIES = $(top_srcdir)/version.h
CONFIG_STATUS_DEPENDENCIES = $(top_srcdir)/mc-version.h
.PHONY: update-version \
cppcheck \
@ -32,13 +32,13 @@ update-version:
@if test -x $(top_srcdir)/maint/utils/version.sh; then \
$(top_srcdir)/maint/utils/version.sh "$(top_srcdir)" 2>&1 >/dev/null; \
else \
if test ! -e $(top_srcdir)/version.h; then \
if test ! -e $(top_srcdir)/mc-version.h; then \
echo "File not found: $(top_srcdir)/maint/utils/version.sh"; \
exit 1; \
fi; \
fi
$(top_srcdir)/version.h: update-version
$(top_srcdir)/mc-version.h: update-version
CPPCHECK_CMD = cppcheck \
--inline-suppr \

View File

@ -30,7 +30,7 @@
#include <config.h>
#include "version.h"
#include "mc-version.h"
#include "global.h"

View File

@ -3,14 +3,14 @@ dnl
dnl Get current version of Midnight Commander from git tags
dnl
dnl @author Slava Zanko <slavazanko@gmail.com>
dnl @version 2021-03-20
dnl @version 2021-03-28
dnl @license GPL
dnl @copyright Free Software Foundation, Inc.
dnl @modified Andrew Borodin <aborodin@vmail.ru>
AC_DEFUN([mc_VERSION],[
if test -f ${srcdir}/version.h; then
VERSION=$(grep '^#define MC_CURRENT_VERSION' ${srcdir}/version.h | sed 's/.*"\(.*\)"$/\1/')
if test -f ${srcdir}/mc-version.h; then
VERSION=$(grep '^#define MC_CURRENT_VERSION' ${srcdir}/mc-version.h | sed 's/.*"\(.*\)"$/\1/')
else
VERSION="unknown"
fi

View File

@ -56,7 +56,7 @@ fi
src_top_dir="$1"
VERSION_FILE="${src_top_dir}/version.h"
VERSION_FILE="${src_top_dir}/mc-version.h"
PREV_MC_VERSION="unknown"
CURR_MC_VERSION="${PREV_MC_VERSION}"