Needy

The Dependency Helper

Commands

This is an overview of some of the commands available. You should also see the authoritative source for more: needy --help.

satisfy

Satisfies your needs. This builds the specified libraries for the specified targets.

Example:

cbrown@mbp:~/example% needy satisfy smaz
Satisfying needs in /Users/cbrown/example
[OUT-OF-DATE] smaz
Building for osx x86_64
mkdir -p /Users/cbrown/example/needs/smaz/build/osx/x86_64/include /Users/cbrown/example/needs/smaz/build/osx/x86_64/lib
c++ -c smaz.c -o smaz.o
ar -rc /Users/cbrown/example/needs/smaz/build/osx/x86_64/lib/libsmaz.a smaz.o
cp smaz.h /Users/cbrown/example/needs/smaz/build/osx/x86_64/include/smaz.h
[SUCCESS] smaz

status

Shows the status of your needs. Useful for seeing what’s up-to-date.

Example:

cbrown@mbp:~/example% needy status -u iphoneos
Status for iphoneos:

    sparkle         out-of-date
    webglnoise      up-to-date
    args            out-of-date

cflags

Provides the flags necessary to add the header paths to your compilation.

Example:

cbrown@mbp:~/example% needy cflags
-I/Users/cbrown/example/needs/smaz/build/osx/x86_64/include

ldflags

Provides the flags necessary to add the library paths to your linking.

Example:

cbrown@mbp:~/example% needy ldflags
-L/Users/cbrown/example/needs/smaz/build/osx/x86_64/lib

builddir

Provides the build directory for the given library.

Example:

cbrown@mbp:~/example% needy builddir smaz
/Users/cbrown/example/needs/smaz/build/osx/x86_64

generate

Generates helpful files.

Example:

cbrown@mbp:~/example% needy generate jamfile

This example places a Jamfile in the needs directory with targets that can be used to integrate with Boost.Build systems.

init

Initializes the source directory for a need, according to the needs file. This includes fetching the source, cleaning the source directory, and running user-defined post-clean steps. This is often useful in conjunction with dev-mode.

Example:

cbrown@mbp:~/example% needy init asio
Initializing asio...

pkg-config-path

Provides the path necessary for using pkg-config.

Example:

cbrown@mbp:~/example% needy pkg-config-path gsl
/Users/cbrown/example/needs/gsl/build/osx/x86_64/lib/pkgconfig

dev

A suite of tools to enable in-place development of needs.

See needy dev --help for details.