~ubuntu-branches/ubuntu/maverick/autoconf/maverick

« back to all changes in this revision

Viewing changes to lib/freeze.mk

  • Committer: Bazaar Package Importer
  • Author(s): Ben Pfaff
  • Date: 2007-01-17 19:57:13 UTC
  • mfrom: (3.1.7 feisty)
  • Revision ID: james.westby@ubuntu.com-20070117195713-n2q7e2pbpu4ezbx7
Tags: 2.61-4
debian/control: Require m4 version 1.4.8 or later.  Thanks to Jim
Paris <jim@jtan.com> for reporting this bug.  Closes: #407385.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
## Freeze M4 files.
2
2
 
3
 
## Copyright (C) 2002 Free Software Foundation, Inc.
 
3
## Copyright (C) 2002, 2004, 2006 Free Software Foundation, Inc.
4
4
##
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
14
14
##
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
18
 
## 02111-1307, USA.
 
17
## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 
18
## 02110-1301, USA.
19
19
 
20
20
 
21
21
## ----------------- ##
24
24
 
25
25
SUFFIXES = .m4 .m4f
26
26
 
 
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
 
30
 
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
30
34
# apply to us.
31
 
MY_AUTOM4TE = $(top_builddir)/tests/autom4te
32
 
$(MY_AUTOM4TE): $(top_srcdir)/tests/wrapper.in
33
 
        cd $(top_builddir)/tests && $(MAKE) $(AM_MAKEFLAGS) autom4te
34
 
 
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
 
35
MY_AUTOM4TE =                                                                   \
 
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 ` '
38
39
 
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.
45
46
.m4.m4f:
46
47
        $(MY_AUTOM4TE)                          \
54
55
src_libdir   = $(top_srcdir)/lib
55
56
build_libdir = $(top_builddir)/lib
56
57
 
57
 
m4f_dependencies = $(MY_AUTOM4TE) $(AUTOM4TE_CFG)
 
58
m4f_dependencies = $(top_builddir)/bin/autom4te $(AUTOM4TE_CFG)
58
59
 
59
60
# For parallel builds.
60
61
$(build_libdir)/m4sugar/version.m4:
69
70
        $(m4sugar_m4f_dependencies)             \
70
71
        $(src_libdir)/m4sugar/m4sh.m4
71
72
 
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/'
114
116
 
115
117
 
 
118
## ---------- ##
 
119
## Run GREP.  ##
 
120
## ---------- ##
 
121
 
 
122
GREP = @GREP@
 
123
 
 
124
 
116
125
## -------------------------------- ##
117
126
## Looking for forbidden patterns.  ##
118
127
## -------------------------------- ##
119
128
 
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; \