3
## Copyright (C) 2002 Free Software Foundation, Inc.
3
## Copyright (C) 2002, 2004, 2006 Free Software Foundation, Inc.
5
5
## This program is free software; you can redistribute it and/or modify
6
6
## it under the terms of the GNU General Public License as published by
15
15
## You should have received a copy of the GNU General Public License
16
16
## along with this program; if not, write to the Free Software
17
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
17
## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21
21
## ----------------- ##
25
25
SUFFIXES = .m4 .m4f
27
AUTOM4TE_CFG = $(top_builddir)/lib/autom4te.cfg
28
$(AUTOM4TE_CFG): $(top_srcdir)/lib/autom4te.in
29
cd $(top_builddir)/lib && $(MAKE) $(AM_MAKEFLAGS) autom4te.cfg
27
31
# Do not use AUTOM4TE here, since Makefile.maint (my-distcheck)
28
32
# checks if we are independent of Autoconf by defining AUTOM4TE (and
29
# others) to `false'. But we _ship_ tests/autom4te, so it doesn't
33
# others) to `false'. Autoconf provides autom4te, so that doesn't
31
MY_AUTOM4TE = $(top_builddir)/tests/autom4te
32
$(MY_AUTOM4TE): $(top_srcdir)/tests/wrapper.in
33
cd $(top_builddir)/tests && $(MAKE) $(AM_MAKEFLAGS) autom4te
35
AUTOM4TE_CFG = $(top_builddir)/lib/autom4te.cfg
36
$(AUTOM4TE_CFG): $(top_srcdir)/lib/autom4te.in
37
cd $(top_builddir)/lib && $(MAKE) $(AM_MAKEFLAGS) autom4te.cfg
36
autom4te_perllibdir='$(top_srcdir)'/lib \
37
AUTOM4TE_CFG='$(AUTOM4TE_CFG)' $(top_builddir)/bin/autom4te \
38
-B '$(top_builddir)'/lib -B '$(top_srcdir)'/lib # keep ` '
39
40
# When processing the file with diversion disabled, there must be no
40
41
# output but comments and empty lines.
41
42
# If freezing produces output, something went wrong: a bad `divert',
42
43
# or an improper paren etc.
43
# It may happen that the output does not end with a end of line, hence
44
# It may happen that the output does not end with an end of line, hence
44
45
# force an end of line when reporting errors.
54
55
src_libdir = $(top_srcdir)/lib
55
56
build_libdir = $(top_builddir)/lib
57
m4f_dependencies = $(MY_AUTOM4TE) $(AUTOM4TE_CFG)
58
m4f_dependencies = $(top_builddir)/bin/autom4te $(AUTOM4TE_CFG)
59
60
# For parallel builds.
60
61
$(build_libdir)/m4sugar/version.m4:
69
70
$(m4sugar_m4f_dependencies) \
70
71
$(src_libdir)/m4sugar/m4sh.m4
72
autotest_m4f_dependencies = \
73
autotest_m4f_dependencies = \
73
74
$(m4sh_m4f_dependencies) \
74
75
$(src_libdir)/autotest/autotest.m4 \
75
76
$(src_libdir)/autotest/general.m4
87
88
$(src_libdir)/autoconf/lang.m4 \
88
89
$(src_libdir)/autoconf/c.m4 \
89
90
$(src_libdir)/autoconf/fortran.m4 \
91
$(src_libdir)/autoconf/erlang.m4 \
90
92
$(src_libdir)/autoconf/functions.m4 \
91
93
$(src_libdir)/autoconf/headers.m4 \
92
94
$(src_libdir)/autoconf/types.m4 \
113
115
--regex='/AN_\(FUNCTION\|HEADER\|IDENTIFIER\|LIBRARY\|MAKEVAR\|PROGRAM\)(\[\([^]]*\)\]/\2/'
116
125
## -------------------------------- ##
117
126
## Looking for forbidden patterns. ##
118
127
## -------------------------------- ##
120
129
check-forbidden-patterns:
121
if (cd $(srcdir) && \
122
grep $(forbidden_patterns) $(forbidden_patterns_files)) \
130
@if (cd $(srcdir) && \
131
$(GREP) $(forbidden_patterns) $(forbidden_patterns_files)) \
123
132
>forbidden.log; then \
124
133
echo "ERROR: forbidden patterns were found:" >&2; \
125
134
sed "s,^,$*.m4: ," <forbidden.log >&2; \