Skip to content

Commit 32b3673

Browse files
dschoGit for Windows Build Agent
authored and
Git for Windows Build Agent
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 64b7a9a commit 32b3673

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

739+
# Generate the LinkOrCopyBuiltins.targets file
740+
(echo '<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">' && \
741+
echo ' <Target Name="CopyBuiltins_AfterBuild" AfterTargets="AfterBuild">' && \
742+
for name in $(BUILT_INS);\
743+
do \
744+
echo ' <Copy SourceFiles="$$(OutDir)\git.exe" DestinationFiles="$$(OutDir)\'"$$name"'" SkipUnchangedFiles="true" UseHardlinksIfPossible="true" />'; \
745+
done && \
746+
for name in $(REMOTE_CURL_ALIASES); \
747+
do \
748+
echo ' <Copy SourceFiles="$$(OutDir)\'"$(REMOTE_CURL_PRIMARY)"'" DestinationFiles="$$(OutDir)\'"$$name"'" SkipUnchangedFiles="true" UseHardlinksIfPossible="true" />'; \
749+
done && \
750+
echo ' </Target>' && \
751+
echo '</Project>') >git/LinkOrCopyBuiltins.targets
752+
git add -f git/LinkOrCopyBuiltins.targets
753+
739754
# Add command-list.h
740755
$(MAKE) MSVC=1 SKIP_VCPKG=1 prefix=/mingw64 command-list.h
741756
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
@@ -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)