emacs-devel
[Top][All Lists]
Advanced

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

Re: convert regex.c, strftime.c mktime.c to standard C


From: Bruno Haible
Subject: Re: convert regex.c, strftime.c mktime.c to standard C
Date: Sat, 20 Nov 2010 12:57:03 +0100
User-agent: KMail/1.9.9

Eli Zaretskii wrote:
> The build system used by gnulib is not just Makefile.in and
> config.h.in.  ... it requires to run the configury stuff on each supported
> platform, to get all the gazillions of preprocessor symbols defined
> correctly.

This statement is very misleading. The build system used by gnulib is
based on autoconf macros and Makefile.am. The developers of gnulib test
it on various platforms. But as a user of gnulib, you don't need to do
this. gnulib did it for you already.

Maybe you meant that retrofitting gnulib's code into the Emacs build
system with src/s/ and src/m/ would require to run the configury stuff
on each supported platform. Sure, that would be the case if you intend
to reuse just the C code of gnulib and ignore the corresponding autoconf
macros. But that's not the way gnulib is meant to be used.

The recommended approach for using gnulib (in the case of Emacs,
which doesn't use Automake so far) is create a new subdirectory, say
gnulib-lib/, with a Makefile.am, and run 'gnulib-tool', telling it to
import a set of modules (such as 'strftime') into that directory.
gnulib-tool prints a set of instructions for adjusting configure.ac
(or configure.in). If you follow these instructions, the resulting code
configures, compiles, links, and runs fine on all supported platforms.

Note that DJGPP is not a supported platform of gnulib. If you want DJGPP
support, you may need to work with the gnulib developers in a constructive
way.

> Finding strftime.c in gnulib is indeed trivial, but making it part of
> Emacs that compiles on all supported platforms is not just "some
> work", it's a formidable job, IMO.

For someone who's familiar with gnulib, it should be the job of 1 hour,
and for someone not familiar with gnulib, it should be done in 1-2 days.

Bruno



reply via email to

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