bug-gnulib
[Top][All Lists]
Advanced

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

Re: stdint generation


From: Bruno Haible
Subject: Re: stdint generation
Date: Mon, 15 Oct 2007 21:19:01 +0200
User-agent: KMail/1.5.4

Sam Steingold wrote:
> gnulib/gnulib/m4/stdint offers a multi-line sed rule for generating 
> stdint.h from stdint_.h,
> why do I need to maintain the sed command by hand?
> why can't this be done by config.status?

Two answers:

Regarding the integration in GNU clisp: Since 2004, when gnulib took stdint_.h
from clisp, gnulib has evolved a bit. Nowadays nearly all users of gnulib use
gnulib-tool to assemble the pieces from various modules into their source
code hierarchy. The old "merge diffs by hand" approach become too burdensome,
even for die-hards like Paul and me. Therefore what we recommend now is to
use gnulib-tool. In the case of clisp it can be like this:

  gnulib-tool --import --source-base=src/gllib --m4-base=src/glm4 \
                       --aux-dir=src/build-aux --no-changelog \
                       stdint stdbool ...

This will create a Makefile.am in src/gllib; therefore get familiar with
automake, and recurse from src into src/gllib before building src itself.
And of course don't forget the -Igllib option so that the generated .h files
are visible when compiling src.

Regarding gnulib itself: Modules in gnulib are made of source code in lib/,
autoconf macros in m4/, and Makefile.am rules in modules/$module. We do the
split between what goes into m4/stdint_h.m4 and what goes into modules/stdint
by considering what is most natural. Creating files is most conveniently done
in a Makefile, not in config.status. (Because config.status is not invoked
when doing "make clean", "make dist" or similar, and because expressing file
names in config.status is harder, since config.status is usually in a different
directory than the files being built.)

Bruno





reply via email to

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