Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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
11 changes: 8 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down Expand Up @@ -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
Expand Down