Skip to content
Snippets Groups Projects
Commit 13e95662 authored by Andrew Dunstan's avatar Andrew Dunstan
Browse files

Unify searchpath and do file logic in MSVC build scripts.

Commit f83419b7 failed to notice that mkvcbuild.pl and build.pl use
different searchpath and do-file logic, breaking the latter, so it is
adjusted to use the same logic as mkvcbuild.pl.
parent 2689e8e3
No related branches found
No related tags found
No related merge requests found
...@@ -2,19 +2,18 @@ ...@@ -2,19 +2,18 @@
# src/tools/msvc/build.pl # src/tools/msvc/build.pl
BEGIN use File::Basename;
{ use File::Spec;
BEGIN { use lib File::Spec->rel2abs(dirname(__FILE__)); }
chdir("../../..") if (-d "../msvc" && -d "../../../src");
}
use lib "src/tools/msvc";
use Cwd; use Cwd;
use Mkvcbuild; use Mkvcbuild;
chdir('..\..\..') if (-d '..\msvc' && -d '..\..\..\src');
die 'Must run from root or msvc directory'
unless (-d 'src\tools\msvc' && -d 'src');
# buildenv.pl is for specifying the build environment settings # buildenv.pl is for specifying the build environment settings
# it should contain lines like: # it should contain lines like:
# $ENV{PATH} = "c:/path/to/bison/bin;$ENV{PATH}"; # $ENV{PATH} = "c:/path/to/bison/bin;$ENV{PATH}";
...@@ -30,8 +29,8 @@ elsif (-e "./buildenv.pl") ...@@ -30,8 +29,8 @@ elsif (-e "./buildenv.pl")
# set up the project # set up the project
our $config; our $config;
do "./config_default.pl"; do "./src/tools/msvc/config_default.pl";
do "./config.pl" if (-f "src/tools/msvc/config.pl"); do "./src/tools/msvc/config.pl" if (-f "src/tools/msvc/config.pl");
my $vcver = Mkvcbuild::mkvcbuild($config); my $vcver = Mkvcbuild::mkvcbuild($config);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment