mirror of https://gitlab.com/ita1024/waf.git
docs
This commit is contained in:
parent
c6f6bb29b1
commit
9e2ab03b3c
|
@ -1,5 +1,9 @@
|
||||||
#! /usr/bin/env python
|
#! /usr/bin/env python
|
||||||
|
|
||||||
|
"""
|
||||||
|
Create a tarball of the build results
|
||||||
|
"""
|
||||||
|
|
||||||
top = '.'
|
top = '.'
|
||||||
|
|
||||||
def configure(conf):
|
def configure(conf):
|
||||||
|
@ -11,7 +15,7 @@ def build(bld):
|
||||||
|
|
||||||
# ---------------------------
|
# ---------------------------
|
||||||
|
|
||||||
import shutil
|
import shutil, os
|
||||||
|
|
||||||
from waflib import Build
|
from waflib import Build
|
||||||
class package_cls(Build.InstallContext):
|
class package_cls(Build.InstallContext):
|
||||||
|
@ -25,6 +29,8 @@ class package_cls(Build.InstallContext):
|
||||||
shutil.rmtree(self.tmp.abspath())
|
shutil.rmtree(self.tmp.abspath())
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
if os.path.exists(self.tmp.abspath()):
|
||||||
|
self.fatal('Could not remove the temporary directory %r' % self.tmp)
|
||||||
self.tmp.mkdir()
|
self.tmp.mkdir()
|
||||||
self.options.destdir = self.tmp.abspath()
|
self.options.destdir = self.tmp.abspath()
|
||||||
|
|
||||||
|
@ -37,7 +43,7 @@ class package_cls(Build.InstallContext):
|
||||||
|
|
||||||
files = self.tmp.ant_glob('**')
|
files = self.tmp.ant_glob('**')
|
||||||
|
|
||||||
# we could mess with multiple inheritance but that's probably unnecessary
|
# we could mess with multiple inheritance but this is probably unnecessary
|
||||||
from waflib import Scripting
|
from waflib import Scripting
|
||||||
ctx = Scripting.Dist()
|
ctx = Scripting.Dist()
|
||||||
ctx.files = files
|
ctx.files = files
|
||||||
|
@ -47,3 +53,10 @@ class package_cls(Build.InstallContext):
|
||||||
|
|
||||||
shutil.rmtree(self.tmp.abspath())
|
shutil.rmtree(self.tmp.abspath())
|
||||||
|
|
||||||
|
# for variants, add command subclasses "package_release", "package_debug", etc
|
||||||
|
#def init(ctx):
|
||||||
|
# for x in VARIANTS.split():
|
||||||
|
# class tmp(y):
|
||||||
|
# cmd = package + '_' + x
|
||||||
|
# variant = x
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue