From 4020031d36d40f46f56f33664082d530d30a4f02 Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Tue, 10 Oct 2006 02:56:18 +0000 Subject: [PATCH] * src/m4.c (main): Defer debugfile until after --help. * configure.ac (AC_INIT): Bump version number. * NEWS: Start changes of 1.4.7a. --- ChangeLog | 6 ++++++ NEWS | 6 ++++++ configure.ac | 2 +- src/m4.c | 9 ++++++--- 4 files changed, 19 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index c6befd89..daac0e28 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-10-09 Eric Blake + + * src/m4.c (main): Defer debugfile until after --help. + * configure.ac (AC_INIT): Bump version number. + * NEWS: Start changes of 1.4.7a. + 2006-09-25 Eric Blake Release 1.4.7: diff --git a/NEWS b/NEWS index 600c0c8f..0426a597 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,12 @@ GNU M4 NEWS - User visible changes. Copyright (C) 1992, 1993, 1994, 2004, 2005, 2006 Free Software Foundation, Inc. +Version 1.4.8 - ?? ??? 2006, by ?? (CVS version 1.4.7a) + +* The `--help' and `--version' command line options now consistently + override all earlier options. For example, `m4 --debugfile=trace + --help' now no longer accidentally creates an empty file `trace'. + Version 1.4.7 - 25 September 2006, by Eric Blake (CVS version 1.4.6a) * Fix regression from 1.4.5 in handling a file that ends in a macro diff --git a/configure.ac b/configure.ac index 10ff6fd6..582f27c4 100644 --- a/configure.ac +++ b/configure.ac @@ -18,7 +18,7 @@ # 02110-1301 USA AC_PREREQ([2.60]) -AC_INIT([GNU M4], [1.4.7], [bug-m4@gnu.org]) +AC_INIT([GNU M4], [1.4.7a], [bug-m4@gnu.org]) AM_INIT_AUTOMAKE([1.9.6 dist-bzip2 gnu]) PACKAGE=$PACKAGE_TARNAME; AC_SUBST([PACKAGE]) VERSION=$PACKAGE_VERSION; AC_SUBST([VERSION]) diff --git a/src/m4.c b/src/m4.c index 650670f0..3404793e 100644 --- a/src/m4.c +++ b/src/m4.c @@ -278,6 +278,7 @@ main (int argc, char *const *argv, char *const *envp) FILE *fp; boolean read_stdin = FALSE; boolean interactive = FALSE; + const char *debugfile = NULL; const char *frozen_file_to_read = NULL; const char *frozen_file_to_write = NULL; @@ -409,8 +410,8 @@ main (int argc, char *const *argv, char *const *envp) or later is more widely established, as such a warning would interfere with all earlier versions of autoconf. */ case DEBUGFILE_OPTION: - if (!debug_set_output (optarg)) - error (0, errno, "%s", optarg); + /* Don't call debug_set_output here, as it has side effects. */ + debugfile = optarg; break; case 's': @@ -439,7 +440,9 @@ Written by Rene' Seindal.\n\ defines = head; - /* Do the basic initialisations. */ + /* Do the basic initializations. */ + if (debugfile && !debug_set_output (debugfile)) + M4ERROR ((0, errno, "cannot set debug file `%s'", debugfile)); input_init (); output_init (); -- 2.11.4.GIT