summaryrefslogtreecommitdiff
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
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.
-rw-r--r--ChangeLog11
-rw-r--r--configure.ac4
-rw-r--r--m4/include-exclude-prog.m412
3 files changed, 21 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 03cc88d41..b064df189 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2007-07-12 Jim Meyering <jim@meyering.net>
+
+ 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.
+
2007-07-11 Jim Meyering <jim@meyering.net>
If there's a GPL vN copyright comment, require that N == 3.
diff --git a/configure.ac b/configure.ac
index 07e14847e..69236c964 100644
--- a/configure.ac
+++ b/configure.ac
@@ -284,6 +284,8 @@ case " $optional_bin_progs " in
*) INSTALL_SU=no ;;
esac
+MAN=`echo "$optional_bin_progs "|sed 's/ /.1 /g;s/ $//'`
+
# Change ginstall.1 to "install.h" in $MAN.
MAN=`echo "$MAN"|sed 's/\<ginstall\.1\>/install.1/'`
@@ -292,7 +294,7 @@ MAN=`echo "$MAN"|sed 's/\<ginstall\.1\>/install.1/'`
# representing '['.
MAN=`echo "$MAN"|sed 's/\@<:@\.1//'`
-OPTIONAL_BIN_PROGS=`echo "$optional_bin_progs "|sed 's/ /\$(EXEEXT) /;s/ $//'`
+OPTIONAL_BIN_PROGS=`echo "$optional_bin_progs "|sed 's/ /\$(EXEEXT) /g;s/ $//'`
AC_SUBST(OPTIONAL_BIN_PROGS)
NO_INSTALL_PROGS_DEFAULT=$no_install_progs_default
AC_SUBST(NO_INSTALL_PROGS_DEFAULT)
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