[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Options --enable{,-no}-install-program
From: |
Jim Meyering |
Subject: |
Re: Options --enable{,-no}-install-program |
Date: |
Tue, 08 Jan 2008 18:46:11 +0100 |
Stepan Kasal <address@hidden> wrote:
Hi Stepan!
Happy new year :)
> 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.
Yes, that sounds 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.
Yes. I fixed that last year :-)
http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=c3cac089b1e6cc5c
> 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
Doesn't this create a chicken and egg problem?
You'd need to run configure before you can use Make, yet
you'd need to include a make-generated file in creating configure.
> 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
Remember that Automake (run before make and configure) needs to know
the list of all buildable programs. The configure option selects which
are _installed_.
> 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...
It'd be great to remove the current kludge.
If you're really motivated, there's another minor problem:
the include/exclude mechanism operates only on bin_PROGRAMS,
and not bin_SCRIPTS. That means --enable-no-install-program=groups
doesn't work, since "groups" is a script.
- Options --enable{,-no}-install-program, Stepan Kasal, 2008/01/08
- Re: Options --enable{,-no}-install-program,
Jim Meyering <=
- Re: Options --enable{,-no}-install-program, James Youngman, 2008/01/25
- Re: Options --enable{,-no}-install-program, Jim Meyering, 2008/01/25
- Re: Options --enable{,-no}-install-program, Jim Meyering, 2008/01/26
- Re: Options --enable{,-no}-install-program, James Youngman, 2008/01/26
- Re: Options --enable{,-no}-install-program, Eric Blake, 2008/01/26
- Re: Options --enable{,-no}-install-program, James Youngman, 2008/01/26
- Re: Options --enable{,-no}-install-program, Jim Meyering, 2008/01/27