bug-gnulib
[Top][All Lists]
Advanced

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

Re: Mutilated stdlib.h


From: Eric Blake
Subject: Re: Mutilated stdlib.h
Date: Fri, 01 Apr 2011 16:42:07 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.15) Gecko/20110307 Fedora/3.1.9-0.39.b3pre.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.9

On 04/01/2011 04:22 PM, Karl Berry wrote:
>     Remember to always do a "make distclean" before running gnulib-tool or
>     autoreconf. Otherwise such things can happen.
> 
> 1. I see nothing about this in the gnulib manual.  Can the cases when
> "make distclean" is necessary be defined/narrowed at all?  
> 
> 2. It is disheartening to read this.  The autotools go to a lot of
> trouble to make it possible to rerun make and rebuild the 
> infrastructure without resorting to the big hammer of make *clean.
> This is very useful.  So gnulib breaks that now?

I've run into problems most frequently with two types of related
changes: 1. gnulib changed the header.in.h template file for a
replacement header, but because we (intentionally?) don't have a
Makefile dependency, the header.h generated file is not rebuilt and
doesn't pick up the changes.  2. gnulib changed an m4 test such that my
system that used to pass (on lax rules) now fails (on stricter tests);
or in reverse a test that used to fail (on an older system) now passes
(after upgrading the system fixed the bug), but because the header.h
generated file is not rebuilt to reflect those new m4 test outcomes, the
header file causes incorrect compilation.

In _both_ cases, my personal solution is less drastic than 'make
distclean' - it has always been sufficient to remove _just_ the
generated replacement headers and rebuild incrementally.  It tends to
rebuild everything, since replacement system headers are make
prerequisite to so many other files, but at least I didn't lose my
config.status files and generated documentation files, so it is slightly
faster.

It would be really nice if gnulib-tool
--update/--add-import/--remove-import could be taught to automatically
remove all generated headers, which would solve the above problem and
still allow incremental builds without needing an intervening 'make
distclean'.  It would also be nice if projects that use
build-aux/bootstrap could get the same behavioral help (they use
gnulib-tool --import to start from scratch every time, so it would be
bootstrap rather than gnulib-tool responsible for deleting
possibly-stale replacement headers; but the net effect should be the same).

-- 
Eric Blake   address@hidden    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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