[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
mktests.sh patches
From: |
Tim Van Holder |
Subject: |
mktests.sh patches |
Date: |
Thu, 25 Jan 2001 21:55:33 +0100 |
A few patches:
- support DOS paths when determining as_me & base name
(minor, as it's normally run from the makefile,
which uses forward slashes)
- use $base.tat, not $as_me.tat (is mktests.sh.tat, and
DOS doesn't support multiple dots). I suppose using
'mktests.tat' would be better (as now we need to use
rm *.tat in the trap code, which might remove files we
wanted to keep)
- use '|| exit 0' instead of '; :' to ensure success in
the subshell when creating acdefuns/audefuns. For some
reason, the '; :' had no effect for me - but using
'|| exit 0' should be equivalent, no?
Index: mktests.sh
===================================================================
RCS file: /cvs/autoconf/tests/mktests.sh,v
retrieving revision 1.16
diff -u -r1.16 mktests.sh
--- mktests.sh 2001/01/22 09:03:38 1.16
+++ mktests.sh 2001/01/25 20:42:24
@@ -22,13 +22,13 @@
# because we used some non portable tool, but we just don't care: this
# shell script is a maintainer tool, and we do expect good tools.
-as_me=`echo "$0" | sed 's,.*/,,'`
+as_me=`echo "$0" | sed 's,.*[\\/],,'`
trap 'echo "'"$as_me"': failed. To proceed run make check." >&2
- rm -f acdefuns audefuns requires $as_me.tat
+ rm -f acdefuns audefuns requires *.tat
for file in "$@"
do
- touch `echo "$file" | sed "s,.*/,,;s/\..*/.at/"`
+ touch `echo "$file" | sed "s,.*[\\/],,;s/\..*/.at/"`
done
trap 0
exit 1' \
@@ -59,7 +59,6 @@
sort |
uniq >requires
-
# exclude_list
# ------------
# Macros which must not be checked at all (not by ac-macros.at, nor
@@ -171,7 +170,7 @@
for file in $src
do
- base=`echo "$file" | sed 's,.*/,,;s/\..*//'`
+ base=`echo "$file" | sed 's,.*[\\/],,;s/\..*//'`
# Get the list of macros which are defined in Autoconf level.
# Get rid of the macros we are not interested in.
cat $file |
@@ -180,14 +179,14 @@
sort |
uniq |
# Watch out we are `set -e': don't fail.
- ( egrep -v "$ac_exclude_egrep";: ) >acdefuns
+ ( egrep -v "$ac_exclude_egrep" || exit 0) >acdefuns
# Get the list of macros which are defined in Autoupdate level.
cat $file |
sed -n 's/^AU_DEFUN(\[*\([a-zA-Z][a-zA-Z0-9_]*\).*$/\1/p' |
sort |
uniq |
- ( egrep -v "$au_exclude_egrep";: ) > audefuns
+ ( egrep -v "$au_exclude_egrep" || exit 0) > audefuns
# Filter out required macros.
{
@@ -211,11 +210,11 @@
echo "AT_CHECK_AU_MACRO([$macro])"
fi
done
- } >$as_me.tat
+ } >$base.tat
# In one atomic step so that if something above fails, the trap
# preserves the old version of the file.
- mv $as_me.tat $base.at
+ mv $base.tat $base.at
done
rm -f acdefuns audefuns requires
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- mktests.sh patches,
Tim Van Holder <=