autogen.sh 521 B

12345678910111213141516171819202122
  1. #!/bin/sh
  2. cwd="$PWD"
  3. bs_dir="$(dirname $(readlink -f $0))"
  4. rm -rf "${bs_dir}"/autom4te.cache
  5. rm -f "${bs_dir}"/aclocal.m4 "${bs_dir}"/ltmain.sh
  6. if test -z "$NOSUBMODULES" ; then
  7. echo 'Getting submodules...'
  8. git submodule update --init
  9. fi
  10. echo 'Running autoreconf -if...'
  11. autoreconf -if || exit 1
  12. if test -z "$NOCONFIGURE" ; then
  13. echo 'Configuring...'
  14. cd "${bs_dir}" &> /dev/null
  15. test "$?" = "0" || e=1
  16. test "$cwd" != "$bs_dir" && cd "$bs_dir" &> /dev/null
  17. ./configure $@
  18. test "$e" = "1" && exit 1
  19. cd "$cwd"
  20. fi