Fix find/rm command in Unix clean recipe
authorTanzinul Islam <t_17_7@hotmail.com>
Fri, 25 Oct 2019 16:47:25 +0000 (17:47 +0100)
committerMatt Caswell <matt@openssl.org>
Thu, 31 Oct 2019 10:34:13 +0000 (10:34 +0000)
The `./pyca-cryptography/.travis/downstream.d` subdirectory that causes the `rm` command to fail (albeit harmlessly, but with a warning from `make` nonetheless).

>rm -f `find . -name '*.d' \! -name '.*' -print`
>rm: cannot remove './pyca-cryptography/.travis/downstream.d': Is a directory
>make: [Makefile:1910: clean] Error 1 (ignored)

Exclude directories from being matched by the `find` commands.

CLA: trivial

Reviewed-by: Patrick Steuer <patrick.steuer@de.ibm.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/10264)

Configurations/unix-Makefile.tmpl

index d5deb87e9639bf47b01e683613a67a683a1f665d..6113ab4a34ea9c7957fbcee1040a99fd487463c1 100644 (file)
@@ -460,8 +460,8 @@ libclean:
 clean: libclean
        $(RM) $(PROGRAMS) $(TESTPROGS) $(MODULES) $(SCRIPTS)
        $(RM) $(GENERATED_MANDATORY) $(GENERATED)
-       -$(RM) `find . -name '*{- platform->depext() -}' \! -name '.*' -print`
-       -$(RM) `find . -name '*{- platform->objext() -}' \! -name '.*' -print`
+       -$(RM) `find . -name '*{- platform->depext() -}' \! -name '.*' \! -type d -print`
+       -$(RM) `find . -name '*{- platform->objext() -}' \! -name '.*' \! -type d -print`
        $(RM) core
        $(RM) tags TAGS doc-nits
        $(RM) -r test/test-runs