Shrink autogen by reading VERSION file directly in configure.ac

This commit is contained in:
Hamish Coleman 2021-11-01 09:39:13 +00:00
parent a9216f1097
commit 4575154e1b
4 changed files with 4 additions and 9 deletions

1
.gitignore vendored
View File

@ -2,7 +2,6 @@
*.a
*.gz
configure
configure.ac
config.*
/Makefile
tools/Makefile

View File

@ -1,11 +1,5 @@
#!/usr/bin/env bash
N2N_VERSION_SHORT=$(cat VERSION)
cat configure.seed | sed \
-e "s/@N2N_VERSION_SHORT@/$N2N_VERSION_SHORT/g" \
> configure.ac
rm -f config.h config.h.in *~ Makefile configure #*
echo "Wait please..."

View File

@ -1,5 +1,5 @@
odnl> Do not add anything above
AC_INIT([edge],@N2N_VERSION_SHORT@)
AC_INIT([edge], m4_esyscmd([cat VERSION | tr -d '\n']))
dnl> Do not add anything above
N2N_VERSION_SHORT=${PACKAGE_VERSION}

View File

@ -3,8 +3,10 @@
# Specifically for windows, where installing autoconf looks suspiciously
# like boiling the ocean.
VERSION=$(cat VERSION)
sed \
-e "s%@N2N_VERSION_SHORT@%FIXME%g" \
-e "s%@N2N_VERSION_SHORT@%$VERSION%g" \
-e "s%@GIT_COMMITS@%FIXME%g" \
-e "s%@CC@%gcc%g" \
-e "s%@AR@%ar%g" \