reautogen.sh 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #! /bin/sh
  2. # This is used to re-run autoconf, automake etc and then restart
  3. # a call to "configure". It had been used in an attempt to arrange that
  4. # when one went "configure;make" the make step would not instantly
  5. # invoke automake etc and then run the configure step all over again. But
  6. # the test I had to do that were too bash-specific so I have backed off
  7. # from that. The result will sometimes be configures that take a lot
  8. # longer than is really necessary!
  9. here="$0";while test -L "$here";do here=`ls -ld "$here" | sed 's/.*-> //'`;done
  10. here=`dirname "$here"`
  11. here=`cd "$here"; pwd -P`
  12. saved=`pwd`
  13. cd $here
  14. if autoconf -o /dev/null >/dev/null 2>&1
  15. then
  16. # If looks as if we have autoconf installed and it is at least version
  17. # 2.61, which is what I seem to need at the moment.
  18. # The configure.ac file here arranges to check the automake
  19. # version too.
  20. if $here/../autogen.sh
  21. then :
  22. else
  23. echo "The autoconf/automake process seems to have failed"
  24. echo "Please check you have up to date versions of all those installed"
  25. exit 1
  26. fi
  27. else
  28. # Here I do NOT have an up to date version of autoconf available. So as
  29. # a fall-back and with some trepidation I will merely re-set date-stamps
  30. # on the files that are involved.
  31. echo "About to touch aclocal.m4"
  32. find $here/.. -name aclocal.m4 -print | xargs touch
  33. sleep 1
  34. echo "About to touch Makefile.in, config.h.in and configure"
  35. find $here/.. \( -name Makefile.in -o -name config.h.in -o -name configure \) -print | xargs touch
  36. echo "datestamps should now be in the right order"
  37. echo " "
  38. fi
  39. cd $saved
  40. exec $here/../configure $*