From c63c5d268d4188a719ba149e4a8f6c1535a3e192 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Fri, 1 Dec 2017 21:00:00 +0100 Subject: [PATCH] Allow `make vcxproj` without initializing vcpkg The idea of the `vcxproj` target is to generate .sln/.vcxproj files and then commit them, to be used elsewhere. Typically, this is done in a VSTS job whenever `master` changes. So there is little use in initializing vcpkg and building all the dependencies: they are not necessary here. Signed-off-by: Johannes Schindelin --- config.mak.uname | 10 ++++++---- contrib/buildsystems/engine.pl | 3 ++- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/config.mak.uname b/config.mak.uname index ea572bbfd41c94..26f77c36ec175a 100644 --- a/config.mak.uname +++ b/config.mak.uname @@ -25,10 +25,12 @@ include compat/vcbuild/MSVC-DEFS-GEN # See if vcpkg and the vcpkg-build versions of the third-party # libraries that we use are installed. We include the result # to get $(vcpkg_*) variables defined for the Makefile. +ifeq (,$(SKIP_VCPKG)) compat/vcbuild/VCPKG-DEFS: compat/vcbuild/vcpkg_install.bat @"$<" include compat/vcbuild/VCPKG-DEFS endif +endif # We choose to avoid "if .. else if .. else .. endif endif" # because maintaining the nesting to match is a pain. If @@ -713,12 +715,12 @@ vcxproj: git add -f git.sln {*,*/lib,t/helper/*}/*.vcxproj # Add common-cmds.h - $(MAKE) MSVC=1 prefix=/mingw64 common-cmds.h + $(MAKE) MSVC=1 SKIP_VCPKG=1 prefix=/mingw64 common-cmds.h git add -f common-cmds.h # Add scripts rm -f perl/perl.mak - $(MAKE) MSVC=1 prefix=/mingw64 \ + $(MAKE) MSVC=1 SKIP_VCPKG=1 prefix=/mingw64 \ $(SCRIPT_LIB) $(SCRIPT_SH_GEN) $(SCRIPT_PERL_GEN) # Strip out the sane tool path, needed only for building sed -i '/^git_broken_path_fix ".*/d' git-sh-setup @@ -730,7 +732,7 @@ vcxproj: # Add bin-wrappers, for testing rm -rf bin-wrappers/ - $(MAKE) MSVC=1 prefix=/mingw64 $(test_bindir_programs) + $(MAKE) MSVC=1 SKIP_VCPKG=1 prefix=/mingw64 $(test_bindir_programs) # Ensure that the GIT_EXEC_PATH is a Unix-y one, and that the absolute # path of the repository is not hard-coded (GIT_EXEC_PATH will be set # by test-lib.sh according to the current setup) @@ -753,7 +755,7 @@ vcxproj: git add -f templates/boilerplates.made templates/blt/ # Add build options - $(MAKE) MSVC=1 prefix=/mingw64 GIT-BUILD-OPTIONS + $(MAKE) MSVC=1 SKIP_VCPKG=1 prefix=/mingw64 GIT-BUILD-OPTIONS git add -f GIT-BUILD-OPTIONS # Commit the whole shebang diff --git a/contrib/buildsystems/engine.pl b/contrib/buildsystems/engine.pl index 8bb07e8e25cc50..fba8a3f056a0e1 100755 --- a/contrib/buildsystems/engine.pl +++ b/contrib/buildsystems/engine.pl @@ -82,7 +82,8 @@ sub showUsage # Capture the make dry stderr to file for review (will be empty for a release build). my $ErrsFile = "msvc-build-makedryerrors.txt"; -@makedry = `make -C $git_dir -n MSVC=1 V=1 2>$ErrsFile` if !@makedry; +@makedry = `make -C $git_dir -n MSVC=1 SKIP_VCPKG=1 V=1 2>$ErrsFile` +if !@makedry; # test for an empty Errors file and remove it unlink $ErrsFile if -f -z $ErrsFile;