bug-gnulib
[Top][All Lists]
Advanced

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

[PATCH] build: speed up configure for releases


From: Eric Blake
Subject: [PATCH] build: speed up configure for releases
Date: Mon, 24 Jan 2011 11:31:46 -0700

* gnulib: Update to latest, for posixcheck improvement.
* configure.ac (gl_ASSERT_NO_GNULIB_POSIXCHECK): Conditionally
define, according to whether git-version-gen output included '-'.
---

What do you think of this patch?

It speeds up ./configure of a release tarball (no time at all
spent on any HAVE_RAW_DECL_* checks), while defaulting to
leaving that in during development.  It even makes the resulting
configure file smaller for the tarball!

About the only other thing I could think of is adding a new
./configure option:

./configure --enable-posix-check

and a shell test that skips the body of gl_WARN_ON_USE_PREPARE
if that option is not in effect, but which (unfortunately) has
to keep the full bulk of the configure tests around, even though
they are not executed without the configure option.  In other
words, a configure option is not the same as an m4 option, which
is why this patch goes for an m4 option, but automates it based
on whether the version indicates an intra-release devel version.

Hmm, it may still make sense to do both things - make it possible
to completely elide HAVE_RAW_DECL_* (this patch) for configure
built for a tarball, as well as to provide a configure option
(rather than the current ad-hoc approach of
make CFLAGS=-DGNULIB_POSIXCHECK=1) to make it more apparent when
a developer is explicitly building for posix check purposes
and to thus speed up builds when the option is not in effect.

 configure.ac |    6 ++++++
 gnulib       |    2 +-
 2 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/configure.ac b/configure.ac
index bc9933d..4e781b7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -35,6 +35,12 @@ AC_CONFIG_HEADERS([lib/config.h:lib/config.hin])
 AM_INIT_AUTOMAKE([1.11.1 dist-xz color-tests parallel-tests])
 AM_SILENT_RULES([yes]) # make --enable-silent-rules the default.

+dnl Allow the use of GNULIB_POSIXCHECK during development, but avoid
+dnl the configure time spent on otherwise unused HAVE_RAW_DECL_*
+dnl in released builds.
+m4_if(m4_index(m4_defn([AC_PACKAGE_VERSION]), [-]), [-1],
+  [gl_ASSERT_NO_GNULIB_POSIXCHECK])
+
 AC_PROG_CC_STDC
 AM_PROG_CC_C_O
 AC_PROG_CPP
diff --git a/gnulib b/gnulib
index ff4bb04..5e5009f 160000
--- a/gnulib
+++ b/gnulib
@@ -1 +1 @@
-Subproject commit ff4bb04bec0c8d7834bfb0590d6de08fa0ceefd0
+Subproject commit 5e5009f839875220d5dec7abdf5cf53d919f4d42
-- 
1.7.3.4




reply via email to

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