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