]> git.ipfire.org Git - thirdparty/coreutils.git/commit
build: refactor how lists of coreutils programs are defined
authorStefano Lattarini <stefano.lattarini@gmail.com>
Fri, 31 Aug 2012 23:46:39 +0000 (01:46 +0200)
committerJim Meyering <meyering@redhat.com>
Sat, 1 Sep 2012 19:25:13 +0000 (21:25 +0200)
commit4f2e62ba9fd482375fdc085de71a5c947741d140
treed2af441afdd32f8f1167dab183ace72bbaeec2d6
parent1aaa8af9296c5bc7a05047f0114c9be7b3fdfea5
build: refactor how lists of coreutils programs are defined

This is in preparation of future changes.  Still, this patch
leaves the build system in a better shape; true, with more
indirections, but also with less convoluted and brittle hacks.

Unfortunately, this commit also makes some rebuild rules
incomplete; that will son be fixed by follow-up patches.

* build-aux/gen-lists-of-programs.sh: New, generates autoconf
and automake input fragments that define "lists" of all coreutils
programs, with further distinctions about how and when these
programs should be built (by default; if the system is capable
enough; only if the user asks for them explicitly).  This is
useful to avoid duplicating the definitions of these lists among
several files (at least 'configure.ac' 'src/Makefile.am'); such
duplication had proved a source of inconsistencies and bugs in
the past.  And the pre-existing way to avoid such duplication,
as implemented in 'configure.ac' before this patch, was overly
complex and brittle.
* Makefile.am (EXTRA_DIST): Distribute the new script.
* bootstrap.conf (bootstrap_post_import_hook): Run the new script
to generate 'm4/cu-progs.m4' and 'src/cu-progs.mk'.
* .gitignore: Ignore those files.
* configure.ac: Include 'm4/cu-progs.m4', and decidedly simplify
most of the program lists definition and processing accordingly.
* src/Makefile.am: Similarly include 'src/cu-progs.mk', containing
definition of variables $(default__progs), $(no_install__progs)
and $(build_if_possible__progs).  Accordingly ...
(no_install__progs, build_if_possible__progs): ... remove.
(EXTRA_DIST): Adjust definition.
Adjust a comment.
.gitignore
Makefile.am
bootstrap.conf
build-aux/gen-lists-of-programs.sh [new file with mode: 0755]
configure.ac
src/Makefile.am