flavor.sh 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. #! /bin/sh
  2. # Copyright (C) 2009-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 flavors like 'cygnus', 'gnu', 'gnits' and command line
  17. # options like '--ignore-deps' and '--silent-rules' are preserved across
  18. # automake reruns.
  19. . test-init.sh
  20. cat >> configure.ac << 'END'
  21. AM_MAINTAINER_MODE
  22. AC_OUTPUT
  23. END
  24. : > Makefile.am
  25. : > NEWS
  26. : > README
  27. : > AUTHORS
  28. : > ChangeLog
  29. : > THANKS
  30. $ACLOCAL
  31. $AUTOCONF
  32. # Order flavors so that all needed files are installed early.
  33. for flavor in --gnits --gnu --foreign --ignore-deps; do
  34. $AUTOMAKE --add-missing $flavor
  35. ./configure --enable-maintainer-mode
  36. grep " $flavor" Makefile
  37. $MAKE
  38. # Two code paths in configure.am:
  39. # - either a file in $(am__configure_deps) has been updated ...
  40. $sleep
  41. touch aclocal.m4
  42. $MAKE
  43. grep " $flavor" Makefile
  44. # - ... or not; i.e., Makefile.am or an included file has.
  45. $sleep
  46. touch Makefile.am
  47. $MAKE
  48. grep " $flavor" Makefile
  49. done
  50. :