Using nb

1. Initial setup for first-time users.  Before using nb2 to compile or link a program, each user needs to type nb2 -setup. This downloads the default files that each user needs to run nb2, including the gpg key rings that tell nb2 which signatures are trustworthy. (The user can change these using gpg.)

2. Compiling a program.  To compile a program in such a way that nb2 will attempt to identify and download libraries from the net, just type nb2 command. For instance, if make would compile and link your program with all libraries present, nb2 make will do so while attempting to download and install libraries that are not present. The -v option tells nb2 to be more verbose than usual. For instance, nb -v make tells nb2 to be more chatty about what it's doing whenever make invokes a compiler or linker that nb2 knows about. Another way to do the same thing is to set the environment variable NB2_VERBOSE to some integer number - the larger the number, the chattier nb becomes.

3. Downloading a file.  nb2 can download a file that is accessible using HTTP if you type

nb2 -download source-url filename
This is mostly for the benefit of library install scripts (so that they will have a reliable means of downloading files on any platform), but ordinary users might occasionally find it useful.

4. Evaluate an expression.  If you want to know how nb will evaluate an expression (for instance, a constraint expression in library metadata), type

nb2 -e expression
For instance
nb2 -e target.cpu.arch
will show you the architecture name for the current platform.
Last change: 6 July 2005