-path is non-portable extension, fortunately it's possible to express
.git subdirectory exclusion with -prune.
Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/7004)
clean: libclean
$(RM) $(PROGRAMS) $(TESTPROGS) $(ENGINES) $(SCRIPTS)
$(RM) $(GENERATED_MANDATORY) $(GENERATED)
- -$(RM) `find . -name '*{- $depext -}' -a \! -path "./.git/*"`
- -$(RM) `find . -name '*{- $objext -}' -a \! -path "./.git/*"`
+ -$(RM) `find . -name .git -prune -o -name '*{- $depext -}' -print`
+ -$(RM) `find . -name .git -prune -o -name '*{- $objext -}' -print`
$(RM) core
$(RM) tags TAGS doc-nits
$(RM) -r test/test-runs
$(RM) openssl.pc libcrypto.pc libssl.pc
- -$(RM) `find . -type l -a \! -path "./.git/*"`
+ -$(RM) `find . -name .git -prune -o -type l -print`
$(RM) $(TARFILE)
distclean: clean