forked from CxxTest/cxxtest
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwscript
27 lines (21 loc) · 863 Bytes
/
wscript
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#! /usr/bin/env python
# encoding: utf-8
import waflib
def configure(ctx):
ctx.load('cxxtest')
if ctx.check_cxxtest_version() < (4, 4):
ctx.fatal('cxxtest version is too old')
def build(ctx):
ctx.env.CXXTEST_ROOT = ctx.path.get_src().abspath()
if not waflib.Options.options.skip_git:
ctx(rule = 'OUTPUT=$(cd %s && git rev-parse HEAD && \
((git tag --contains ; echo "<no-tag>") | head -n1) \
&& git diff) && echo "$OUTPUT" > ${TGT}' %
(ctx.env.CXXTEST_ROOT),
target = 'cxxtest.gitid',
always = True)
gitidNode = ctx.path.get_bld().find_or_declare('cxxtest.gitid')
ctx.install_files('${PREFIX}',
gitidNode,
cwd = ctx.srcnode,
relative_trick = True)