license.sh 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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 COPYING is not overwritten, even with -a -f.
  17. . test-init.sh
  18. echo AC_OUTPUT >>configure.ac
  19. cat >Makefile.am <<\EOF
  20. test1: distdir
  21. grep 'GNU GENERAL PUBLIC LICENSE' $(distdir)/COPYING
  22. test2: distdir
  23. grep 'MY-OWN-LICENSE' $(distdir)/COPYING
  24. test3: distdir
  25. test ! -f $(distdir)/COPYING
  26. grep 'MY-OWN-LICENSE' $(distdir)/COPYING.LIB
  27. EOF
  28. :> NEWS
  29. :> AUTHORS
  30. :> ChangeLog
  31. :> README
  32. test ! -e COPYING
  33. $ACLOCAL
  34. $AUTOCONF
  35. $AUTOMAKE --gnu --add-missing
  36. ./configure
  37. $MAKE test1
  38. # Use 'rm' before 'echo', because COPYING is likely to be a symlink to
  39. # the real COPYING...
  40. rm -f COPYING
  41. echo 'MY-OWN-LICENSE' >COPYING
  42. $MAKE test2
  43. $AUTOMAKE --gnu --add-missing --force-missing
  44. ./configure
  45. $MAKE test2
  46. rm -f COPYING
  47. echo 'MY-OWN-LICENSE' >COPYING.LIB
  48. $AUTOMAKE --gnu --add-missing --force-missing
  49. ./configure
  50. $MAKE test3