Skip to content

Commit 0b1d319

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 9aab98e commit 0b1d319

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

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