Skip to content

Commit 030a628

Browse files
dschogitster
authored andcommitted
vcxproj: only copy git-remote-http.exe once it was built
In b18ae14 (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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 61d1d92 commit 030a628

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

config.mak.uname

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -703,20 +703,24 @@ vcxproj:
703703
perl contrib/buildsystems/generate -g Vcxproj
704704
git add -f git.sln {*,*/lib,t/helper/*}/*.vcxproj
705705

706-
# Generate the LinkOrCopyBuiltins.targets file
706+
# Generate the LinkOrCopyBuiltins.targets and LinkOrCopyRemoteHttp.targets file
707707
(echo '<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">' && \
708708
echo ' <Target Name="CopyBuiltins_AfterBuild" AfterTargets="AfterBuild">' && \
709709
for name in $(BUILT_INS);\
710710
do \
711711
echo ' <Copy SourceFiles="$$(OutDir)\git.exe" DestinationFiles="$$(OutDir)\'"$$name"'" SkipUnchangedFiles="true" UseHardlinksIfPossible="true" />'; \
712712
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">' && \
713717
for name in $(REMOTE_CURL_ALIASES); \
714718
do \
715719
echo ' <Copy SourceFiles="$$(OutDir)\'"$(REMOTE_CURL_PRIMARY)"'" DestinationFiles="$$(OutDir)\'"$$name"'" SkipUnchangedFiles="true" UseHardlinksIfPossible="true" />'; \
716720
done && \
717721
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
720724

721725
# Add command-list.h
722726
$(MAKE) MSVC=1 SKIP_VCPKG=1 prefix=/mingw64 command-list.h

contrib/buildsystems/Generators/Vcxproj.pm

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,9 @@ EOM
277277
if ($target eq 'git') {
278278
print F " <Import Project=\"LinkOrCopyBuiltins.targets\" />\n";
279279
}
280+
if ($target eq 'git-remote-http') {
281+
print F " <Import Project=\"LinkOrCopyRemoteHttp.targets\" />\n";
282+
}
280283
print F << "EOM";
281284
</Project>
282285
EOM

0 commit comments

Comments
 (0)