Don't delete the doc/html directories when cleaning
authorMatt Caswell <matt@openssl.org>
Wed, 24 Nov 2021 10:11:45 +0000 (10:11 +0000)
committerPauli <ppzgs1@gmail.com>
Fri, 26 Nov 2021 00:27:55 +0000 (10:27 +1000)
The doc/html sub-dirs get created by Configure. Therefore they should
not be cleaned away by "nmake clean". Otherwise the following sequence
fails:

 perl Configure VC-WIN64A
 nmake clean
 nmake
 nmake install

Fixes #17114

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/17128)

Configurations/windows-makefile.tmpl

index 81a94ee19ff9821e5e57f9e8d5da8938bad6796e..4718f118e395a7c97ccd499637de1f9a88ddd768 100644 (file)
@@ -462,10 +462,10 @@ libclean:
        -del /Q /F $(LIBS) libcrypto.* libssl.* ossl_static.pdb
 
 clean: libclean
-       -rd /Q /S $(HTMLDOCS1_BLDDIRS)
-       -rd /Q /S $(HTMLDOCS3_BLDDIRS)
-       -rd /Q /S $(HTMLDOCS5_BLDDIRS)
-       -rd /Q /S $(HTMLDOCS7_BLDDIRS)
+       {- join("\n\t", map { "-del /Q /F $_" } @HTMLDOCS1) || "\@rem" -}
+       {- join("\n\t", map { "-del /Q /F $_" } @HTMLDOCS3) || "\@rem" -}
+       {- join("\n\t", map { "-del /Q /F $_" } @HTMLDOCS5) || "\@rem" -}
+       {- join("\n\t", map { "-del /Q /F $_" } @HTMLDOCS7) || "\@rem" -}
        {- join("\n\t", map { "-del /Q /F $_" } @PROGRAMS) || "\@rem" -}
        {- join("\n\t", map { "-del /Q /F $_" } @MODULES) || "\@rem" -}
        {- join("\n\t", map { "-del /Q /F $_" } @SCRIPTS) || "\@rem" -}