Skip to content

Commit eb1be42

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 <johannes.schindelin@gmx.de>
1 parent f81e6b9 commit eb1be42

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
@@ -668,6 +668,21 @@ vcxproj:
668668
perl contrib/buildsystems/generate -g Vcxproj
669669
git add -f git.sln {*,*/lib,t/helper/*}/*.vcxproj
670670

671+
# Generate the LinkOrCopyBuiltins.targets file
672+
(echo '<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">' && \
673+
echo ' <Target Name="CopyBuiltins_AfterBuild" AfterTargets="AfterBuild">' && \
674+
for name in $(BUILT_INS);\
675+
do \
676+
echo ' <Copy SourceFiles="$$(OutDir)\git.exe" DestinationFiles="$$(OutDir)\'"$$name"'" SkipUnchangedFiles="true" UseHardlinksIfPossible="true" />'; \
677+
done && \
678+
for name in $(REMOTE_CURL_ALIASES); \
679+
do \
680+
echo ' <Copy SourceFiles="$$(OutDir)\'"$(REMOTE_CURL_PRIMARY)"'" DestinationFiles="$$(OutDir)\'"$$name"'" SkipUnchangedFiles="true" UseHardlinksIfPossible="true" />'; \
681+
done && \
682+
echo ' </Target>' && \
683+
echo '</Project>') >git/LinkOrCopyBuiltins.targets
684+
git add -f git/LinkOrCopyBuiltins.targets
685+
671686
# Add command-list.h
672687
$(MAKE) MSVC=1 SKIP_VCPKG=1 prefix=/mingw64 command-list.h
673688
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)