Makefile.am 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. # Make Autoconf library for M4sugar.
  2. # Copyright (C) 2001-2002, 2006-2012 Free Software Foundation, Inc.
  3. # This program is free software: you can redistribute it and/or modify
  4. # it under the terms of the GNU General Public License as published by
  5. # the Free Software Foundation, either version 3 of the License, or
  6. # (at your option) any later version.
  7. # This program is distributed in the hope that it will be useful,
  8. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. # GNU General Public License for more details.
  11. # You should have received a copy of the GNU General Public License
  12. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  13. m4sugarlibdir = $(pkgdatadir)/m4sugar
  14. dist_m4sugarlib_DATA = m4sugar.m4 foreach.m4 m4sh.m4
  15. nodist_m4sugarlib_DATA = version.m4 m4sugar.m4f m4sh.m4f
  16. CLEANFILES = $(nodist_m4sugarlib_DATA)
  17. # Get the release year from ../ChangeLog.
  18. RELEASE_YEAR = \
  19. `sed 's/^\([0-9][0-9][0-9][0-9]\).*/\1/;q' $(top_srcdir)/ChangeLog`
  20. ## ------------ ##
  21. ## version.m4. ##
  22. ## ------------ ##
  23. # The `:;' works around a redirected compound command bash exit status bug.
  24. version.m4: Makefile
  25. :;{ \
  26. echo '# This file is part of -*- Autoconf -*-.' && \
  27. echo '# Version of Autoconf.' && \
  28. echo '# Copyright (C) 1999, 2000, 2001, 2002, 2006, 2007, 2009' && \
  29. echo '# Free Software Foundation, Inc.' && \
  30. echo &&\
  31. echo 'm4_define([m4_PACKAGE_NAME], [$(PACKAGE_NAME)])' && \
  32. echo 'm4_define([m4_PACKAGE_TARNAME], [$(PACKAGE_TARNAME)])' && \
  33. echo 'm4_define([m4_PACKAGE_VERSION], [$(PACKAGE_VERSION)])' && \
  34. echo 'm4_define([m4_PACKAGE_STRING], [$(PACKAGE_STRING)])' && \
  35. echo 'm4_define([m4_PACKAGE_BUGREPORT], [$(PACKAGE_BUGREPORT)])' && \
  36. echo 'm4_define([m4_PACKAGE_URL], [$(PACKAGE_URL)])' && \
  37. echo 'm4_define([m4_PACKAGE_YEAR], ['$(RELEASE_YEAR)'])'; \
  38. } > $@-t
  39. mv $@-t $@
  40. ## --------------- ##
  41. ## Building TAGS. ##
  42. ## --------------- ##
  43. TAGS_FILES = $(dist_m4sugarlib_DATA)
  44. ETAGS_ARGS = $(ETAGS_FOR_AUTOCONF)
  45. ## -------- ##
  46. ## Checks. ##
  47. ## -------- ##
  48. check-local: check-forbidden-patterns
  49. forbidden_patterns = -e '^_*EOF' -e ' cmp '
  50. forbidden_patterns_files = $(dist_m4sugarlib_DATA)
  51. ## ------------------ ##
  52. ## The frozen files. ##
  53. ## ------------------ ##
  54. m4sugar.m4f: $(m4sugar_m4f_dependencies)
  55. m4sh.m4f: $(m4sh_m4f_dependencies)
  56. include ../freeze.mk