From 930ae81f85e5ee5ac37311f5e9c89000fbcb59a6 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Thu, 1 Aug 2019 16:17:09 +0300 Subject: Move bash build system module to separate library --- libbuild2/bash/buildfile | 65 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 libbuild2/bash/buildfile (limited to 'libbuild2/bash/buildfile') diff --git a/libbuild2/bash/buildfile b/libbuild2/bash/buildfile new file mode 100644 index 0000000..e1a9f53 --- /dev/null +++ b/libbuild2/bash/buildfile @@ -0,0 +1,65 @@ +# file : libbuild2/bash/buildfile +# copyright : Copyright (c) 2014-2019 Code Synthesis Ltd +# license : MIT; see accompanying LICENSE file + +import int_libs = libbutl%lib{butl} + +include ../ +int_libs += ../lib{build2} + +include ../in/ +int_libs += ../in/lib{build2-in} + +./: lib{build2-bash}: libul{build2-bash}: {hxx ixx txx cxx}{** -**.test...} \ + $int_libs + +# Unit tests. +# +exe{*.test}: +{ + test = true + install = false +} + +for t: cxx{**.test...} +{ + d = $directory($t) + n = $name($t)... + + ./: $d/exe{$n}: $t $d/{hxx ixx txx}{+$n} $d/testscript{+$n} + $d/exe{$n}: libul{build2-bash}: bin.whole = false +} + +# Build options. +# +obja{*}: cxx.poptions += -DLIBBUILD2_BASH_STATIC_BUILD +objs{*}: cxx.poptions += -DLIBBUILD2_BASH_SHARED_BUILD + +# Export options. +# +lib{build2-bash}: +{ + cxx.export.poptions = "-I$out_root" "-I$src_root" + cxx.export.libs = $int_libs +} + +liba{build2-bash}: cxx.export.poptions += -DLIBBUILD2_BASH_STATIC +libs{build2-bash}: cxx.export.poptions += -DLIBBUILD2_BASH_SHARED + +# For pre-releases use the complete version to make sure they cannot be used +# in place of another pre-release or the final version. See the version module +# for details on the version.* variable values. +# +if $version.pre_release + lib{build2-bash}: bin.lib.version = @"-$version.project_id" +else + lib{build2-bash}: bin.lib.version = @"-$version.major.$version.minor" + +# Install into the libbuild2/bash/ subdirectory of, say, /usr/include/ +# recreating subdirectories. +# +{hxx ixx txx}{*}: +{ + install = include/libbuild2/bash/ + install.subdirs = true +} -- cgit v1.1