[Openvpn-devel] msvc: always regenerate config-msvc.h

Message ID 20221111111619.21415-1-frank@lichtenheld.com
State Superseded
Headers show
Series [Openvpn-devel] msvc: always regenerate config-msvc.h | expand

Commit Message

Frank Lichtenheld Nov. 11, 2022, 11:16 a.m. UTC
There is no easy way to detect whether this information
is outdated. One possible optimisation would be in the
Python code to actually only rewrite the file if it has
changed. Although VC is already pretty good in detecting
whether the code has actually changed so this might not
be worth the additional complexity.

While here, change some leading whitespace to tabs as
expected in Makefile.

Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
 build/msvc/msvc-generate/Makefile.mak | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

Note: this patch applies to both master and release/2.5 cleanly and
should be pushed to both.


diff --git a/build/msvc/msvc-generate/Makefile.mak b/build/msvc/msvc-generate/Makefile.mak
index ae8b0842..1c1c4bab 100644
--- a/build/msvc/msvc-generate/Makefile.mak
+++ b/build/msvc/msvc-generate/Makefile.mak
 	cscript //nologo msvc-generate.js --config="$(OUTPUT_PLUGIN_CONFIG)" --input="$(INPUT_PLUGIN)" --output="$(OUTPUT_PLUGIN)"
-    -FOR /F %i IN ('where rst2html.py') DO python %i "$(INPUT_MAN)" "$(OUTPUT_MAN)"
+	-FOR /F %i IN ('where rst2html.py') DO python %i "$(INPUT_MAN)" "$(OUTPUT_MAN)"
-    python git-version.py $(SOLUTIONDIR)
+# Force regeneration because we can't detect whether it is outdated
+	python git-version.py $(SOLUTIONDIR)
 	-del "$(OUTPUT_MSVC_VER)"