From 77f0b35782edcfad2c73cc75784b926c1e8b9a74 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Fri, 2 Sep 2022 21:22:18 +0300 Subject: Add odb and cli conditional build-time dependencies --- build/root.build | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) (limited to 'build/root.build') diff --git a/build/root.build b/build/root.build index 11c109f..cbbbe4b 100644 --- a/build/root.build +++ b/build/root.build @@ -1,6 +1,10 @@ # file : build/root.build # license : MIT; see accompanying LICENSE file +config [bool] config.brep.develop ?= false + +develop = $config.brep.develop + cxx.std = latest using cxx @@ -19,14 +23,6 @@ if ($cxx.id == 'gcc') cxx.poptions =+ "-I$out_root" "-I$src_root" -# Load the cli module but only if it's available. This way a distribution -# that includes pre-generated files can be built without installing cli. -# This is also the reason why we need to explicitly spell out individual -# source file prerequisites instead of using the cli.cxx{} group (it won't -# be there unless the module is configured). -# -using? cli - # Bash. # using bash @@ -35,6 +31,9 @@ brep/bash{*}: install.subdirs = true # Define commonly used target types. # +define cli: file +cli{*}: extension = cli + define css: file css{*}: extension = css @@ -56,7 +55,10 @@ test.target = $cxx.target # Extract the copyright notice from the LICENSE file. # -copyright = $process.run_regex( \ - cat $src_root/LICENSE, \ - 'Copyright \(c\) (.+) \(see the AUTHORS and LEGAL files\)\.', \ - '\1') +# Note that cat is a builtin which means this is both portable and fast. +# +if ($build.mode != 'skeleton') + copyright = $process.run_regex( \ + cat $src_root/LICENSE, \ + 'Copyright \(c\) (.+) \(see the AUTHORS and LEGAL files\)\.', \ + '\1') -- cgit v1.1