Skip to content

Commit 050a062

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 57b7bf8 commit 050a062

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

720+
# Generate the LinkOrCopyBuiltins.targets file
721+
(echo '<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">' && \
722+
echo ' <Target Name="CopyBuiltins_AfterBuild" AfterTargets="AfterBuild">' && \
723+
for name in $(BUILT_INS);\
724+
do \
725+
echo ' <Copy SourceFiles="$$(OutDir)\git.exe" DestinationFiles="$$(OutDir)\'"$$name"'" SkipUnchangedFiles="true" UseHardlinksIfPossible="true" />'; \
726+
done && \
727+
for name in $(REMOTE_CURL_ALIASES); \
728+
do \
729+
echo ' <Copy SourceFiles="$$(OutDir)\'"$(REMOTE_CURL_PRIMARY)"'" DestinationFiles="$$(OutDir)\'"$$name"'" SkipUnchangedFiles="true" UseHardlinksIfPossible="true" />'; \
730+
done && \
731+
echo ' </Target>' && \
732+
echo '</Project>') >git/LinkOrCopyBuiltins.targets
733+
git add -f git/LinkOrCopyBuiltins.targets
734+
720735
# Add common-cmds.h
721736
$(MAKE) MSVC=1 SKIP_VCPKG=1 prefix=/mingw64 common-cmds.h
722737
git add -f common-cmds.h

contrib/buildsystems/Generators/Vcxproj.pm

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,9 @@ EOM
320320
</Target>
321321
EOM
322322
}
323+
if ($target eq 'git') {
324+
print F " <Import Project=\"LinkOrCopyBuiltins.targets\" />\n";
325+
}
323326
print F << "EOM";
324327
</Project>
325328
EOM

0 commit comments

Comments
 (0)