bug-coreutils
[Top][All Lists]
Advanced

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

Options --enable{,-no}-install-program


From: Stepan Kasal
Subject: Options --enable{,-no}-install-program
Date: Tue, 8 Jan 2008 18:22:38 +0100
User-agent: Mutt/1.5.17 (2007-11-01)

Dear developers, dear Jim,

Karel has pointed me to the new options of coreutils' configure:
  --enable-install-program=PROG_LIST
                          install the programs in PROG_LIST (comma-separated,
                          default: none)
  --enable-no-install-program=PROG_LIST
                          do NOT install the programs in PROG_LIST
                          (comma-separated, default: arch hostname su)

A few comments:

0) I would call it --ena...-programs, i.e., with plural at the end,
as it seems to match the meaning better.

1) --enable-no-install-program ... default: arch hostname su

No, this is not the default value of this option.  The dafault value
would have to use commas, not spaces, as separators.  More
importantly, if this were the default value, then
  --enable-no-install-program=hostname,su
would be a slight modification of the default, so it would behave
almost as the default, with the only difference that "arch" is
installed.  This is not what your code does.

"arch hostname su" is the set of programs which are not installed by
default.  It should be documented somewhere, but it may be outside
./configure --help.

2) The set of programs that are not installed by default is specified
on two places: configure.ac and src/Makefile.am.  configure checks
that the two match, each time a user builds coreutils..

I cannot agree with this.  I believe the solution is to have one
primary source definig the set.  There are several ways to achieve
that:

2a) src/Makefile.am might be the primary source.  configure.ac would
contains something like:

m4_include(excluded.m4)
gl_INCLUDE_EXCLUDE_PROG([optional_bin_progs], EXCLUDED_BY_DEFAULT)

while excluded.m4 would contain:

m4_define([EXCLUDED_BY_DEFAULT], [arch hostname su])

excluded.m4 would be generated from src/Makefile.am, by a rule
declared in Makefile.am

2b) Vice versa: configure.ac would be the primary source, and
src/Makefile.am would contain:
        include $(top_srcdir)/excluded.am
which would be generated from configure.ac by a rule in Makefile.am

2c) It should also be possible to create a separate file,
excluded.magic, which would get included by both configure.ac and
src/Makefile.am.  It would be a bit tricky, though.

I could write a patch for 2), but I think that the answer to 1) might
make it irrelevant, so I'm not rushing in...

Hope you find these comments interesting,
        Stepan




reply via email to

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