bug-gnulib
[Top][All Lists]
Advanced

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

Re: gnulib-tool and line length: gl_LIBOBJS


From: Bruno Haible
Subject: Re: gnulib-tool and line length: gl_LIBOBJS
Date: Sun, 28 Jan 2007 17:00:08 +0100 (MET)
User-agent: KMail/1.5.4

Ralf Wildenhues wrote:
> > How small is this limit?
> 
> Around 20kB:
> <http://www.gnu.org/software/autoconf/manual/html_node/Long-Lines-in-Makefiles.html>

OK, and since gnulib's LIBOBJs line is currently at most 2.4 KB, we can ignore
the problem for quite some time.

$ grep -h AC_LIBOBJ m4/*.m4 | sed -e 's,^.*AC_LIBOBJ,AC_LIBOBJ,' | sort | uniq 
| sed -e 's,AC_LIBOBJ(,,' -e 's,),.obj,' | wc -c
2441

> > I can edit text files with 10000 characters per line in every editor.
> 
> AIX vi gives me:
> | "file" A line cannot be longer than 2048 characters.

Oh well. Let people install vim or emacs.

> > Adding newlines and backslashes to an AC_SUBSTed value limits its use: It
> > can only be used in particular places of Makefiles.
> 
> Which other places do you need gl_LIBOBJ at?  Sorry, I fail to see the
> problem here.

The problem is maintainability (someday we may want to use @gl_LIBOBJS@
directly in the statements of a Makefile rule, for example), and walking
on thin ice (newlines and backslashes inside AC_SUBSTed values are risky).

> > If the line limit is a problem, I'd prefer to first move the unconditional
> > AC_LIBOBJs to the module description. They represent more than half of
> > gnulib's AC_LIBOBJ invocations.
> 
> Sorry, I don't understand this comment.

I mean patches like this one:

2007-01-28  Bruno Haible  <address@hidden>

        * modules/mbchar (Makefile.am): Add mbchar.c to lib_SOURCES.
        * m4/mbchar.m4 (gl_MBCHAR): Remove AC_LIBOBJ invocation.

--- modules/mbchar      16 Jan 2007 16:31:23 -0000      1.9
+++ modules/mbchar      28 Jan 2007 15:58:40 -0000
@@ -16,6 +16,7 @@
 gl_MBCHAR
 
 Makefile.am:
+lib_SOURCES += mbchar.c
 
 Include:
 #include "mbchar.h"
--- m4/mbchar.m4        16 Jan 2007 16:31:23 -0000      1.6
+++ m4/mbchar.m4        28 Jan 2007 15:58:40 -0000
@@ -1,4 +1,4 @@
-# mbchar.m4 serial 5
+# mbchar.m4 serial 6
 dnl Copyright (C) 2005-2007 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -10,5 +10,4 @@
 AC_DEFUN([gl_MBCHAR],
 [
   AC_REQUIRE([AC_GNU_SOURCE])
-  AC_LIBOBJ([mbchar])
 ])





reply via email to

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