Recursively delete conftest files
authorVittorio Giovara <vittorio.giovara@gmail.com>
Mon, 30 Jan 2017 21:14:59 +0000 (22:14 +0100)
committerHenrik Gramner <henrik@gramner.com>
Fri, 19 May 2017 14:12:15 +0000 (16:12 +0200)
On OS X, one of the conftest files might be a directory named `conftest.dSYM`.

Makefile
configure

index d0b1633..81bce65 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -278,7 +278,8 @@ clean:
        rm -f $(SRC2:%.c=%.gcda) $(SRC2:%.c=%.gcno) *.dyn pgopti.dpi pgopti.dpi.lock *.pgd *.pgc
 
 distclean: clean
-       rm -f config.mak x264_config.h config.h config.log x264.pc x264.def conftest*
+       rm -f config.mak x264_config.h config.h config.log x264.pc x264.def
+       rm -rf conftest*
 
 install-cli: cli
        $(INSTALL) -d $(DESTDIR)$(bindir)
index b87a818..9f3ea11 100755 (executable)
--- a/configure
+++ b/configure
@@ -305,7 +305,8 @@ configure_system_override() {
     return $res
 }
 
-rm -f x264_config.h config.h config.mak config.log x264.pc x264.def conftest*
+rm -f x264_config.h config.h config.mak config.log x264.pc x264.def
+rm -rf conftest*
 
 # Construct a path to the specified directory relative to the working directory
 relative_path() {
@@ -540,7 +541,7 @@ host="${host#*-}"
 host_vendor="${host%%-*}"
 host_os="${host#*-}"
 
-trap 'rm -f conftest*' EXIT
+trap 'rm -rf conftest*' EXIT
 
 # test for use of compilers that require specific handling
 cc_base=`basename "$CC"`