From: Roland McGrath Date: Sun, 26 May 1996 23:43:22 +0000 (+0000) Subject: Sun May 26 19:07:15 1996 Roland McGrath X-Git-Tag: fsf-origin~134 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=918ed87366b107a6589f2391fdead462764da9d1;p=thirdparty%2Fautoconf.git Sun May 26 19:07:15 1996 Roland McGrath * autoheader.sh: Put $syms in a temporary file and use fgrep -f. --- diff --git a/autoheader.in b/autoheader.in index abbc98350..83c5c02cd 100644 --- a/autoheader.in +++ b/autoheader.in @@ -1,6 +1,6 @@ #! /bin/sh # autoheader -- create `config.h.in' from `configure.in' -# Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc. +# Copyright (C) 1992, 1993, 1994, 1996 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -23,8 +23,8 @@ # the given template file. usage="\ -Usage: autoheader [-h] [--help] [-m dir] [--macrodir=dir] - [-l dir] [--localdir=dir] [--version] [template-file]" +Usage: autoheader [-h] [--help] [-m dir] [--macrodir=dir] + [-l dir] [--localdir=dir] [--version] [template-file]" # NLS nuisances. # Only set `LANG' and `LC_ALL' to "C" if already set. @@ -45,7 +45,7 @@ localdir=. show_version=no while test $# -gt 0 ; do - case "${1}" in + case "${1}" in -h | --help | --h* ) echo "${usage}"; exit 0 ;; --localdir=* | --l*=* ) @@ -59,7 +59,7 @@ while test $# -gt 0 ; do --macrodir=* | --m*=* ) AC_MACRODIR="`echo \"${1}\" | sed -e 's/^[^=]*=//'`" shift ;; - -m | --macrodir | --m* ) + -m | --macrodir | --m* ) shift test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; } AC_MACRODIR="${1}" @@ -176,7 +176,16 @@ if test -n "$syms"; then } H' | sed -e 's/@@*/@/g' | # Select each paragraph that refers to a symbol we picked out above. - fgrep "$syms" | + # Some fgrep's have limits on the number of lines that can be in the + # pattern on the command line, so use a temporary file containing the + # pattern. + (fgrep_tmp=${TMPDIR-/tmp}/autoh$$ + trap "rm -f $fgrep_tmp; exit 1" 1 2 15 + cat > $fgrep_tmp <&2; exit 1; } AC_MACRODIR="${1}" @@ -176,7 +176,16 @@ if test -n "$syms"; then } H' | sed -e 's/@@*/@/g' | # Select each paragraph that refers to a symbol we picked out above. - fgrep "$syms" | + # Some fgrep's have limits on the number of lines that can be in the + # pattern on the command line, so use a temporary file containing the + # pattern. + (fgrep_tmp=${TMPDIR-/tmp}/autoh$$ + trap "rm -f $fgrep_tmp; exit 1" 1 2 15 + cat > $fgrep_tmp <&2; exit 1; } AC_MACRODIR="${1}" @@ -176,7 +176,16 @@ if test -n "$syms"; then } H' | sed -e 's/@@*/@/g' | # Select each paragraph that refers to a symbol we picked out above. - fgrep "$syms" | + # Some fgrep's have limits on the number of lines that can be in the + # pattern on the command line, so use a temporary file containing the + # pattern. + (fgrep_tmp=${TMPDIR-/tmp}/autoh$$ + trap "rm -f $fgrep_tmp; exit 1" 1 2 15 + cat > $fgrep_tmp <