Merge pull request #2527 from DennisHeimbigner/versionfix.dmh

Move construction of VERSION file to end of the build
This commit is contained in:
Ward Fisher 2022-10-11 10:00:33 -06:00 committed by GitHub
commit 1bbaa66f32
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 3 deletions

View File

@ -217,3 +217,11 @@ install-data-hook:
@echo '| https://www.unidata.ucar.edu |'
@echo '+-------------------------------------------------------------+'
@echo ''
# Create the VERSION file after the build
# in case it is being used by packagers
all-local: liblib/libnetcdf.la
echo ${PACKAGE_VERSION} > VERSION
# Remove the VERSION file
CLEANFILES = VERSION

View File

@ -36,9 +36,10 @@ AC_SUBST([netCDF_SO_VERSION]) netCDF_SO_VERSION=20:0:1
# pattered after the files generated by libhdf4, libhdf5.
#####
# Create the VERSION file, which contains the package version from
# AC_INIT.
echo AC_PACKAGE_VERSION>VERSION
# Create the VERSION file, which contains the package version from AC_INIT.
# This file is apparently unused. But see the bottom of Makefile.am
# echo AC_PACKAGE_VERSION>VERSION
AC_SUBST(PACKAGE_VERSION)
AC_MSG_NOTICE([netCDF AC_PACKAGE_VERSION])
@ -115,7 +116,11 @@ ISMSYS=yes
fi
# Get windows version info
if text "x$ISMSVC" = xyes ; then
WINVER=`systeminfo | sed -e '/^OS Version:/p' -ed | sed -e 's|[^0-9]*\([0-9.]*\).*|\1|'`
else
WINVER="0.0.0"
fi
WINVERMAJOR=`echo $WVER | sed -e 's|\([^.]*\)[.]\([^.]*\)[.]\(.*\)|\1|'`
WINVERBUILD=`echo $WVER | sed -e 's|\([^.]*\)[.]\([^.]*\)[.]\(.*\)|\3|'`
if test "x$WINVERMAJOR" = x ; then WINVERMAJOR=0; fi