Skip to content

Commit 8776c38

Browse files
committed
vcxproj: also link-or-copy builtins
The problem with not having, say, git-receive-pack.exe after a full build is that the test suite will then happily use the *installed* git-receive-pack.exe because it finds nothing else. Absolutely not what we want. We want to have confidence that our test covers the MSVC-built Git executables, and not some random stuff. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 1161a0e commit 8776c38

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

config.mak.uname

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -692,6 +692,21 @@ vcxproj:
692692
perl contrib/buildsystems/generate -g Vcxproj
693693
git add -f git.sln {*,*/lib,t/helper/*}/*.vcxproj
694694

695+
# Generate the LinkOrCopyBuiltins.targets file
696+
(echo '<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">' && \
697+
echo ' <Target Name="CopyBuiltins_AfterBuild" AfterTargets="AfterBuild">' && \
698+
for name in $(BUILT_INS);\
699+
do \
700+
echo ' <Copy SourceFiles="$$(OutDir)\git.exe" DestinationFiles="$$(OutDir)\'"$$name"'" SkipUnchangedFiles="true" UseHardlinksIfPossible="true" />'; \
701+
done && \
702+
for name in $(REMOTE_CURL_ALIASES); \
703+
do \
704+
echo ' <Copy SourceFiles="$$(OutDir)\'"$(REMOTE_CURL_PRIMARY)"'" DestinationFiles="$$(OutDir)\'"$$name"'" SkipUnchangedFiles="true" UseHardlinksIfPossible="true" />'; \
705+
done && \
706+
echo ' </Target>' && \
707+
echo '</Project>') >git/LinkOrCopyBuiltins.targets
708+
git add -f git/LinkOrCopyBuiltins.targets
709+
695710
# Add command-list.h
696711
$(MAKE) MSVC=1 SKIP_VCPKG=1 prefix=/mingw64 command-list.h
697712
git add -f command-list.h

contrib/buildsystems/Generators/Vcxproj.pm

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,9 @@ EOM
269269
</Target>
270270
EOM
271271
}
272+
if ($target eq 'git') {
273+
print F " <Import Project=\"LinkOrCopyBuiltins.targets\" />\n";
274+
}
272275
print F << "EOM";
273276
</Project>
274277
EOM

0 commit comments

Comments
 (0)