summaryrefslogtreecommitdiffstats
path: root/Configurations/windows-makefile.tmpl
diff options
context:
space:
mode:
authorDr. Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>2019-12-28 23:03:29 +0100
committerDr. Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>2020-01-08 18:01:02 +0100
commita9e4e3c39eb361ddfb438edb27c754947009eed6 (patch)
tree9487bc84bf4267a9d2564c1c2775374d18fb7f94 /Configurations/windows-makefile.tmpl
parent03047e7b7f64b054fa85d101e7097af5daf7a865 (diff)
nmake: fix install_html_docs target
The nmake rule contains actually two errors: 1. The $< target[1] does not work for regular rules and is expanded to an empty string after issuing the warning NMAKE : warning U4006: special macro undefined : '$<"' Solution: replace $< by $? 2. The substitution regex is not quoted correctly, which leads to the following error message by cmd.exe: 'href' is not recognized as an internal or external command, operable program or batch file. Solution: Quoting arguments for cmd.exe is really a nightmare, but with the help of the excellent description [2] I was able to properly quote the regex. Things were complicated by the fact that a lot of levels of unquoting needed to be considered: * perl (windows-makefile.tmpl -> makefile) * make (reading the makefile) * cmd.exe (executed by make) * perl (scanning command line using CommandLineToArgvW()) The fix works, but the regex has become unmaintainable. It would actually be better to wrap the entire command (including the regex) into a little perl script which can be called by make directly. [1] https://docs.microsoft.com/en-us/cpp/build/reference/filename-macros [2] https://blogs.msdn.microsoft.com/twistylittlepassagesallalike/2011/04/23/everyone-quotes-command-line-arguments-the-wrong-way/ Fixes #10648 Fixes #10749 [extended tests] Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10719)
Diffstat (limited to 'Configurations/windows-makefile.tmpl')
-rw-r--r--Configurations/windows-makefile.tmpl4
1 files changed, 2 insertions, 2 deletions
diff --git a/Configurations/windows-makefile.tmpl b/Configurations/windows-makefile.tmpl
index cc19b31255..83df9f27a9 100644
--- a/Configurations/windows-makefile.tmpl
+++ b/Configurations/windows-makefile.tmpl
@@ -589,8 +589,8 @@ reconfigure reconf:
return <<"EOF";
$args{src}: $args{generator}->[0]
pod2html "--podroot=\$(SRCDIR)/doc" --htmldir=.. \\
- --podpath=man1:man3:man5:man7 "--infile=\$<" "--title=$title" \\
- | \$(PERL) -pe "s|href=\\"http://man\\.he\\.net/(man\d/[^\\"]+)(?:\\.html)?\\"|href=\\"../\$1.html|g;" \\
+ --podpath=man1:man3:man5:man7 "--infile=\$?" "--title=$title" \\
+ | \$(PERL) -pe ^"s^|href=\\^"http://man\\.he\\.net/^(man\\d/[^^\\^"]+^)^(?:\.html^)?^"^|href=\\^"../\$\$1.html^|g;^" \\
> \$\@
EOF
} elsif (platform->isdef($args{src})) {