]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Sun May 26 19:07:15 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
authorRoland McGrath <roland@gnu.org>
Sun, 26 May 1996 23:43:22 +0000 (23:43 +0000)
committerRoland McGrath <roland@gnu.org>
Sun, 26 May 1996 23:43:22 +0000 (23:43 +0000)
* autoheader.sh: Put $syms in a temporary file and use fgrep -f.

autoheader.in
autoheader.sh
bin/autoheader.in

index abbc983500799fd7ea3ed36088b396b2d7528eea..83c5c02cdb4e35c599c4c23f6d7369daba81e739 100644 (file)
@@ -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 <<EOF
+$syms
+EOF
+    fgrep -f $fgrep_tmp
+    rm -f $fgrep_tmp) |
    tr @ \\012
 fi
 
index abbc983500799fd7ea3ed36088b396b2d7528eea..83c5c02cdb4e35c599c4c23f6d7369daba81e739 100644 (file)
@@ -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 <<EOF
+$syms
+EOF
+    fgrep -f $fgrep_tmp
+    rm -f $fgrep_tmp) |
    tr @ \\012
 fi
 
index abbc983500799fd7ea3ed36088b396b2d7528eea..83c5c02cdb4e35c599c4c23f6d7369daba81e739 100644 (file)
@@ -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 <<EOF
+$syms
+EOF
+    fgrep -f $fgrep_tmp
+    rm -f $fgrep_tmp) |
    tr @ \\012
 fi