From 835528be01c5c2d68f4857d75b760d1077ff3233 Mon Sep 17 00:00:00 2001 From: Thomas Nagy Date: Tue, 14 Jan 2014 20:01:05 +0100 Subject: [PATCH] docs for the regexp substitution in demos/subst/ --- demos/subst/foo.in | 2 +- demos/subst/wscript | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/demos/subst/foo.in b/demos/subst/foo.in index ca332d31..67371c56 100644 --- a/demos/subst/foo.in +++ b/demos/subst/foo.in @@ -1,2 +1,2 @@ -prefix: @PREFIX@ +prefix: %PREFIX% bindir: @BINDIR@ diff --git a/demos/subst/wscript b/demos/subst/wscript index 6e6a54d8..e0173027 100644 --- a/demos/subst/wscript +++ b/demos/subst/wscript @@ -4,7 +4,7 @@ top = '.' out = 'bin' -import os +import os, re from waflib import Utils def configure(conf): @@ -23,6 +23,7 @@ def build(bld): install_path = '/tmp/uff/', # installation path, optional chmod = Utils.O755, # installation mode, optional PREFIX = bld.env.PREFIX, # variables to use in the substitution + re_m4 = re.compile('%%(\w+)%%', re.M), # custom substitution BINDIR = bld.env.BINDIR) # if you are using an external dict, here is to merge the key/values: