aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/buildfile
diff options
context:
space:
mode:
Diffstat (limited to 'libbuild2/buildfile')
-rw-r--r--libbuild2/buildfile30
1 files changed, 20 insertions, 10 deletions
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...}