2
0
mirror of https://gitlab.com/ita1024/waf.git synced 2024-11-24 18:59:39 +01:00

docs for the regexp substitution in demos/subst/

This commit is contained in:
Thomas Nagy 2014-01-14 20:01:05 +01:00
parent 3581b89fbb
commit 835528be01
2 changed files with 3 additions and 2 deletions

View File

@ -1,2 +1,2 @@
prefix: @PREFIX@ prefix: %PREFIX%
bindir: @BINDIR@ bindir: @BINDIR@

View File

@ -4,7 +4,7 @@
top = '.' top = '.'
out = 'bin' out = 'bin'
import os import os, re
from waflib import Utils from waflib import Utils
def configure(conf): def configure(conf):
@ -23,6 +23,7 @@ def build(bld):
install_path = '/tmp/uff/', # installation path, optional install_path = '/tmp/uff/', # installation path, optional
chmod = Utils.O755, # installation mode, optional chmod = Utils.O755, # installation mode, optional
PREFIX = bld.env.PREFIX, # variables to use in the substitution PREFIX = bld.env.PREFIX, # variables to use in the substitution
re_m4 = re.compile('%%(\w+)%%', re.M), # custom substitution
BINDIR = bld.env.BINDIR) BINDIR = bld.env.BINDIR)
# if you are using an external dict, here is to merge the key/values: # if you are using an external dict, here is to merge the key/values: