Configurations/windows-makefile.tmpl: HTMLDOCS are files, not directories
authorRichard Levitte <levitte@openssl.org>
Mon, 2 Dec 2019 08:48:44 +0000 (09:48 +0100)
committerRichard Levitte <levitte@openssl.org>
Wed, 25 Dec 2019 23:49:07 +0000 (00:49 +0100)
Remove them using "del", not "rmdir"

Fixes #10553

Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
(Merged from https://github.com/openssl/openssl/pull/10555)

Configurations/windows-makefile.tmpl

index 966212f3d6a9cf4ab850a3dd7faab08303cbb5c6..8e0d098e206ba0f74604c10bcbf8c936a0883434 100644 (file)
@@ -3,6 +3,8 @@
 ##
 ## {- join("\n## ", @autowarntext) -}
 {-
+ use File::Basename;
+
  our $sover_dirname = platform->shlib_version_as_filename();
 
  my $build_scheme = $target{build_scheme};
@@ -111,10 +113,22 @@ MISC_SCRIPTS={-
                          && $unified_info{attributes}->{scripts}->{$_}->{misc} }
                   @{$unified_info{scripts}})
 -}
-HTMLDOCS1={- join(" ", @{$unified_info{htmldocs}->{man1}}) -}
-HTMLDOCS3={- join(" ", @{$unified_info{htmldocs}->{man3}}) -}
-HTMLDOCS5={- join(" ", @{$unified_info{htmldocs}->{man5}}) -}
-HTMLDOCS7={- join(" ", @{$unified_info{htmldocs}->{man7}}) -}
+HTMLDOCS1={- our @HTMLDOCS1 = @{$unified_info{htmldocs}->{man1}};
+             join(" ", @HTMLDOCS1) -}
+HTMLDOCS3={- our @HTMLDOCS3 = @{$unified_info{htmldocs}->{man3}};
+             join(" ", @HTMLDOCS3) -}
+HTMLDOCS5={- our @HTMLDOCS5 = @{$unified_info{htmldocs}->{man5}};
+             join(" ", @HTMLDOCS5) -}
+HTMLDOCS7={- our @HTMLDOCS7 = @{$unified_info{htmldocs}->{man7}};
+             join(" ", @HTMLDOCS7) -}
+HTMLDOCS1_BLDDIRS={- my %dirs = map { dirname($_) => 1 } @HTMLDOCS1;
+                     join(' ', sort keys %dirs) -}
+HTMLDOCS3_BLDDIRS={- my %dirs = map { dirname($_) => 1 } @HTMLDOCS3;
+                     join(' ', sort keys %dirs) -}
+HTMLDOCS5_BLDDIRS={- my %dirs = map { dirname($_) => 1 } @HTMLDOCS5;
+                     join(' ', sort keys %dirs) -}
+HTMLDOCS7_BLDDIRS={- my %dirs = map { dirname($_) => 1 } @HTMLDOCS7;
+                     join(' ', sort keys %dirs) -}
 
 APPS_OPENSSL={- use File::Spec::Functions;
                 "\"".catfile("apps","openssl")."\"" -}
@@ -401,10 +415,10 @@ libclean:
        -del /Q /F $(LIBS) libcrypto.* libssl.* ossl_static.pdb
 
 clean: libclean
-       -rmdir /Q /S $(HTMLDOCS1)
-       -rmdir /Q /S $(HTMLDOCS3)
-       -rmdir /Q /S $(HTMLDOCS5)
-       -rmdir /Q /S $(HTMLDOCS7)
+       -rmdir /Q /S $(HTMLDOCS1_BLDDIRS)
+       -rmdir /Q /S $(HTMLDOCS3_BLDDIRS)
+       -rmdir /Q /S $(HTMLDOCS5_BLDDIRS)
+       -rmdir /Q /S $(HTMLDOCS7_BLDDIRS)
        {- join("\n\t", map { "-del /Q /F $_" } @PROGRAMS) -}
        -del /Q /F $(MODULES)
        -del /Q /F $(SCRIPTS)