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: Eli Zaretskii
Subject: Re: convert regex.c, strftime.c mktime.c to standard C
Date: Sat, 20 Nov 2010 19:19:37 +0200

> From: Bruno Haible <address@hidden>
> Date: Sat, 20 Nov 2010 16:43:52 +0100
> Cc: address@hidden
> 
> > > 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.
> > 
> > Of course, that's what I meant.
> 
> This is not the documented way how gnulib is meant to be used. The way
> to use gnulib is to take its code and autoconf macros as a unit, for
> each module.
> 
> Emacs uses an Autoconf configure.in. Autoconf makes it unnecessary to
> "run the configury stuff on each supported platform, to get all the
> gazillions of preprocessor symbols defined correctly". The approach you
> describe is the one in use before Autoconf came along.

I really don't understand what you are saying.  The configury needs to
be run, but it doesn't?

What I meant is that the only documented way of building modules from
gnulib is through gnulib-tool, which is a Unix shell script.  What
exactly it does is not explained anywhere in a way that could be used
to manually collect the module's dependencies, nor did I find an
easily accessible information about how to do that without
gnulib-tool.  The only clearly documented way of getting and building
a module is what is in "Initial import", which doesn't say a word
about how to do this stuff without gnulib-tool.

Then there's the Makefile.am stuff; Emacs doesn't use that.

It's probably okay to run all this on several Unix platforms (I only
tried on GNU/Linux, so I wouldn't know), but the task of figuring out
this on Windows is daunting, even after reading the whole of
gnulib-tool.

In this thread, we are talking about replacing 3 modules in Emacs with
their newer versions.  These modules constitute 5 files in the Emacs
source tree, and have a few tests for them in configure.in.  Ideally,
the job of replacing them would mean:

  . replace the files with their new versions
  . add additional files that these 5 depend on, if any; modify
    src/Makefile.in as needed
  . maybe add some tests to configure.in
  . figure out what is needed for non-Posix platforms
  . test on supported platforms

If I would volunteer to do this job, how would I go about it?  And
where do I find some documentation that would help me do it?

Now, maybe I missed something in the docs.  Or maybe someone who knows
a lot about how the gnulib build process works can find their way
through all this.  But please don't make it sound like an easy job for
Joe Random Hacker.

> > And neither is MinGW, AFAICS, at least not without using MSYS, which
> > is not how Emacs works.
> 
> Not true. mingw is supported by about 98% of gnulib (see the documentation
> at http://www.gnu.org/software/gnulib/manual/).

A more specific pointer would be appreciated.  The manual is very
large, but there's no "MinGW" in the index, nor "Windows", nor even
"Installation".  What I found in "Initial import" says nothing about
building on Windows.

> And, as you might know, there are 3 ways to build binaries for mingw:
>   - using MSYS,
>   - from Cygwin,
>   - cross-compiling from Unix.

Emacs on Windows builds natively with MinGW, it doesn't use any of the
above.  See nt/INSTALL in the Emacs distribution.  There's a single
configure.bat file, a config.nt file that gets edited into
src/config.h and a bunch of makefile.w32-in (which only exist because
we still support NMake in addition to GNU Make).  The build itself
requires only 3 programs that don't exist on a Windows box: rm, mv,
and cp (and makeinfo, if you build development sources out of the bzr
repo).  That's it.

> Several packages that rely on gnulib have build instructions for mingw.
> Such as this one:
> <http://git.savannah.gnu.org/gitweb/?p=gettext.git;a=blob;f=README.woe32;hb=HEAD>

Which says to install Cygwin.  No, thanks.  We don't want to ask
Windows users to do that, just to build Emacs with MinGW.



reply via email to

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