mirror of https://gitlab.com/ita1024/waf.git
Remove some dust in the wscript file
This commit is contained in:
parent
4bc064a119
commit
09888adcc7
19
wscript
19
wscript
|
@ -48,7 +48,7 @@ def sub_file(fname, lst):
|
||||||
f.close()
|
f.close()
|
||||||
|
|
||||||
print("------> Executing code from the top-level wscript <-----")
|
print("------> Executing code from the top-level wscript <-----")
|
||||||
def init(*k, **kw):
|
def init(ctx):
|
||||||
if Options.options.setver: # maintainer only (ita)
|
if Options.options.setver: # maintainer only (ita)
|
||||||
ver = Options.options.setver
|
ver = Options.options.setver
|
||||||
hexver = Utils.num2ver(ver)
|
hexver = Utils.num2ver(ver)
|
||||||
|
@ -64,15 +64,12 @@ def init(*k, **kw):
|
||||||
#rev = k[0].cmd_and_log('git log | grep "^commit" | wc -l', quiet=0).strip()
|
#rev = k[0].cmd_and_log('git log | grep "^commit" | wc -l', quiet=0).strip()
|
||||||
rev = k[0].cmd_and_log("git rev-parse HEAD").strip()
|
rev = k[0].cmd_and_log("git rev-parse HEAD").strip()
|
||||||
pats.append(('^WAFREVISION(.*)', 'WAFREVISION="%s"' % rev))
|
pats.append(('^WAFREVISION(.*)', 'WAFREVISION="%s"' % rev))
|
||||||
except:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
sub_file('waflib/Context.py', pats)
|
sub_file('waflib/Context.py', pats)
|
||||||
|
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
elif Options.options.waf:
|
|
||||||
create_waf()
|
|
||||||
sys.exit(0)
|
|
||||||
|
|
||||||
def check(ctx):
|
def check(ctx):
|
||||||
sys.path.insert(0,'')
|
sys.path.insert(0,'')
|
||||||
|
@ -228,8 +225,8 @@ def sfilter(path):
|
||||||
return (io.BytesIO(cnt.encode('utf-8')), len(cnt), cnt)
|
return (io.BytesIO(cnt.encode('utf-8')), len(cnt), cnt)
|
||||||
|
|
||||||
def create_waf(*k, **kw):
|
def create_waf(*k, **kw):
|
||||||
#print("-> preparing waf")
|
|
||||||
mw = 'tmp-waf-'+VERSION
|
mw = 'tmp-waf-'+VERSION
|
||||||
|
print("-> preparing %r" % mw)
|
||||||
|
|
||||||
import tarfile, re
|
import tarfile, re
|
||||||
|
|
||||||
|
@ -323,11 +320,9 @@ def create_waf(*k, **kw):
|
||||||
ccc = code1.replace("C1='x'", "C1='%s'" % C1).replace("C2='x'", "C2='%s'" % C2)
|
ccc = code1.replace("C1='x'", "C1='%s'" % C1).replace("C2='x'", "C2='%s'" % C2)
|
||||||
|
|
||||||
f.write(ccc.encode())
|
f.write(ccc.encode())
|
||||||
f.write(b'#==>\n')
|
f.write(b'#==>\n#')
|
||||||
f.write(b'#')
|
|
||||||
f.write(cnt)
|
f.write(cnt)
|
||||||
f.write(b'\n')
|
f.write(b'\n#<==\n')
|
||||||
f.write(b'#<==\n')
|
|
||||||
f.close()
|
f.close()
|
||||||
|
|
||||||
if sys.platform == 'win32' or Options.options.make_batch:
|
if sys.platform == 'win32' or Options.options.make_batch:
|
||||||
|
@ -352,7 +347,9 @@ def configure(conf):
|
||||||
|
|
||||||
def build(bld):
|
def build(bld):
|
||||||
waf = bld.path.make_node('waf') # create the node right here
|
waf = bld.path.make_node('waf') # create the node right here
|
||||||
bld(name='create_waf', rule=create_waf, target=waf, always=True, color='PINK', update_outputs=True)
|
tg = bld(name='create_waf', rule=create_waf, target=waf, always=True, color='PINK', update_outputs=True)
|
||||||
|
tg.post()
|
||||||
|
|
||||||
|
|
||||||
#def dist():
|
#def dist():
|
||||||
# import Scripting
|
# import Scripting
|
||||||
|
|
Loading…
Reference in New Issue