mirror of https://gitlab.com/ita1024/waf.git
31 lines
799 B
Python
31 lines
799 B
Python
#! /usr/bin/env python
|
|
# encoding: utf-8
|
|
# Thomas Nagy, 2016
|
|
#
|
|
# DESTDIR=/tmp/somedir waf install
|
|
|
|
def configure(conf):
|
|
pass
|
|
|
|
from waflib import TaskGen, Build, Utils
|
|
@TaskGen.feature('ruler')
|
|
@TaskGen.before('process_rule')
|
|
def test(self):
|
|
if not self.bld.is_install:
|
|
while self.meths: # cancel everything
|
|
self.meths.pop()
|
|
return
|
|
|
|
tg = self.bld.get_tgen_by_name(self.bring_in)
|
|
tg.post() # let it create its installation task
|
|
assert tg.install_task.outputs
|
|
self.source = tg.install_task.outputs
|
|
|
|
def build(bld):
|
|
bld.install_as('${PREFIX}/bin/foo', 'wscript', chmod=Utils.O755)
|
|
bld.symlink_as('${PREFIX}/bin/bar', 'foo')
|
|
tsk = bld.install_files('${PREFIX}/bin', 'wscript', chmod=Utils.O755, name='cheese')
|
|
bld(rule='ls -l ${SRC}', always=True, bring_in='cheese', features='ruler')
|
|
|
|
|