Generate pkg-config for Hammer
Create a pkg-config file and install it to $prefix/lib/pkgconfig
This commit is contained in:
parent
76b445ddb1
commit
f220524b5a
5 changed files with 30 additions and 2 deletions
15
tools/scanreplace.py
Normal file
15
tools/scanreplace.py
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
from string import Template
|
||||
|
||||
def replace_action(target, source, env):
|
||||
open(str(target[0]), 'w').write(Template(open(str(source[0]), 'r').read()).safe_substitute(env))
|
||||
return 0
|
||||
|
||||
def replace_string(target, source, env):
|
||||
return "building '%s' from '%s'" % (str(target[0]), str(source[0]))
|
||||
|
||||
def generate(env, **kw):
|
||||
action = env.Action(replace_action, replace_string)
|
||||
env['BUILDERS']['ScanReplace'] = env.Builder(action=action, src_suffix='.in', single_source=True)
|
||||
|
||||
def exists(env):
|
||||
return 1
|
||||
BIN
tools/scanreplace.pyc
Normal file
BIN
tools/scanreplace.pyc
Normal file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue