From 0fb42229a5bf13170667701ad6cb468d58348007 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 2 Apr 2020 12:49:10 +0200 Subject: Fix ~host config to only contain cc and bin modules configuration Also add ~build2 that contains everything (except config.dist.*) to be used for build system modules. --- libbuild2/buildfile | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) (limited to 'libbuild2/buildfile') diff --git a/libbuild2/buildfile b/libbuild2/buildfile index a253ab1..578a4c8 100644 --- a/libbuild2/buildfile +++ b/libbuild2/buildfile @@ -45,21 +45,31 @@ libul{build2}: config/{hxx ixx txx cxx}{** -host-config -**.test...} \ config/cxx{host-config} # This will of course blow up spectacularly if we are cross-compiling. But -# let's wait and enjoy the fireworks (and get a sense of why would someone -# need to cross-compile a build system). +# let's wait and enjoy the fireworks (and get a sense of why someone would +# want to cross-compile a build system). # config/cxx{host-config}: config/in{host-config} { - # Remove comment lines which could be confused with preprocessor directives - # by some lesser compilers. + # For the ~host configuration we only want c/cxx/cc and bin that they load. + # For ~build2 we want to keep everything except dist. # - # Also filter out config.install.chroot -- we definitely don't want it - # carried through. + # We also remove comment lines which could be confused with preprocessor + # directives by some lesser compilers. # - host_config = $regex.replace_lines($config.save(), \ - '^ *(#|config.install.chroot).*$', \ - [null], \ - return_lines) + # For ~build2 also filter out config.install.chroot -- we definitely don't + # want it carried through. + # + build2_config = $regex.replace_lines( \ + $config.save(), \ + '^ *(#|config\.dist\.|config\.install\.chroot).*$', \ + [null], \ + return_lines) + + host_config = $regex.replace_lines( \ + $build2_config, \ + '^ *config\.(c[. ]|cxx[. ]|cc[.]|bin[.]).*$', \ + '$&', \ + format_no_copy return_lines) } libul{build2}: dist/{hxx ixx txx cxx}{** -**.test...} -- cgit v1.1