Browse Source

Shrink autogen by reading VERSION file directly in configure.ac

pull/889/head
Hamish Coleman 3 years ago
parent
commit
4575154e1b
  1. 1
      .gitignore
  2. 6
      autogen.sh
  3. 2
      configure.ac
  4. 4
      scripts/hack_fakeautoconf.sh

1
.gitignore

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

6
autogen.sh

@ -1,11 +1,5 @@
#!/usr/bin/env bash #!/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 #* rm -f config.h config.h.in *~ Makefile configure #*
echo "Wait please..." echo "Wait please..."

2
configure.seed → configure.ac

@ -1,5 +1,5 @@
odnl> Do not add anything above 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 dnl> Do not add anything above
N2N_VERSION_SHORT=${PACKAGE_VERSION} N2N_VERSION_SHORT=${PACKAGE_VERSION}

4
scripts/hack_fakeautoconf.sh

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

Loading…
Cancel
Save