Home | History | Annotate | Line # | Download | only in m4
      1 #!/bin/bash -norc
      2 # find patterns of cache entries to automatically remove from config.cache
      3 # Used by am-utils developers.
      4 # Erez Zadok <ezk AT cs.columbia.edu>
      5 #set -x
      6 
      7 macdir="../m4/macros"
      8 
      9 # find the right directory
     10 if [ ! -d $macdir ]; then
     11     echo "Could not find $macdir directory."
     12     exit 2
     13 fi
     14 
     15 # skip if no config.cache file
     16 if [ ! -f config.cache ]; then
     17     echo "Not in the A.cpu-company-system."
     18     exit 2
     19 fi
     20 
     21 # look for files that changed vs. config.cache
     22 pat=""
     23 for i in ${macdir}/*.m4; do
     24     if test $i -nt config.cache; then
     25 	n=`egrep '^ac_cv_' $i |sed 's/[^a-zA-Z0-9_].*//g'|sort|uniq`
     26 	if test -z "$n"; then
     27 	    continue;
     28 	fi
     29 	if test -z "$pat"; then
     30 	    pat="$n"
     31 	else
     32 	    pat="$pat|$n"
     33 	fi
     34     fi
     35 done
     36 echo "$pat"
     37