aboutsummaryrefslogtreecommitdiff
path: root/libbuild2
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2020-04-03 16:44:41 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2020-04-03 16:44:41 +0200
commitfd863534dc6cf6a4d6bd3278b96690f66cbc4706 (patch)
treeccb8881d887c260f9503bb45c0ecefc2a1aa33e3 /libbuild2
parent2b281d5ec758d3bddbf27c4098f0767e2471227a (diff)
Tweak ~host configuration extraction regex
Diffstat (limited to 'libbuild2')
-rw-r--r--libbuild2/buildfile10
1 files changed, 6 insertions, 4 deletions
diff --git a/libbuild2/buildfile b/libbuild2/buildfile
index 578a4c8..edd0570 100644
--- a/libbuild2/buildfile
+++ b/libbuild2/buildfile
@@ -65,10 +65,12 @@ config/cxx{host-config}: config/in{host-config}
[null], \
return_lines)
- host_config = $regex.replace_lines( \
- $build2_config, \
- '^ *config\.(c[. ]|cxx[. ]|cc[.]|bin[.]).*$', \
- '$&', \
+ # Also preserve blank lines between groups of options.
+ #
+ host_config = $regex.replace_lines( \
+ $build2_config, \
+ '^( *config\.(c[. ]|cxx[. ]|cc[.]|bin[.]).*|)$', \
+ '$&', \
format_no_copy return_lines)
}