[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
AC_DEFINE whitespace
From: |
Eric Blake |
Subject: |
AC_DEFINE whitespace |
Date: |
Tue, 11 Nov 2008 19:16:55 +0000 (UTC) |
User-agent: |
Loom/3.14 (http://gmane.org/) |
I'm debating about committing this patch. It shaves off a lot of blank lines
in configure output. But I also found at least one use case in the wild that
changes semantics if I commit it:
http://lists.gnu.org/archive/html/bug-coreutils/2008-11/msg00049.html
By making AC_DEFINE no longer force a leading newline, users that define a
shell variable then call AC_DEFINE on the same line have become localized
assignments, rather than persistent. How much should we worry about breaking
existing scripts, given that I did not see much common use of
var=val AC_DEFINE
in my searching?
From: Eric Blake <address@hidden>
Date: Tue, 11 Nov 2008 10:34:08 -0700
Subject: [PATCH] Whitespace reduction in configure.
* lib/autoconf/general.m4 (_AC_INIT_PREPARE, AC_CHECK_FILES):
Avoid empty lines.
* lib/autoconf/autoheader.m4 (AH_VERBATIM): Likewise.
* NEWS: Mention the fallout.
Signed-off-by: Eric Blake <address@hidden>
---
ChangeLog | 6 ++++++
NEWS | 4 ++++
lib/autoconf/autoheader.m4 | 5 ++---
lib/autoconf/general.m4 | 13 ++++++-------
4 files changed, 18 insertions(+), 10 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index fc611ae..7a0e154 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2008-11-11 Eric Blake <address@hidden>
+ Whitespace reduction in configure.
+ * lib/autoconf/general.m4 (_AC_INIT_PREPARE, AC_CHECK_FILES):
+ Avoid empty lines.
+ * lib/autoconf/autoheader.m4 (AH_VERBATIM): Likewise.
+ * NEWS: Mention the fallout.
+
Reduce forks in AC_DEFINE.
* lib/autoconf/general.m4 (_AC_DEFINE_Q_PRINT): New macro.
(_AC_DEFINE_Q): Use it to avoid forks for all AC_DEFINE and most
diff --git a/NEWS b/NEWS
index f5f3d6e..d8cb06d 100644
--- a/NEWS
+++ b/NEWS
@@ -43,6 +43,10 @@ GNU Autoconf NEWS - User visible changes.
the call site, but since most users did not add dnl, this generally
results in fewer empty lines in configure.
+** The autoconf macros AC_DEFINE and AC_DEFINE_UNQUOTED now output
+ fewer blank lines. This generally is not a problem, but changes
+ semantics for any users that did 'var=value AC_DEFINE(...)'.
+
* Major changes in Autoconf 2.63 (2008-09-09) [stable]
Released by Eric Blake, based on git versions 2.62.*.
diff --git a/lib/autoconf/autoheader.m4 b/lib/autoconf/autoheader.m4
index 185c0e4..dfc5f77 100644
--- a/lib/autoconf/autoheader.m4
+++ b/lib/autoconf/autoheader.m4
@@ -2,7 +2,7 @@
# Interface with autoheader.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002 Free Software Foundation, Inc.
+# 2002, 2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -68,8 +68,7 @@ m4_define([AH_OUTPUT], [])
# Quote for Perl '' strings, which are those used by Autoheader.
m4_define([AH_VERBATIM],
[AS_LITERAL_IF([$1],
- [AH_OUTPUT([$1], AS_ESCAPE([[$2]], [\\'']))])
-])
+ [AH_OUTPUT([$1], AS_ESCAPE([[$2]], [\\'']))])])
# AH_TEMPLATE(KEY, DESCRIPTION)
diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4
index d60e302..295b531 100644
--- a/lib/autoconf/general.m4
+++ b/lib/autoconf/general.m4
@@ -1333,16 +1333,16 @@ AS_ECHO(["/* confdefs.h */"]) > confdefs.h
# Predefined preprocessor variables.
AC_DEFINE_UNQUOTED([PACKAGE_NAME], ["$PACKAGE_NAME"],
- [Define to the full name of this package.])
+ [Define to the full name of this package.])dnl
AC_DEFINE_UNQUOTED([PACKAGE_TARNAME], ["$PACKAGE_TARNAME"],
- [Define to the one symbol short name of this package.])
+ [Define to the one symbol short name of this package.])dnl
AC_DEFINE_UNQUOTED([PACKAGE_VERSION], ["$PACKAGE_VERSION"],
- [Define to the version of this package.])
+ [Define to the version of this package.])dnl
AC_DEFINE_UNQUOTED([PACKAGE_STRING], ["$PACKAGE_STRING"],
- [Define to the full name and version of this package.])
+ [Define to the full name and version of this package.])dnl
AC_DEFINE_UNQUOTED([PACKAGE_BUGREPORT], ["$PACKAGE_BUGREPORT"],
[Define to the address where bug reports for this package
- should be sent.])
+ should be sent.])dnl
# Let the site file select an alternate cache file if it wants to.
AC_SITE_LOAD
@@ -2740,8 +2740,7 @@ m4_define([_AC_CHECK_FILES],
# ACTION-IF-FOUND or ACTION-IF-NOT-FOUND. For files that exist, also
# provide the preprocessor variable HAVE_FILE.
AC_DEFUN([AC_CHECK_FILES],
-[m4_map_args_w([$1], [AC_CHECK_FILE(_$0(], [)[
-$2], [$3])])])
+[m4_map_args_w([$1], [AC_CHECK_FILE(_$0(], [)[$2], [$3])])])
## ------------------------------- ##
--
1.6.0.2
- AC_DEFINE whitespace,
Eric Blake <=