From 464e672721e39b1ed308f025c528ff12ddda1210 Mon Sep 17 00:00:00 2001 From: "kov@webkit.org" Date: Thu, 9 Feb 2012 02:38:47 +0000 Subject: [PATCH] Rubber-stamped by Martin Robinson. * gtk/common.py: (get_build_path): Move test for current directory being a valid directory up so it takes precedence over WebKitBuild/Release and WebKitBuild/Debug when they exist as well. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@107165 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- Tools/ChangeLog | 9 +++++++++ Tools/gtk/common.py | 18 +++++++++--------- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/Tools/ChangeLog b/Tools/ChangeLog index 154c35b..359547c 100644 --- a/Tools/ChangeLog +++ b/Tools/ChangeLog @@ -1,5 +1,14 @@ 2012-02-08 Gustavo Noronha Silva + Rubber-stamped by Martin Robinson. + + * gtk/common.py: + (get_build_path): Move test for current directory being a valid + directory up so it takes precedence over WebKitBuild/Release and + WebKitBuild/Debug when they exist as well. + +2012-02-08 Gustavo Noronha Silva + [GTK] doc rebasing does not respect DESTDIR https://bugs.webkit.org/show_bug.cgi?id=78177 diff --git a/Tools/gtk/common.py b/Tools/gtk/common.py index 73aafc3..2a5ea37 100644 --- a/Tools/gtk/common.py +++ b/Tools/gtk/common.py @@ -42,6 +42,15 @@ def get_build_path(): def is_valid_build_directory(path): return os.path.exists(os.path.join(path, 'GNUmakefile')) + # Debian and Ubuntu build both flavours of the library (with gtk2 + # and with gtk3); they use directories build-2.0 and build-3.0 for + # that, which is not handled by the above cases; we check that the + # directory where we are called from is a valid build directory, + # which should handle pretty much all other non-standard cases. + build_dir = os.getcwd() + if is_valid_build_directory(build_dir): + return build_dir + build_types = ['Release', 'Debug'] if '--debug' in sys.argv: build_types.reverse() @@ -64,15 +73,6 @@ def get_build_path(): if is_valid_build_directory(build_dir): return build_dir - # Debian and Ubuntu build both flavours of the library (with gtk2 - # and with gtk3); they use directories build-2.0 and build-3.0 for - # that, which is not handled by the above cases; we check that the - # directory where we are called from is a valid build directory, - # which should handle pretty much all other non-standard cases. - build_dir = os.getcwd() - if is_valid_build_directory(build_dir): - return build_dir - print 'Could not determine build directory.' sys.exit(1) -- 2.7.4