configure.py: "ninja help" target
This adds a "help" build target, which prints out important build targets. The printing is done in a separate shell script, becaue "ninja" insists on print out the "command" before executing it, which makes the help text unreadable.
This commit is contained in:
@@ -2023,6 +2023,9 @@ with open(buildfile_tmp, 'w') as f:
|
||||
rule extract_node_exporter
|
||||
command = tar -C build -xvpf {node_exporter_filename} && rm -rfv build/node_exporter && mv -v build/{node_exporter_dirname} build/node_exporter
|
||||
build $builddir/node_exporter: extract_node_exporter | always
|
||||
rule print_help
|
||||
command = ./scripts/build-help.sh
|
||||
build help: print_help | always
|
||||
''').format(**globals()))
|
||||
|
||||
os.rename(buildfile_tmp, buildfile)
|
||||
|
||||
19
scripts/build-help.sh
Executable file
19
scripts/build-help.sh
Executable file
@@ -0,0 +1,19 @@
|
||||
#!/bin/sh
|
||||
|
||||
cat << EOF
|
||||
usage: ninja [options] [targets...]
|
||||
|
||||
Run \`ninja -h\` for help on supported options.
|
||||
|
||||
Build targets:
|
||||
build Build artifacts for all configured build modes.
|
||||
<mode>-build Build artifacts for a specific build mode.
|
||||
|
||||
Test targets:
|
||||
test Run tests for all configured build modes.
|
||||
<mode>-test Run tests for a specific build mode.
|
||||
|
||||
Packaging targets:
|
||||
dist Build distribution packages (.rpm, .deb) for all build modes.
|
||||
<mode>-dist Build distribution packages (.rpm, .deb) for a specific build mode.
|
||||
EOF
|
||||
Reference in New Issue
Block a user