[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Better cleanup
From: |
Pavel Roskin |
Subject: |
Better cleanup |
Date: |
Sat, 21 Oct 2000 12:50:01 -0400 (EDT) |
Hello!
I remember that we decided to clean up temporary files after tests. I
modified the testsuite to compare output of "ls" before and after the
test.
Since "ls -1" is not portable, changes to the testsuite are not included.
Only included are the changes to the Autoconf macros.
There are two reasons why cleanup is needed:
1) A file is created but never removed. The test relies that conftest* is
removed elsewhere.
2) "break" is used in the arguments to e.g. AC_COMPILE_IFELSE so that the
the end of AC_COMPILE_IFELSE is never executed. I considered earlier
cleanup in AC_COMPILE_IFELSE, but it can cause more problems.
This patch intentionally doesn't fix _AC_LANG_COMPILER_WORKS, since the
right solution would be to improve AC_MSG_ERROR (and also remove the
testsuite specific "77" from the autoconf code).
Regards,
Pavel Roskin
_________________________
Index: ChangeLog
--- ChangeLog Thu Oct 19 20:11:34 2000
+++ ChangeLog Sat Oct 21 12:30:40 2000
@@ -0,0 +1,10 @@
+2000-10-21 Pavel Roskin <address@hidden>
+
+ * acfunctions.m4 (AC_FUNC_CHOWN): Remove temporary files on exit.
+ (AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Likewise.
+ (AC_FUNC_SELECT_ARGTYPES): Likewise.
+ (AC_FUNC_UTIME_NULL): Likewise.
+ * acgeneral.m4 (_AC_COMPUTE_INT): Likewise.
+ * aclang.m4 (_AC_F77_NAME_MANGLING): Likewise.
+ * acspecific.m4 (_AC_SYS_LARGEFILE_MACRO_VALUE): Likewise.
+
Index: acfunctions.m4
--- acfunctions.m4 Mon Oct 16 21:05:18 2000
+++ acfunctions.m4 Sat Oct 21 11:40:23 2000
@@ -288,6 +288,7 @@
AC_DEFINE(HAVE_CHOWN, 1,
[Define if your system has a working `chown' function.])
fi
+rm -f conftestchown
])# AC_FUNC_CHOWN
@@ -674,6 +675,7 @@
# have an lstat function.
ac_cv_func_lstat_dereferences_slashed_symlink=no
fi
+rm -f conftest.sym conftest.file
])
test $ac_cv_func_lstat_dereferences_slashed_symlink = yes &&
@@ -1138,6 +1140,7 @@
[Define to the type of args 2, 3 and 4 for `select'.])
AC_DEFINE_UNQUOTED(SELECT_TYPE_ARG5, ($[3]),
[Define to the type of arg 5 for `select'.])
+rm -f conftest*
])# AC_FUNC_SELECT_ARGTYPES
@@ -1399,6 +1402,7 @@
[Define if `utime(file, NULL)' sets file's timestamp to the
present.])
fi
+rm -f conftestdata
])# AC_FUNC_UTIME_NULL
Index: acgeneral.m4
--- acgeneral.m4 Thu Oct 19 20:09:41 2000
+++ acgeneral.m4 Sat Oct 21 10:03:15 2000
@@ -3796,7 +3796,8 @@
_AC_COMPUTE_INT_COMPILE([$1], [$2], [$3])
else
_AC_COMPUTE_INT_RUN([$1], [$2], [$3], [$4])
-fi[]dnl
+fi
+rm -f conftestval[]dnl
])# _AC_COMPUTE_INT
Index: aclang.m4
--- aclang.m4 Wed Oct 18 17:34:39 2000
+++ aclang.m4 Sat Oct 21 11:13:01 2000
@@ -1671,7 +1671,7 @@
LIBS=$ac_save_LIBS
AC_LANG_POP()dnl
- rm -f cf77_test*])
+ rm -f cf77_test* conftest*])
AC_LANG_POP()dnl
])
])# _AC_F77_NAME_MANGLING
Index: acspecific.m4
--- acspecific.m4 Wed Oct 18 17:34:39 2000
+++ acspecific.m4 Sat Oct 21 11:45:52 2000
@@ -997,7 +997,8 @@
done])
if test "$$3" != no; then
AC_DEFINE_UNQUOTED([$1], [$$3], [$4])
-fi[]dnl
+fi
+rm -f conftest*[]dnl
])# _AC_SYS_LARGEFILE_MACRO_VALUE
_________________________
- Better cleanup,
Pavel Roskin <=