]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* Makefile.am (.m4.m4f): Check that processing produces only
authorAkim Demaille <akim@epita.fr>
Fri, 3 Nov 2000 14:01:58 +0000 (14:01 +0000)
committerAkim Demaille <akim@epita.fr>
Fri, 3 Nov 2000 14:01:58 +0000 (14:01 +0000)
comments and empty lines.
Check that freezing produced no output.
* m4sugar.m4: Commentize what was not.
* m4sh.m4: Likewise.
* aclang.m4: Formatting changes.

ChangeLog
Makefile.am
Makefile.in
aclang.m4
lib/autoconf/c.m4
lib/autoconf/fortran.m4
lib/autoconf/lang.m4
lib/m4sugar/m4sh.m4
lib/m4sugar/m4sugar.m4
m4sh.m4
m4sugar.m4

index 622aac0142e2a29d91810e5113c9e144c95ddbc5..001793ca4c67ec18734a4957672bb744d59bcf5e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+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
index deebca95d6de87d5a746fadf0656c3586b75dbd1..ab897187bfb5f13de03aca2e7f96d24eb46dfff8 100644 (file)
@@ -144,8 +144,33 @@ editpl = sed \
 ## 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 411a7fe6badc8a8c637efcc6e06ca9032a1a85c4..0720087aa7c0ef9d0ed47c77557d5449ae5bd877 100644 (file)
@@ -455,8 +455,32 @@ $(bin_SCRIPTS): configure.in
        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)
 
index 9a6ccc8fdc344b2ae5d0041e2afe9bc8f608096f..1b8c970db7ba78147bf97d6c6ba245550015540f 100644 (file)
--- a/aclang.m4
+++ b/aclang.m4
@@ -1475,7 +1475,7 @@ if test -z "$ac_cv_prog_f77_v"; then
 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 @@ ifelse(m4_index([$1],[_]),-1,[],
 [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 9a6ccc8fdc344b2ae5d0041e2afe9bc8f608096f..1b8c970db7ba78147bf97d6c6ba245550015540f 100644 (file)
@@ -1475,7 +1475,7 @@ if test -z "$ac_cv_prog_f77_v"; then
 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 @@ ifelse(m4_index([$1],[_]),-1,[],
 [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 9a6ccc8fdc344b2ae5d0041e2afe9bc8f608096f..1b8c970db7ba78147bf97d6c6ba245550015540f 100644 (file)
@@ -1475,7 +1475,7 @@ if test -z "$ac_cv_prog_f77_v"; then
 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 @@ ifelse(m4_index([$1],[_]),-1,[],
 [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 9a6ccc8fdc344b2ae5d0041e2afe9bc8f608096f..1b8c970db7ba78147bf97d6c6ba245550015540f 100644 (file)
@@ -1475,7 +1475,7 @@ if test -z "$ac_cv_prog_f77_v"; then
 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 @@ ifelse(m4_index([$1],[_]),-1,[],
 [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 7337a9fc89b31db1590e660a3b5f33f6454e55dc..e62e1701369d03aee94277cc2d97433383ab83e9 100644 (file)
@@ -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 58f94a8974e6ea613237f1aee3467c29e6cf33ba..c9889e09410fe5434688328880095a6d16dbce9d 100644 (file)
@@ -1,4 +1,4 @@
-divert(-1)                                                   -*- Autoconf -*-
+divert(-1)#                                                  -*- Autoconf -*-
 # This file is part of Autoconf.
 # Base m4 layer.
 # Requires GNU m4.
diff --git a/m4sh.m4 b/m4sh.m4
index 7337a9fc89b31db1590e660a3b5f33f6454e55dc..e62e1701369d03aee94277cc2d97433383ab83e9 100644 (file)
--- a/m4sh.m4
+++ b/m4sh.m4
@@ -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 58f94a8974e6ea613237f1aee3467c29e6cf33ba..c9889e09410fe5434688328880095a6d16dbce9d 100644 (file)
@@ -1,4 +1,4 @@
-divert(-1)                                                   -*- Autoconf -*-
+divert(-1)#                                                  -*- Autoconf -*-
 # This file is part of Autoconf.
 # Base m4 layer.
 # Requires GNU m4.