Convert GNU make to use the gnulib portability library

Move content from glob/* and config/* into standard GNU directory
locations lib/* and m4/*.

Install the gnulib bootstrap script and its configuration file, and
create a bootstrap.bat file for Windows.  Update the README.git file
with new requirements and instructions for building from Git.

At this point we only install the alloca, getloadavg, and FDL modules
from gnulib.  We keep our old glob/fnmatch implementation since the
gnulib versions require significant amounts of infrastructure which
doesn't exist on Windows yet.  Further work is required here.

Due to a problem with gnulib's version of getloadavg, we need to bump
the minimum required version of automake to 1.16.1 unfortunately.

* README.git: Update instructions
* NEWS: Move developer news to a separate section
* configure.ac: Update for use with gnulib modules

* bootstrap: Bootstrap from Git workspace (import from gnulib)
* bootstrap.conf: Bootstrap configuration for GNU make
* bootstrap.bat: Bootstrap from Git workspace for Windows
* gl/modules/make-glob: Support our local fnmatch/glob implementation

* config/acinclude.m4: Move to m4/
* config/dospaths.m4: Move to m4/
* glob/fnmatch.c: Move to lib/
* glob/fnmatch.h.in: Move to lib/
* glob/glob.c: Move to lib/
* glob/glob.h.in: Move to lib/

* Makefile.am: Update for new directories
* build.template: Update for new directories
* build_w32.bat: Update for new directories
* builddos.bat: Update for new directories
* maintMakefile: Update for new directories
* makefile.com: Update for new directories
* mk/Amiga.mk: Update for new directories
* mk/Posix.mk.in: Update for new directories
* mk/VMS.mk: Update for new directories
* mk/Windows32.mk: Update for new directories
* mk/msdosdjgpp.mk: Update for new directories

* po/LINGUAS: One language per line (needed by gnulib)

* INSTALL: Remove (obtained from gnulib)
* src/alloca.c: Remove (obtained from gnulib)
* src/getloadavg.c: Remove (obtained from gnulib)
* po/Makevars: Remove (created by bootstrap)
* config/*: Remove leftover files
* glob/*: Remove leftover files
This commit is contained in:
Paul Smith
2018-07-01 12:28:25 -04:00
committed by Paul Smith
parent a7b0dfddac
commit 63b42fa235
40 changed files with 1549 additions and 2913 deletions

View File

@@ -73,62 +73,66 @@ It should build with any C compiler conforming to the ANSI C89 / ISO C90
standard.
Building From Git
-----------------
Building From Git for POSIX
---------------------------
To build GNU make from Git on POSIX systems such as GNU/Linux, you will
need to install the following extra software:
* autoconf
* automake >= 1.16.1
* gettext
* autopoint
* pkg-config
* texinfo (for makeinfo)
And any tools that those utilities require (GNU m4, Perl, etc.)
GNU make requires gnulib to provide some facilities. If you want to maintain
a local installation of gnulib you can set GNULIB_SRCDIR to point to it.
Otherwise, ./bootstrap will obtain a clone for you.
Unfortunately due to issues with gnulib's getloadavg, you must have automake
1.16.1 or above. This version is not yet widely available in GNU/Linux
package managers. If you need to install from source be sure to set
ACLOCAL_PATH to point to the pkg-config location (e.g., /usr/share/aclocal).
To build GNU make from Git, you will need Autoconf, Automake, and
Gettext, and any tools that those utilities require (GNU m4, Perl,
etc.). See the configure.ac file to find the minimum versions of each
of these tools. You will also need a copy of wget and gnulib.
When building from Git you must build in the source directory: "VPATH
builds" from remote directories are not supported. Once you've created
a distribution, of course, you can unpack it and do a VPATH build from
there.
After checking out the code, you will need to perform these steps to get
to the point where you can run "make".
After checking out the code, you will need to run the bootstrap script:
1) $ autoreconf -i
This rebuilds all the things that need rebuilding, installing
missing files as symbolic links.
You may get warnings here about missing files like README, etc.
Ignore them, they are harmless.
2) $ ./configure
Generate a Makefile
3) $ make update
Use wget to retrieve various other files that GNU make relies on,
but does not keep in its own source tree.
NB: You may need GNU make to correctly perform this step; if you use
a platform-local make you may get problems with missing files in doc/.
$ ./bootstrap
At this point you have successfully brought your Git copy of the GNU
make source directory up to the point where it can be treated
more-or-less like the official package you would get from ftp.gnu.org.
That is, you can just run:
$ make && make check && make install
$ ./configure
$ make check
$ make install
to build and install GNU make.
Windows builds from Git
-----------------------
Building From Git for Windows
-----------------------------
If you have a UNIX emulation like CYGWIN you can opt to run the general
build procedure above; it will work. Be sure to read
README.W32.template for information on options you might want to use
when running ./configure.
build procedure above; it will work. Consult README.W32.template for
information on options you might want to use when running ./configure.
If you can't or don't want to do that, then rename the file
README.W32.template to README.W32 and follow those instructions.
If you can't or don't want to do that, then first run the .\bootstrap.bat
script to prime your Git workspace:
> .\bootstrap.bat
Next, rename the file README.W32.template to README.W32 and follow those
instructions.
Creating a Package
@@ -277,16 +281,10 @@ prerequisites are available of course).
This list is eminently suitable for a quick swipe o' the mouse and a
swift click o' mouse-2 into an xterm. Go for it!
autoreconf -i
./configure
make update
make
make check
For a debugging version:
Or, for a debugging version:
./bootstrap && ./configure CFLAGS=-g && make check
autoreconf -i && ./configure CFLAGS=-g && make update && make && make check
For a release version
Or, all-in-one:
autoreconf -i && ./configure && make update && make && make check
./bootstrap && ./configure && make check