Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Auto-detect git install even for !USE__GIT builds

  • Loading branch information...
commit 57041eccd585cd81a721cfedb90a805229671dcf 1 parent 52e8af1
Craig Ringer ringerc authored
Showing with 27 additions and 10 deletions.
  1. +7 −5 PgBuildWin/Config.pm
  2. +20 −5 README.md
12 PgBuildWin/Config.pm
View
@@ -142,16 +142,18 @@ sub merge_defaults($$) {
if (defined($ma->{'USE_GIT'})) {
die("Don't set USE_GIT in settings.pl; use buildgit.pl instead");
}
+ if (!defined($ma->{'GIT'})) {
+ # Git location not specified. Try to find it. If we can't it
+ # is only fatal if USE_GIT is set, but we use it for flex/bison/
+ # etc otherwise, so we still want it.
+ $ma->{'GIT'} = find_git();
+ }
if ($use_git) {
if (!defined($ma->{'GIT'})) {
- # Git location not specified. Try to find it; if we can't,
- # fail.
- $ma->{'GIT'} = find_git()
- or die ("If USE_GIT is set you must set GIT to the location of the git executable or add git to the PATH");
+ die ("If USE_GIT is set you must set GIT to the location of the git executable or add git to the PATH");
}
} else {
# Unset git-related params if USE_GIT is not set
- # but keep the GIT path; we'll use it later
delete $ma->{'GIT_PULL'};
delete $ma->{'PG_GIT_URL'};
delete $ma->{'PGDIR'};
25 README.md
View
@@ -62,11 +62,26 @@ Download:
* ActiveState TCL x64 and x86 from http://www.activestate.com/activetcl/downloads
* Python.org python 2.7 and 3.3, both in x86 and x64 versions from http://python.org
-You need MinGW even for MSVC builds because you need the "flex" executable
-from it to build on x64; the version provided on the PostgreSQL site doesn't
-run on win64. These scripts also use bison, wget and touch from mingw. All
-these tools come with msysgit too, so a future version may support using
-msysgit instead of MinGW.
+msysgit or mingw are required for "flex", "bison", "touch" and "curl". Perl
+wrappers for touch and curl may be used in future, but flex and bison are not
+negotiable for git builds. If you get an error like:
+
+ Could not find usable FLEX. Looked in MAKEARGS, git install, mingw. See README.
+ at C:/pg/pg_build_win/PgBuildWin/Config.pm line 222.
+
+then you probably need to put msysgit or Mingw/msys's bin dir on your PATH,
+or set the GIT or MINGW keys in MAKEARGS in your settings.pl to the install location
+of msysgit or mingw32, eg
+
+ $cfg {
+ #...
+ 'makeargs' => {
+ #...
+ 'GIT' => 'C:\Program Files (x86)\Git',
+ #....
+ }
+
+
I also recommend:
Please sign in to comment.
Something went wrong with that request. Please try again.