summaryrefslogtreecommitdiff
path: root/m4/include-exclude-prog.m4
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2007-07-12 11:41:32 +0200
committerJim Meyering <jim@meyering.net>2007-07-12 11:41:32 +0200
commit13b2b9c3428f28802dcc98b29e4f6f96771326b8 (patch)
tree63361236ff7827ed8aa89d0ef938a442682afa91 /m4/include-exclude-prog.m4
parente345806d939845cc3761a42b3a7490c267735b8b (diff)
downloadcoreutils-13b2b9c3428f28802dcc98b29e4f6f96771326b8.tar.xz
Clean up include-exclude-prog.m4.
* m4/include-exclude-prog.m4 (gl_ADD_PROG): Don't modify MAN. (gl_REMOVE_PROG): Likewise. Add omitted "\>" in sed regexp. Remove any leading or trailing spaces. (gl_ADD_PROG): Remove any leading space. * configure.ac: Instead, derive $MAN from $optional_bin_progs. Append $(EXEEXT) to *all* names, not just the first one.
Diffstat (limited to 'm4/include-exclude-prog.m4')
-rw-r--r--m4/include-exclude-prog.m412
1 files changed, 7 insertions, 5 deletions
diff --git a/m4/include-exclude-prog.m4 b/m4/include-exclude-prog.m4
index c48c70b67..387386dfe 100644
--- a/m4/include-exclude-prog.m4
+++ b/m4/include-exclude-prog.m4
@@ -1,4 +1,4 @@
-#serial 1
+#serial 2
dnl Copyright (C) 2007 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -9,15 +9,17 @@ dnl From Jim Meyering.
# Usage: gl_ADD_PROG([prog_list_var_name], [prog_name])
AC_DEFUN([gl_ADD_PROG],
[{
- $1="$$1 $2"
- MAN="$MAN $2.1"
+ if test -z "$$1"; then
+ $1=$2
+ else
+ $1="$$1 $2"
+ fi
}])
# Usage: gl_REMOVE_PROG([prog_list_var_name], [prog_name])
AC_DEFUN([gl_REMOVE_PROG],
[{
- $1=`echo "$$1"|sed 's/\<'"$1"'//;s/ */ /g'`
- MAN=`echo "$MAN"|sed 's/\<'"$1"'\.1//'`
+ $1=`echo "$$1"|sed 's/\<'"$1"'\>//;s/ */ /g;s/^ *//;s/ *$//'`
}])
# Given the name of a variable containing a space-separated list of