[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: playground/devtools/waf
From: Thomas Nagy <tnagyemail-mail () yahoo ! fr>
Date: 2006-09-19 23:22:12
Message-ID: 1158708132.619163.9406.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 586565 by tnagy:
Fix for #142
M +4 -4 waf-light
M +13 -5 wafadmin/Params.py
M +5 -5 wafadmin/Scripting.py
--- trunk/playground/devtools/waf/waf-light #586564:586565
@@ -208,16 +208,16 @@
if len(cwd) <= 3:
break # stop at / or c:
dirlst = os.listdir(cwd)
- if 'wscript' in dirlst:
+ if 'wscript' in dirlst:
candidate = cwd
xml = 0
- if 'wscript_xml' in dirlst:
+ if 'wscript_xml' in dirlst:
candidate = cwd
xml = 1
break
- if 'configure' in sys.argv and candidate:
+ if 'configure' in sys.argv and candidate:
break
- if '.lock-wscript' in dirlst:
+ if Params.g_lockfile in dirlst:
break
cwd = cwd[:cwd.rfind(os.sep)] # climb up
except:
--- trunk/playground/devtools/waf/wafadmin/Params.py #586564:586565
@@ -9,19 +9,21 @@
# Fixed constants, change with care
g_version="0.9.1"
+"no comment"
+
g_rootname = ''
if sys.path=='win32':
# get the first two letters (c:)
g_rootname = os.getcwd()[:2]
-# It is unlikely that we change the name of this file
g_dbfile='.dblite'
+"name of the db file"
-# Preprocessor for c/c++
g_preprocess = 1
+"use the c/c++ preprocessor"
-# Dependency tree
g_excludes = ['.svn', 'CVS', 'wafadmin', '.arch-ids']
+"exclude from dist"
# Hash method: md5 or simple scheme over integers
g_strong_hash = 1 # 1 use md5
@@ -37,17 +39,19 @@
# Constants set on runtime
g_globals = {}
+"global vars"
+
def set_globals(name, value):
g_globals[name] = value
def globals(name):
try: return g_globals[name]
except: return []
-# Set by waf.py
g_launchdir = None
+"set by waf"
-# This is the directory containing our Tools (used in particular by Environment.py)
g_tooldir=''
+"Tools directory (used in particular by Environment.py)"
# Parsed command-line arguments in the options module
g_options = None
@@ -67,6 +71,10 @@
try: g_homedir = os.environ['HOME']
except: g_homedir = os.environ['HOMEPATH']
+# allow different names for lockfile
+try: g_lockfile = os.environ['WAFLOCK']
+except: g_lockfile = '.lock-wscript'
+
# =================================== #
# HELPERS
--- trunk/playground/devtools/waf/wafadmin/Scripting.py #586564:586565
@@ -4,7 +4,7 @@
import os, sys
import Params, Utils, Configure, Environment, DirWatch, Build, Runner
-from Params import error, fatal
+from Params import error, fatal, g_lockfile
g_inroot = 1
g_dirwatch = None
@@ -126,7 +126,7 @@
# this will write a configure lock so that subsequent run will
# consider the current path as the root directory, to remove: use 'waf distclean'
- file = open('.lock-wscript', 'w')
+ file = open(g_lockfile, 'w')
file.write(blddir)
file.write('\n')
file.write(srcdir)
@@ -140,13 +140,13 @@
#bld = private_setup_build()
bld = Build.Build()
try:
- file = open('.lock-wscript', 'r')
+ file = open(g_lockfile, 'r')
blddir = file.readline().strip()
srcdir = file.readline().strip()
file.close()
except:
#raise
- fatal("Configuration loading failed - re-run waf configure (.lock-wscript cannot be read)")
+ fatal("Configuration loading failed - re-run waf configure (lockfile cannot be read)")
Params.g_cachedir = blddir+os.sep+'_cache_'
@@ -326,7 +326,7 @@
for (root, dirs, filenames) in os.walk('.'):
to_remove = False
for f in list(filenames):
- if f=='.lock-wscript':
+ if f==g_lockfile:
# removes a lock, and the builddir indicated
to_remove = True
file = open(os.path.join(root, f), 'r')
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic