aboutsummaryrefslogtreecommitdiff
path: root/libbuild2
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2019-11-08 09:19:08 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2019-11-08 09:19:08 +0200
commit5935476651cd063a53d08ec33b04513a7a8127e3 (patch)
tree4433532d0adc04d22d551a6be54b421fe6bf9cac /libbuild2
parent30e991722c35e15c1343cc8772c69a00a5e06d96 (diff)
Use $regex.replace_lines() for default host config processing
Diffstat (limited to 'libbuild2')
-rw-r--r--libbuild2/buildfile8
1 files changed, 3 insertions, 5 deletions
diff --git a/libbuild2/buildfile b/libbuild2/buildfile
index 545ccba..6f368d0 100644
--- a/libbuild2/buildfile
+++ b/libbuild2/buildfile
@@ -39,14 +39,12 @@ libul{build2}: config/{hxx ixx txx cxx}{** -host-config -**.test...} \
# let's wait and enjoy the fireworks (and get a sense of why would someone
# need to cross-compile a build system).
#
-newline = '
-'
config/cxx{host-config}: config/in{host-config}
{
- # Remove comment lines which could be confused by some lesser compilers with
- # preprocessor directives.
+ # Remove comment lines which could be confused with preprocessor directives
+ # by some lesser compilers.
#
- host_config = $regex.replace($config.export(), "#.*$newline", '')
+ host_config = $regex.replace_lines($config.export(), '^ *#.*$', [null], return_lines)
}
libul{build2}: dist/{hxx ixx txx cxx}{** -**.test...}