Skip to content

Commit 6aaa516

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 9073797 commit 6aaa516

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

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