autogen.sh 704 B

123456789101112131415161718192021222324252627282930
  1. #!/bin/sh -e
  2. # Written by Luke Dashjr in 2012
  3. # This program is released under the terms of the Creative Commons "CC0 1.0 Universal" license and/or copyright waiver.
  4. bs_dir="$(dirname "$0")"
  5. if test -z "$NOSUBMODULES" ; then
  6. echo 'Getting submodules...'
  7. # Older versions had INSTALL in git; remove it so git can update cleanly
  8. rm -f libblkmaker/INSTALL
  9. (
  10. cd "${bs_dir}"
  11. git submodule update --init
  12. )
  13. fi
  14. echo 'Running autoreconf -if...'
  15. (
  16. cd "${bs_dir}"
  17. rm -rf autom4te.cache
  18. rm -f aclocal.m4 ltmain.sh
  19. autoreconf -if ${AC_FLAGS}
  20. )
  21. echo 'Updating version.h...'
  22. if ./gen-version.sh >version.h.new; then
  23. cmp version.h version.h.new && rm version.h.new || mv version.h.new version.h
  24. fi