From 5935476651cd063a53d08ec33b04513a7a8127e3 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 8 Nov 2019 09:19:08 +0200 Subject: Use $regex.replace_lines() for default host config processing --- libbuild2/buildfile | 8 +++----- 1 file 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...} -- cgit v1.1