summaryrefslogtreecommitdiffstats
path: root/contrib/amd/m4/autopat
blob: 1b1ed77b6335e685569d7a7ffc1bdc9e5a17e8f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/bash -norc
# find patterns of cache entries to automatically remove from config.cache
# Used by am-utils developers.
# Erez Zadok <ezk@cs.columbia.edu>
#set -x

macdir="../m4/macros"

# find the right directory
if [ ! -d $macdir ]; then
    echo "Could not find $macdir directory."
    exit 2
fi

# skip if no config.cache file
if [ ! -f config.cache ]; then
    echo "Not in the A.cpu-company-system."
    exit 2
fi

# look for files that changed vs. config.cache
pat=""
for i in ${macdir}/*.m4; do
    if test $i -nt config.cache; then
	n=`egrep '^ac_cv_' $i |sed 's/[^a-zA-Z0-9_].*//g'|sort|uniq`
	if test -z "$n"; then
	    continue;
	fi
	if test -z "$pat"; then
	    pat="$n"
	else
	    pat="$pat|$n"
	fi
    fi
done
echo "$pat"
OpenPOWER on IntegriCloud