autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

FYI: More sanity checks when freezing


From: Akim Demaille
Subject: FYI: More sanity checks when freezing
Date: 03 Nov 2000 14:57:14 +0100
User-agent: Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.1 (Channel Islands)

Index: ChangeLog
from  Akim Demaille  <address@hidden>
        * 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.

Index: Makefile.am
===================================================================
RCS file: /cvs/autoconf/Makefile.am,v
retrieving revision 1.32
diff -u -u -r1.32 Makefile.am
--- Makefile.am 2000/10/26 09:52:34 1.32
+++ Makefile.am 2000/11/03 13:58:18
@@ -144,8 +144,33 @@
 ## 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)
 
Index: aclang.m4
===================================================================
RCS file: /cvs/autoconf/aclang.m4,v
retrieving revision 1.80
diff -u -u -r1.80 aclang.m4
--- aclang.m4 2000/11/03 13:41:41 1.80
+++ aclang.m4 2000/11/03 13:58:24
@@ -1475,7 +1475,7 @@
 fi],
                   [AC_MSG_WARN([compilation failed])])
 AC_LANG_POP()dnl
-])]) # _AC_PROG_F77_V
+])])# _AC_PROG_F77_V
 
 
 # AC_F77_LIBRARY_LDFLAGS
@@ -1743,4 +1743,4 @@
 [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
Index: m4sh.m4
===================================================================
RCS file: /cvs/autoconf/m4sh.m4,v
retrieving revision 1.6
diff -u -u -r1.6 m4sh.m4
--- m4sh.m4 2000/11/03 09:16:22 1.6
+++ m4sh.m4 2000/11/03 13:58:24
@@ -1,4 +1,4 @@
-divert(-1)                                                   -*- Autoconf -*-
+divert(-1)#                                                  -*- Autoconf -*-
 # This file is part of Autoconf.
 # M4 sugar for common shell constructs.
 # Requires GNU M4 and M4sugar.
Index: m4sugar.m4
===================================================================
RCS file: /cvs/autoconf/m4sugar.m4,v
retrieving revision 2.14
diff -u -u -r2.14 m4sugar.m4
--- m4sugar.m4 2000/11/03 11:14:48 2.14
+++ m4sugar.m4 2000/11/03 13:58:27
@@ -1,4 +1,4 @@
-divert(-1)                                                   -*- Autoconf -*-
+divert(-1)#                                                  -*- Autoconf -*-
 # This file is part of Autoconf.
 # Base m4 layer.
 # Requires GNU m4.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]