comments and empty lines.
Check that freezing produced no output.
* m4sugar.m4: Commentize what was not.
* m4sh.m4: Likewise.
* aclang.m4: Formatting changes.
+2000-11-03 Akim Demaille <akim@epita.fr>
+
+ * Makefile.am (.m4.m4f): Check that processing produces only
+ comments and empty lines.
+ Check that freezing produced no output.
+ * m4sugar.m4: Commentize what was not.
+ * m4sh.m4: Likewise.
+ * aclang.m4: Formatting changes.
+
2000-11-03 Akim Demaille <akim@epita.fr>
* autoconf.m4 (define): Reestablish only after having read the
## The frozen files. ##
## ------------------ ##
+
+# When processing the file with diversion disabled, there must be no
+# output but comments and empty lines.
+# If freezing produces output, something went wrong: a bad `divert',
+# or an improper paren etc.
+# It may happen that the output does not end with a end of line, hence
+# force an end of line when reporting errors.
.m4.m4f:
- $(M4) -I $(srcdir) $(srcdir)/$*.m4 --freeze-state=$*.m4f
+ $(M4) -I $(srcdir) $(srcdir)/$*.m4 -D divert | \
+ sed 's/#.*//;/^$$/d' >process.log
+ if grep . process.log >/dev/null 2>&1; then \
+ echo "Processing $(srcdir)/$*.m4 produced output:" >&2; \
+ sed "s,^,$(srcdir)/$*.m4: ," < process.log >&2; \
+ echo >&2; \
+ exit 1; \
+ else \
+ rm -f process.log; \
+ fi
+ $(M4) -I $(srcdir) $(srcdir)/$*.m4 --freeze-state=$*.m4f >freeze.log
+ if grep . freeze.log >/dev/null 2>&1; then \
+ echo "Freezing $(srcdir)/$*.m4 produced output:" >&2; \
+ sed "s,^,$(srcdir)/$*.m4: ," < freeze.log >&2; \
+ echo >&2; \
+ exit 1; \
+ else \
+ rm -f freeze.log; \
+ fi
autoconf.m4f: $(m4sources)
chmod +x $@.tmp
mv $@.tmp $@
+# When processing the file with diversion disabled, there must be no
+# output but comments and empty lines.
+# If freezing produces output, something went wrong: a bad `divert',
+# or an improper paren etc.
+# It may happen that the output does not end with a end of line, hence
+# force an end of line when reporting errors.
.m4.m4f:
- $(M4) -I $(srcdir) $(srcdir)/$*.m4 --freeze-state=$*.m4f
+ $(M4) -I $(srcdir) $(srcdir)/$*.m4 -D divert | \
+ sed 's/#.*//;/^$$/d' >process.log
+ if grep . process.log >/dev/null 2>&1; then \
+ echo "Processing $(srcdir)/$*.m4 produced output:" >&2; \
+ sed "s,^,$(srcdir)/$*.m4: ," < process.log >&2; \
+ echo >&2; \
+ exit 1; \
+ else \
+ rm -f process.log; \
+ fi
+ $(M4) -I $(srcdir) $(srcdir)/$*.m4 --freeze-state=$*.m4f >freeze.log
+ if grep . freeze.log >/dev/null 2>&1; then \
+ echo "Freezing $(srcdir)/$*.m4 produced output:" >&2; \
+ sed "s,^,$(srcdir)/$*.m4: ," < freeze.log >&2; \
+ echo >&2; \
+ exit 1; \
+ else \
+ rm -f freeze.log; \
+ fi
autoconf.m4f: $(m4sources)
fi],
[AC_MSG_WARN([compilation failed])])
AC_LANG_POP()dnl
-])]) # _AC_PROG_F77_V
+])])# _AC_PROG_F77_V
# AC_F77_LIBRARY_LDFLAGS
[case $ac_cv_f77_mangling in *," extra underscore"*) ac_val="$ac_val"_ ;; esac
])
m4_default([$2],[$1])="$ac_val"
-]) # AC_F77_FUNC
+])# AC_F77_FUNC
fi],
[AC_MSG_WARN([compilation failed])])
AC_LANG_POP()dnl
-])]) # _AC_PROG_F77_V
+])])# _AC_PROG_F77_V
# AC_F77_LIBRARY_LDFLAGS
[case $ac_cv_f77_mangling in *," extra underscore"*) ac_val="$ac_val"_ ;; esac
])
m4_default([$2],[$1])="$ac_val"
-]) # AC_F77_FUNC
+])# AC_F77_FUNC
fi],
[AC_MSG_WARN([compilation failed])])
AC_LANG_POP()dnl
-])]) # _AC_PROG_F77_V
+])])# _AC_PROG_F77_V
# AC_F77_LIBRARY_LDFLAGS
[case $ac_cv_f77_mangling in *," extra underscore"*) ac_val="$ac_val"_ ;; esac
])
m4_default([$2],[$1])="$ac_val"
-]) # AC_F77_FUNC
+])# AC_F77_FUNC
fi],
[AC_MSG_WARN([compilation failed])])
AC_LANG_POP()dnl
-])]) # _AC_PROG_F77_V
+])])# _AC_PROG_F77_V
# AC_F77_LIBRARY_LDFLAGS
[case $ac_cv_f77_mangling in *," extra underscore"*) ac_val="$ac_val"_ ;; esac
])
m4_default([$2],[$1])="$ac_val"
-]) # AC_F77_FUNC
+])# AC_F77_FUNC
-divert(-1) -*- Autoconf -*-
+divert(-1)# -*- Autoconf -*-
# This file is part of Autoconf.
# M4 sugar for common shell constructs.
# Requires GNU M4 and M4sugar.
-divert(-1) -*- Autoconf -*-
+divert(-1)# -*- Autoconf -*-
# This file is part of Autoconf.
# Base m4 layer.
# Requires GNU m4.
-divert(-1) -*- Autoconf -*-
+divert(-1)# -*- Autoconf -*-
# This file is part of Autoconf.
# M4 sugar for common shell constructs.
# Requires GNU M4 and M4sugar.
-divert(-1) -*- Autoconf -*-
+divert(-1)# -*- Autoconf -*-
# This file is part of Autoconf.
# Base m4 layer.
# Requires GNU m4.