remake-not-after-make-dist.sh 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. #! /bin/sh
  2. # Copyright (C) 2003-2017 Free Software Foundation, Inc.
  3. #
  4. # This program is free software; you can redistribute it and/or modify
  5. # it under the terms of the GNU General Public License as published by
  6. # the Free Software Foundation; either version 2, or (at your option)
  7. # any later version.
  8. #
  9. # This program is distributed in the hope that it will be useful,
  10. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. # GNU General Public License for more details.
  13. #
  14. # You should have received a copy of the GNU General Public License
  15. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  16. # Make sure Makefile.in are up to date after make dist.
  17. # This is expected to work even without GNU Make (the GNU Make
  18. # feature that isn't supported elsewhere is the rebuild of
  19. # Makefile dependencies during ordinary builds).
  20. #
  21. # If this fails, this is likely to be due to a dependency being
  22. # given two different name. For instance BSD Make does not know
  23. # that 'Makefile' is the same as './Makefile'
  24. #
  25. # Report from Akim Demaille.
  26. . test-init.sh
  27. cat >>configure.ac <<'EOF'
  28. # Rebuild rule are ok until make dist, but not afterwards.
  29. if test ! -f rebuild_ok; then
  30. ACLOCAL=false
  31. AUTOMAKE=false
  32. AUTOCONF=false
  33. fi
  34. AC_OUTPUT
  35. EOF
  36. : > rebuild_ok
  37. : > Makefile.am
  38. $ACLOCAL
  39. $AUTOCONF
  40. $AUTOMAKE --add-missing
  41. ./configure
  42. $MAKE
  43. $sleep
  44. touch aclocal.m4
  45. $MAKE distdir
  46. cd $me-1.0
  47. test ! -f rebuild_ok
  48. ./configure
  49. $MAKE
  50. :