mirror of https://gitlab.com/ita1024/waf.git
docs
This commit is contained in:
parent
9af5cc3909
commit
c64bd5e317
|
@ -1,10 +1,13 @@
|
||||||
#! /usr/bin/env python
|
#! /usr/bin/env python
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Create a tarball of the build results
|
Create a tarball of the build results. The package command aggregates
|
||||||
|
the functionality of build, install and dist in a single command.
|
||||||
|
|
||||||
|
$ waf configure package
|
||||||
"""
|
"""
|
||||||
|
|
||||||
APPNAME = 'pack'
|
APPNAME = 'ex'
|
||||||
VERSION = '1.0'
|
VERSION = '1.0'
|
||||||
|
|
||||||
top = '.'
|
top = '.'
|
||||||
|
@ -49,7 +52,7 @@ class package_cls(Build.InstallContext):
|
||||||
# we could mess with multiple inheritance but this is 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.arch_name = 'fffffuuuu.tar.bz2'
|
ctx.arch_name = '%s%s-%s.tar.bz2' % (APPNAME, self.variant, VERSION) # if defined
|
||||||
ctx.files = files
|
ctx.files = files
|
||||||
ctx.tar_prefix = ''
|
ctx.tar_prefix = ''
|
||||||
ctx.base_path = self.tmp
|
ctx.base_path = self.tmp
|
||||||
|
@ -58,9 +61,9 @@ 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
|
# for variants, add command subclasses "package_release", "package_debug", etc
|
||||||
#def init(ctx):
|
def init(ctx):
|
||||||
# for x in VARIANTS.split():
|
for x in ['release', 'debug']:
|
||||||
# class tmp(y):
|
class tmp(package_cls):
|
||||||
# cmd = package + '_' + x
|
cmd = 'package_' + x
|
||||||
# variant = x
|
variant = x
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue