From 0688b3bc9134c6afb69f9d75f46d90c13a887334 Mon Sep 17 00:00:00 2001 From: Klaus Aehlig Date: Mon, 7 Nov 2022 09:00:00 +0100 Subject: Export default target Wrapt the default target in an export target, taking all effective variables as flexible. Besides improved caching if just is used as a dependency in a downstream project, this also improves documentation as all configuration tunables are explicit and the most important ones documented. In particular, the standard way of getting information on a project, i.e., calling just-mr describe now gives proper information. --- INSTALL.md | 4 ++-- TARGETS | 67 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 68 insertions(+), 3 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index b11869d3..4c137659 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -19,8 +19,8 @@ specify `arm64` as the target architecture via the `-D` flag: just-mr build -D '{"TARGET_ARCH":"arm64"}' ``` -A complete list of variables honored by our build rules is provided in the -following table: +The following table descries the most important supported configuration +variables. The full list can be obtained via `just-mr describe`. |Variable|Supported Values|Default Value for `just`| |-|:-:|:-:| diff --git a/TARGETS b/TARGETS index 766aea2b..dfac3c8e 100644 --- a/TARGETS +++ b/TARGETS @@ -1,4 +1,69 @@ -{ "": {"type": "install", "files": {"bin/just": "just"}} +{ "": + { "type": "export" + , "target": "installed just" + , "doc": ["The just binary."] + , "flexible_config": + [ "ADD_CFLAGS" + , "ADD_CXXFLAGS" + , "AR" + , "ARCH" + , "BUILD_STATIC_BINARY" + , "CC" + , "COMPILER_FAMILY" + , "CXX" + , "DEBUG" + , "ENV" + , "HOST_ARCH" + , "OS" + , "SOURCE_DATE_EPOCH" + , "TARGET_ARCH" + , "VERSION_EXTRA_SUFFIX" + ] + , "config_doc": + { "ARCH": + [ "The underlying architecture. Is taken as a default for \"HOST_ARCH\" and \"TARGET_ARCH\"." + , "" + , "One of \"x86\", \"x86_64\", \"arm\", \"arm64\". Defaults to \"x86_64\"." + ] + , "HOST_ARCH": + ["The architecture on which the build actions are carried out."] + , "TARGET_ARCH": ["The architecture for which to build the binary."] + , "COMPILER_FAMILY": + [ "The compiler family to use as (cross) toolchain." + , "" + , "Supported values are \"clang\" (the default), \"gcc\", and \"unkown\"." + , "The unknown compiler family tries to not make any assumptions on the" + , "used C and C++ compilers and uses the generic \"cc\" and \"c++\" as" + , "names for the respective compilers; typically used in conjunction with" + , "setting \"CC\" and \"CXX\" explicitly and building for host." + ] + , "ENV": + [ "Map from strings to strings. The build environment ot be used for" + , "build actions. Typically used to include an unusual value of PATH." + ] + , "BUILD_STATIC_BINARY": + [ "Boolean, default false. If set, try to build a (mainly) static binary." + ] + , "DEBUG": ["Boolean, default false. Wheter a to build a debug version."] + , "OS": + [ "Operating system to build for." + , "" + , "Currently, the only supported value is \"linux\", which is also the" + , "default." + ] + , "SOURCE_DATE_EPOCH": + [ "If set, embed the given time stamp (in seconds since the epoch) into" + , "the binary" + ] + , "VERSION_EXTRA_SUFFIX": + [ "String to extend the version suffix with." + , "" + , "Should be used to indicate additional (non-upstream) changes, e.g.," + , "due to packaging." + ] + } + } +, "installed just": {"type": "install", "files": {"bin/just": "just"}} , "exported-just": { "type": "export" , "target": ["src/buildtool/main", "just"] -- cgit v1.2.3