bdep-init(1)
π bdep-init(1) β the girlies' guide to initializing ur project π
okay so bestie, this is bdep-init, from the General Commands Manual section, and it's literally the command that gets ur project set up in ur build configurations. i'm obsessed. let's go β¨
πΈ NAME πΈ
bdep-init β initialize project in build configurations π
β¨ SYNOPSIS β¨
like, here's the whole vibe, verbatim, no cap:
bdep init [options] [pkg-spec] [cfg-spec] [pkg-args]
bdep init [options] [prj-spec] --empty|-E
bdep init [options] [pkg-spec] --config-add|-A cfg-dir [@cfg-name]
[pkg-args]
bdep init [options] [pkg-spec] --config-create|-C cfg-dir [@cfg-name]
[cfg-args] [-- pkg-args]
cfg-spec = (@cfg-name | --config|-c cfg-dir)... | --all|-a
pkg-spec = (--directory|-d pkg-dir)... | prj-spec
prj-spec = --directory|-d prj-dir
pkg-args = (?pkg | cfg-var)...
cfg-args = [-- [bpkg-options]] [--existing|-e | (module | cfg-var)...]
π¦ DESCRIPTION π¦
so the init command initializes a project in one or more build configurations. that's the whole main character moment.
first form: it initializes the specified project packages (pkg-spec), or β if the project itself is specified (prj-spec) β all its available packages, in one or more build configurations (cfg-spec) that have already been associated with the project. that association thing lives in bdep-config(1) if u wanna go read it.
if no project directory is specified, then the current working directory is assumed. periodt. and if no configuration is specified, then the default configuration is assumed β which fails if multiple default configurations are present, so like, don't do that π. head to bdep-projects-configs(1) for the full tea on specifying projects and configurations. the optional pkg-args are the additional dependency packages and/or configuration variables to pass to the underlying bpkg-pkg-build(1) command.
second form (--empty is specified): initializes an empty project database that u can later use to first add build configurations (bdep-config(1)) and then initialize project packages using the first form. it's giving "build it from scratch, queen" π
third (--config-add) and fourth (--config-create) forms: these are shortcuts to first adding an existing or newly created build configuration and then initializing project packages in that configuration. semantically they're equivalent to first performing the config add or config create commands (bdep-config(1)), respectively, followed by the first form. no cap.
optional cfg-args in the fourth form are the additional arguments to the underlying bpkg-cfg-create(1) command. now listen β in this case, to specify pkg-args without specifying cfg-args u have to use two -- separators, like:
$ bdep init -C ../prj-gcc @gcc -- -- ?sys:libsqlite3/*
configuration variables can be specified to only apply to specific packages in pkg-args using the argument grouping mechanism (bdep-argument-grouping(1)). additionally, such packages can be placed into specific linked configurations by specifying the configuration with one of the --config* options (or @ notation) using the same grouping mechanism. for example (assuming gcc is linked to common):
$ bdep init @gcc { @common config.liblarge.extra=true }+ ?liblarge
π EXAMPLES π
okay so as an example, consider project prj with two packages, foo and libfoo:
prj/
|-- foo/
`-- libfoo/
the following invocations illustrate the common init use cases (the current working directory is shown before the shell prompt, iykyk).
create new build configuration in ../prj-gcc, call it gcc, and initialize project packages foo and libfoo in this configuration:
prj/$ bdep init -C ../prj-gcc @gcc cc config.cxx=g++
create new build configuration in ../prj-clang using bpkg-cfg-create(1). then add it calling it clang and initialize project package foo in this configuration:
prj/$ bpkg create -d ../prj-clang cc config.cxx=clang++
prj/$ cd foo
foo/$ bdep init -A ../../prj-clang @clang
initialize project package libfoo in the build configuration clang:
foo/$ cd ..
prj/$ bdep init -d libfoo @clang
the following set of invocations achieves the same end result but using the bdep-config(1) command to manage configuration. slay, options.
initialize an empty project database:
prj/$ bdep init --empty
create new build configuration in ../prj-gcc, call it gcc:
prj/$ bdep config create ../prj-gcc @gcc cc config.cxx=g++
add existing build configuration in ../prj-clang, call it clang.
prj/$ bdep config add ../prj-clang @clang
initialize project packages foo and libfoo in build configurations gcc and clang.
prj/$ bdep init @gcc @clang
or, alternatively, in all the build configurations:
prj/$ bdep init -a
π INIT OPTIONS π
--empty,-Eβ initialize an empty build configuration set.--config-add,-Adir β add an existing build configuration dir.--config-create,-Cdir β create a new build configuration in dir.--no-syncβ enter the project into the database but do not initialize it in the build configurations. the initialization can be finished later with an explicitbdep-sync(1)command. so like, half-done, come back later bestie.--sys-no-queryβ do not query the system package manager for the installed versions of packages specified with thesysscheme. see the correspondingbpkg-pkg-build(1)option for details.--sys-installβ instruct the system package manager to install available versions of packages specified with thesysscheme that are not already installed. see the correspondingbpkg-pkg-build(1)option for details.--sys-no-fetchβ do not fetch the system package manager metadata before querying for available versions of packages specified with thesysscheme. see the correspondingbpkg-pkg-build(1)option for details.--sys-no-stubβ do no require a stub for packages specified with thesysscheme. see the correspondingbpkg-pkg-build(1)option for details.--sys-yesβ assume the answer to the system package manager prompts is yes. see the correspondingbpkg-pkg-build(1)option for details.--sys-sudoprog β thesudoprogram to use for system package manager interactions that normally require administrative privileges (fetch package metadata, install packages, etc). see the correspondingbpkg-pkg-build(1)option for details.--create-host-configβ create a configuration for build-time dependencies without prompt (seebdep-sync(1)for details).--create-build2-configβ create a configuration for build system module dependencies without prompt (seebdep-sync(1)for details).--type,--config-typetyp β the type of the configuration being created. by default, configuration of typetargetis created. seebpkg-cfg-create(1)for background on configuration types.--defaultβ make the added or created configuration the default.--no-defaultβ don't make the first added or created configuration the default.--forwardβ make the added or created configuration forwarded.--no-forwardβ don't make the added or created configuration forwarded.--auto-syncβ make the added or created configuration automatically synchronized.--no-auto-syncβ don't make the added or created configuration automatically synchronized.--existing,-eβ initialize a bpkg configuration based on an existing build system configuration.--wipeβ wipe the configuration directory clean before creating the new configuration. β οΈ girl. it wipes. be so serious.--all,-aβ use all build configurations.--config,-cdir β specify the build configuration as a directory.--directory,-ddir β assume project/package is in the specified directory rather than in the current working directory.--config-name,-nname β specify the build configuration as a name.--config-idnum β specify the build configuration as an id.
π COMMON OPTIONS π
these are summarized below, with a more detailed description available in bdep-common-options(1). not me giving u the recap tho π
-vβ print essential underlying commands being executed.-Vβ print all underlying commands being executed.--quiet,-qβ run quietly, only printing error messages. shhh.--verboselevel β set the diagnostics verbosity to level between0and6.--stdout-formatformat β representation format to use for printing to stdout.--jobs,-jnum β number of jobs to perform in parallel.--progressβ display progress indicators for long-lasting operations, such as network transfers, building, etc.--no-progressβ suppress progress indicators for long-lasting operations, such as network transfers, building, etc.--diag-colorβ use color in diagnostics.--no-diag-colorβ don't use color in diagnostics.--bpkgpath β the package manager program to be used for build configuration management.--bpkg-optionopt β additional option to be passed to the package manager program.--buildpath β the build program to be used to build packages.--build-optionopt β additional option to be passed to the build program.--curlpath β the curl program to be used for network operations.--curl-optionopt β additional option to be passed to the curl program.--pagerpath β the pager program to be used to show long text.--pager-optionopt β additional option to be passed to the pager program.--options-filefile β read additional options from file.--default-optionsdir β the directory to load additional default options files from.--no-default-optionsβ don't load default options files.
π§ DEFAULT OPTIONS FILES π§
see bdep-default-options-files(1) for an overview of the default options files. for the init command the search start directory is the project directory. the following options files are searched for in each directory and, if found, loaded in the order listed:
bdep.options
bdep-{config config-add}.options # if --config-add|-A
bdep-{config config-add config-create}.options # if --config-create|-C
bdep-init.options
β οΈ and listen, theseinitcommand options cannot be specified in the default options files:--directory|-d --config-add|-A --config-create|-C --wipe
like, they're just too powerful for the options files. respect the boundary π
π BUGS π
send bug reports to the users@build2.org mailing list. we listen, we fix. π«Ά
π COPYRIGHT π
copyright (c) 2014-2024 the build2 authors.
permission is granted to copy, distribute and/or modify this document under the terms of the MIT License. iconic, honestly.
and that's the whole thing bestie π this was from bdep 0.17.0, dated June 2024, and yes it's the bdep-init(1) page β go initialize something, u got this β¨ππ¦
π¦ where this page comes from
- fedora 43: bdep 0.17.0-5.fc43 Β· MIT
- fedora 44: bdep 0.17.0-7.fc44 Β· MIT
- nixos 26.05: bdep 0.17.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms