aboutsummaryrefslogtreecommitdiffstats
path: root/m4/autopat
diff options
context:
space:
mode:
Diffstat (limited to 'm4/autopat')
-rwxr-xr-xm4/autopat36
1 files changed, 36 insertions, 0 deletions
diff --git a/m4/autopat b/m4/autopat
new file mode 100755
index 000000000000..e0c3d36546e4
--- /dev/null
+++ b/m4/autopat
@@ -0,0 +1,36 @@
+#!/bin/bash -norc
+# find patterns of cache entries to automatically remove from config.cache
+# Used by am-utils developers.
+# Erez Zadok <ezk AT 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"