vcxproj: only copy `git-remote-http.exe` once it was built

In b18ae14a8f6 (vcxproj: also link-or-copy builtins, 2019-07-29), we started to copy or hard-link the built-ins as a post-build step of the `git` project. At the same time, we tried to copy or hard-link `git-remote-http.exe`, but it is quite possible that it was not built at that time. Let's move that latter task into a post-install step of the `git-remote-http` project instead. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Johannes Schindelin committed Oct 4, 2019 at 08:09 UTC 030a628b815f87d29def74bdf9d3635f7e4c0dac
2 files changed +10 -3
config.mak.uname
+7 -3
@@ -703,20 +703,24 @@ vcxproj:
703 perl contrib/buildsystems/generate -g Vcxproj
704 git add -f git.sln {*,*/lib,t/helper/*}/*.vcxproj
705
706 - # Generate the LinkOrCopyBuiltins.targets file
706 + # Generate the LinkOrCopyBuiltins.targets and LinkOrCopyRemoteHttp.targets file
707 (echo '<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">' && \
708 echo ' <Target Name="CopyBuiltins_AfterBuild" AfterTargets="AfterBuild">' && \
709 for name in $(BUILT_INS);\
710 do \
711 echo ' <Copy SourceFiles="$$(OutDir)\git.exe" DestinationFiles="$$(OutDir)\'"$$name"'" SkipUnchangedFiles="true" UseHardlinksIfPossible="true" />'; \
712 done && \
713 + echo ' </Target>' && \
714 + echo '</Project>') >git/LinkOrCopyBuiltins.targets
715 + (echo '<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">' && \
716 + echo ' <Target Name="CopyBuiltins_AfterBuild" AfterTargets="AfterBuild">' && \
717 for name in $(REMOTE_CURL_ALIASES); \
718 do \
719 echo ' <Copy SourceFiles="$$(OutDir)\'"$(REMOTE_CURL_PRIMARY)"'" DestinationFiles="$$(OutDir)\'"$$name"'" SkipUnchangedFiles="true" UseHardlinksIfPossible="true" />'; \
720 done && \
721 echo ' </Target>' && \
718 - echo '</Project>') >git/LinkOrCopyBuiltins.targets
719 - git add -f git/LinkOrCopyBuiltins.targets
722 + echo '</Project>') >git-remote-http/LinkOrCopyRemoteHttp.targets
723 + git add -f git/LinkOrCopyBuiltins.targets git-remote-http/LinkOrCopyRemoteHttp.targets
724
725 # Add command-list.h
726 $(MAKE) MSVC=1 SKIP_VCPKG=1 prefix=/mingw64 command-list.h
contrib/buildsystems/Generators/Vcxproj.pm
+3
@@ -277,6 +277,9 @@ EOM
277 if ($target eq 'git') {
278 print F " <Import Project=\"LinkOrCopyBuiltins.targets\" />\n";
279 }
280 + if ($target eq 'git-remote-http') {
281 + print F " <Import Project=\"LinkOrCopyRemoteHttp.targets\" />\n";
282 + }
283 print F << "EOM";
284 </Project>
285 EOM