From 78adb282a743a326ccfb137c537fcc793e1ebb08 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sat, 14 Jul 2007 10:02:57 +0200 Subject: [PATCH] Change interface: make 2nd param _space_-separated, not comma-separated * m4/include-exclude-prog.m4 (gl_INCLUDE_EXCLUDE_PROG): Remove now- unnecessary use of tr. Improve comments. * configure.ac: Adjust caller, as well as the code that ensures the 2nd parameter stays in sync with the list in src/Makefile.am. --- ChangeLog | 9 +++++++++ configure.ac | 15 +++++++-------- m4/include-exclude-prog.m4 | 6 +++--- 3 files changed, 19 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5d570e45ae..48224ee57d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2007-07-14 Jim Meyering + + Change interface: make 2nd param _space_-separated, not comma-separated + * m4/include-exclude-prog.m4 (gl_INCLUDE_EXCLUDE_PROG): Remove now- + unnecessary use of tr. + Improve comments. + * configure.ac: Adjust caller, as well as the code that ensures the + 2nd parameter stays in sync with the list in src/Makefile.am. + 2007-07-14 Karel Zak * m4/include-exclude-prog.m4 (gl_REMOVE_PROG): Fix typo: s/$2/$1/. diff --git a/configure.ac b/configure.ac index 6b5f37388a..6b5cba4af1 100644 --- a/configure.ac +++ b/configure.ac @@ -270,16 +270,15 @@ t=`sed -n '/^'$v' =/,/[[^\]]$/p' $mk \ no_install_progs_default=`echo "$t"|sed 's/ $//'` # Unfortunately, due to the way autoconf's AS_HELP_STRING works, the -# list of default-not-installed programs, "arch,su", must appear in two -# places: in this file below, and in $mk. Simply using comma-separated -# variant of "$no_install_progs_default" cannot work. And we can't -# substitute the names into $mk because automake needs the literals, too. +# list of default-not-installed programs, "arch su", must appear in two +# places: in this file below, and in $mk. Using "$no_install_progs_default" +# below cannot work. And we can't substitute the names into $mk because +# automake needs the literals, too. # The compromise is to ensure that the space-separated list extracted -# above matches the comma-separated list below. +# above matches the literal 2nd argument below. c="$srcdir/configure.ac" t=`sed -n '/^g''l_INCLUDE_EXCLUDE_PROG(.* [\[\(.*\)\]])/s//\1/p' $c` -u=`echo "$t"|sed 's/,/ /g'` -case $u in +case $t in $no_install_progs_default) ;; *) AC_MSG_ERROR([[internal error: g'l_INCLUDE_EXCLUDE_PROG's 2nd arg, $t, does not match the list of default-not-installed programs @@ -293,7 +292,7 @@ esac # "don't-install" requests. # I.e., add any program name specified via --enable-install-program=..., and # remove any program name specified via --enable-no-install-program=... -gl_INCLUDE_EXCLUDE_PROG([optional_bin_progs], [arch,su]) +gl_INCLUDE_EXCLUDE_PROG([optional_bin_progs], [arch su]) # Set INSTALL_SU if su installation has been requested via # --enable-install-program=su. diff --git a/m4/include-exclude-prog.m4 b/m4/include-exclude-prog.m4 index 32447f5928..e5612c69fd 100644 --- a/m4/include-exclude-prog.m4 +++ b/m4/include-exclude-prog.m4 @@ -24,13 +24,13 @@ AC_DEFUN([gl_REMOVE_PROG], # Given the name of a variable containing a space-separated list of # install-by-default programs and the list of do-not-install-by-default -# programs, modify the former variable to reflect "don't-install" and +# programs, modify the former variable to reflect "no-install" and # "do-install" requests. # -# Usage: gl_INCLUDE_EXCLUDE_PROG([prog_list_var_name], [NI_prog1]) +# Usage: gl_INCLUDE_EXCLUDE_PROG([prog_list_var_name], [no_inst_prog_list]) AC_DEFUN([gl_INCLUDE_EXCLUDE_PROG], [{ - gl_no_install_progs_default=`echo "$2"|tr -s , ' '` + gl_no_install_progs_default='$2' AC_ARG_ENABLE([install-program], [AS_HELP_STRING([--enable-install-program=PROG_LIST], [install the programs in PROG_LIST (comma-separated, -- 2.47.2