reconf 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. #! /bin/sh
  2. #
  3. # Reconfigure for a release, by updating the Makefile dependencies and
  4. # running the autotools.
  5. #
  6. # $Id: reconf,v 1.3 2004/04/23 10:06:17 quozl Exp $
  7. # make the existing config.h disappear temporarily
  8. if test -f config.h
  9. then
  10. mv -f config.h config.h.TMP
  11. fi
  12. touch config.h
  13. # rebuild dependencies (makedepend)
  14. for makefile in Makefile.am Makefile.uClinux
  15. do
  16. echo -n "Rebuilding $makefile..."
  17. head -`grep -n 'DO NOT ADD BELOW THIS POINT' $makefile | \
  18. cut -d: -f1` $makefile > $makefile.new
  19. for file in *.c
  20. do
  21. if test "$makefile" = "Makefile.uClinux"
  22. then
  23. gcc -MM $file -include config.embed.h
  24. else
  25. gcc -MM $file -DHAVE_CONFIG_H
  26. fi
  27. echo ''
  28. done >> $makefile.new
  29. echo 'done.'
  30. if ! cmp -s $makefile.new $makefile
  31. then
  32. echo "Changes: <=old >=new"
  33. diff $makefile $makefile.new | grep '^[<>]'
  34. mv -f $makefile.new $makefile
  35. else
  36. rm -f $makefile.new
  37. echo "No change."
  38. fi
  39. done
  40. # restore the previous config.h
  41. rm -f config.h
  42. if test -f config.h.TMP
  43. then
  44. mv -f config.h.TMP config.h
  45. fi
  46. # show us what we do next
  47. set -x
  48. # reset the configuration
  49. rm -f config.cache
  50. rm -f config.log
  51. # run the build tools sequence
  52. aclocal
  53. autoconf
  54. automake -a --copy --verbose
  55. autoheader