From 8f7970330f5ac3f44551320ddc4603db22b0cec4 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Mon, 11 May 2020 01:42:23 +0100 Subject: [PATCH] nailing-cargo: Docs. Signed-off-by: Ian Jackson --- nailing-cargo | 52 ++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 49 insertions(+), 3 deletions(-) diff --git a/nailing-cargo b/nailing-cargo index 48f0d3d..1bca9d0 100755 --- a/nailing-cargo +++ b/nailing-cargo @@ -28,9 +28,50 @@ # https://github.com/rust-lang/cargo/issues/1481 # Options: -# TBD +# -v Increase verbosity. Default is 1. +# -q Set verbosity ot 0. +# -D Increase amount of debugging dump. +# +# -n "No action": stop after writing Cargo.toml.nailing~ +# everywhere, and do not run any build command. +# +# -T --target= +# Specify target architecture. If starts with a +# capital ascii letter, is an alias for some other arch +# looked up in Cargo.nail and then in the builtin list: +# RPI arm-unknown-linux-gnueabihf +# Translates to a --target= option to the ultimate command, +# unless that is a cargo subcommand which would reject it. +# +# -u | --cargo-lock-update +# -U | --no-cargo-lock-update +# Arranges to do a dance to allow Cargo.lock (or +# alternative) to be updated in the source directory. +# +# The Cargo.lock and Cargo.toml are copied to the build +# directory along with a skeleton just big enough to fool +# cargo. After cargo has run, the resulting Cargo.lock is +# copied back to the source tree. +# +# Makes no sense with in-tree builds. +# +# Default is no update unless the ultimate command is a +# cargo subcommand which we know needs it. +# +# -m | --cargo-manifest-args +# -M | --no-cargo-manifest-args +# Controls whether we add cargo command line options +# relating to finding Cargo.toml, to the command to +# run. +# +# Default is true if we are doing an out-of- tree build, +# unless we are updating the Cargo.lock (in which case the +# only relevant files are to be found in the build directory). +# +# The arguments are +# --manifest-path= +# --locked --target-dir=target # - # Cargo.nail: # # # Adds each to the list of directories whose @@ -104,7 +145,12 @@ # Ideally should be configurable, and also perhaps be able # to combine multiple Cargo.nail files ? # -# Env vars: +# Env vars we pass to the command: +# NAILINGCARGO_WORKSPHERE absolute path of invocation .. +# NAILINGCARGO_MANIFEST_DIR absolute path of invocation . +# NAILINGCARGO_BUILDSPHERE only if out of tree: abs parent of build dir +# NAILINGCARGO_BUILD_DIR absolute path of build dir (even if = src) + our $self; -- 2.30.2