Skip to content

Commit e54a80e

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 688d166 commit e54a80e

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

703+
# Generate the LinkOrCopyBuiltins.targets file
704+
(echo '<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">' && \
705+
echo ' <Target Name="CopyBuiltins_AfterBuild" AfterTargets="AfterBuild">' && \
706+
for name in $(BUILT_INS);\
707+
do \
708+
echo ' <Copy SourceFiles="$$(OutDir)\git.exe" DestinationFiles="$$(OutDir)\'"$$name"'" SkipUnchangedFiles="true" UseHardlinksIfPossible="true" />'; \
709+
done && \
710+
for name in $(REMOTE_CURL_ALIASES); \
711+
do \
712+
echo ' <Copy SourceFiles="$$(OutDir)\'"$(REMOTE_CURL_PRIMARY)"'" DestinationFiles="$$(OutDir)\'"$$name"'" SkipUnchangedFiles="true" UseHardlinksIfPossible="true" />'; \
713+
done && \
714+
echo ' </Target>' && \
715+
echo '</Project>') >git/LinkOrCopyBuiltins.targets
716+
git add -f git/LinkOrCopyBuiltins.targets
717+
703718
# Add command-list.h
704719
$(MAKE) MSVC=1 SKIP_VCPKG=1 prefix=/mingw64 command-list.h
705720
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)