summaryrefslogtreecommitdiff
path: root/odb/buildfile
diff options
context:
space:
mode:
Diffstat (limited to 'odb/buildfile')
-rw-r--r--odb/buildfile144
1 files changed, 5 insertions, 139 deletions
diff --git a/odb/buildfile b/odb/buildfile
index 2625e0d..78b5d08 100644
--- a/odb/buildfile
+++ b/odb/buildfile
@@ -1,143 +1,9 @@
-# file : odb/buildfile
+# file : buildfile
# license : GNU GPL v3; see accompanying LICENSE file
-define plugin: libs
+./: {*/ -build/ -m4/} doc{INSTALL NEWS README} legal{GPLv3 LICENSE} manifest
-plugin{*}:
-{
- bin.lib.prefix = # No lib prefix.
- backlink = true # Backlink in forwarded configs (next to exe).
-}
-
-# For now we use the .so extension everywhere except Windows (see
-# plugin_path() in odb.cxx for details).
-#
-if ($cxx.target.class != 'windows')
- plugin{*}: extension = so
-
-# By default install the plugin next to the driver.
-#
-# On Windows this is the only sane option where we want the plugin (odb.dll)
-# to go into bin/ since failed that we won't be able to find libraries we
-# depend on.
-#
-# On other platforms another option is to install into the GCC's plugin
-# directory. This way the same driver can be used with multiple GCC versions
-# and is something that distributions packagers sometimes want to do.
-#
-# So at some point we should also make it configurable, including support for
-# installing into GCC's plugin directory.
-#
-# NOTE: see ODB_GCC_PLUGIN_DIR when adding this support.
-#
-plugin{*}: install = bin/
-
-# Unless cross-compiling, pass the C++ compiler's recall path as the g++
-# name. At some point we should also make it configurable.
-#
-# Note that we used to compare complete target triplets but that prooved too
-# strict. For example, we may be running on x86_64-apple-darwin17.7.0 while
-# the compiler is targeting x86_64-apple-darwin17.3.0.
-#
-if ($cxx.target.cpu == $build.host.cpu && \
- $cxx.target.system == $build.host.system)
-{
- gxx_name = $recall($cxx.path)
- gxx_name = $regex.replace($gxx_name, '\\', '\\\\') # Escape back slashes.
-}
-else
- gxx_name = g++
-
-import libs = libcutl%lib{cutl}
-import libs += libstudxml%lib{studxml}
-
-./: exe{odb} plugin{odb}
-
-# We need to make driver depend on plugin but not link it so that when, for
-# example, driver is imported, plugin is updated as well.
-#
-# We, however, don't want to install via the driver since the same driver
-# build could be used with multiple plugin builds (e.g., for different GCC
-# versions, which is something distribution packagers sometimes want to do).
-# @@ For this we will have to wait for operation-specific values support.
-#
-exe{odb}: cxx{odb}
-exe{odb}: libus{odb}: bin.whole = false
-exe{odb}: plugin{odb}: include = adhoc
-
-# Target metadata, see also --build2-metadata in odb.cxx.
-#
-# While ODB itself doesn't use any environment variables, it uses GCC
-# underneath which does (see "Environment Variables Affecting GCC").
-#
-exe{odb}:
-{
- export.metadata = 1 odb
- odb.name = [string] odb
- odb.version = [string] $version
- odb.checksum = [string] $version
- odb.environment = [strings] CPATH CPLUS_INCLUDE_PATH GCC_EXEC_PREFIX COMPILER_PATH
-}
-
-plugin{odb}: libus{odb}
-
-switch $cxx.target.system
-{
- # On Windows we have to link the import stub.
- #
- case 'mingw32'
- plugin{odb}: cxx.libs += $plugin_dir/cc1plus.exe.a
-
- # On Mac OS we have to allow undefined symbols.
- #
- case 'darwin'
- plugin{odb}: cxx.loptions += -undefined dynamic_lookup
-}
-
-libus{odb}: {hxx ixx txx cxx}{** -odb -options} {hxx ixx cxx}{options} $libs
-
-# Build options.
-#
-cxx.poptions += "-I$plugin_dir/include" "-DODB_GXX_NAME=\"$gxx_name\""
-cxx.poptions += -DODB_BUILD2 # @@ TMP while supporting other build systems.
-
-# Pass the copyright notice extracted from the LICENSE file.
-#
-copyright = $process.run_regex(cat $src_root/LICENSE, \
- 'Copyright \(c\) (.+)\.', \
- '\1')
-
-obj{odb}: cxx.poptions += -DODB_COPYRIGHT=\"$copyright\"
-
-# Generated options parser.
-#
-# @@ TMP: currently generated code is committed to allow building from git.
-#
-if $cli.configured
-{
- cli.cxx{options}: cli{options}
-
- cli.options += --include-with-brackets --include-prefix odb \
---guard-prefix ODB --generate-file-scanner --generate-specifier \
---generate-modifier --generate-description --suppress-undocumented \
---cxx-prologue '#include <odb/option-parsers.hxx>'
-
- cli.cxx{*}:
- {
- # Include the generated cli files into the distribution and don't remove
- # them when cleaning in src (so that clean results in a state identical to
- # distributed).
- #
- dist = true
- clean = ($src_root != $out_root)
-
- # We keep the generated code in the repository so copy it back to src in
- # case of a forwarded configuration.
- #
- backlink = overwrite
- }
-}
-
-# Don't install any of the plugin's headers.
+# Don't install tests or the INSTALL file.
#
-{hxx ixx txx}{*}: install = false
+tests/: install = false
+doc{INSTALL}@./: install = false