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
|
||||
|
||||
"""
|
||||
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'
|
||||
|
||||
top = '.'
|
||||
|
@ -49,7 +52,7 @@ class package_cls(Build.InstallContext):
|
|||
# we could mess with multiple inheritance but this is probably unnecessary
|
||||
from waflib import Scripting
|
||||
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.tar_prefix = ''
|
||||
ctx.base_path = self.tmp
|
||||
|
@ -58,9 +61,9 @@ class package_cls(Build.InstallContext):
|
|||
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
|
||||
def init(ctx):
|
||||
for x in ['release', 'debug']:
|
||||
class tmp(package_cls):
|
||||
cmd = 'package_' + x
|
||||
variant = x
|
||||
|
||||
|
|
Loading…
Reference in New Issue