Skip to content

Commit

Permalink
Allow make vcxproj without initializing vcpkg
Browse files Browse the repository at this point in the history
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 <johannes.schindelin@gmx.de>
  • Loading branch information
dscho committed Dec 7, 2017
1 parent b02312a commit c63c5d2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
10 changes: 6 additions & 4 deletions config.mak.uname
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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)
Expand All @@ -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
Expand Down
3 changes: 2 additions & 1 deletion contrib/buildsystems/engine.pl
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit c63c5d2

Please sign in to comment.