Next: , Previous: , Up: Getting started   [Contents]

2.5 Useful targets

To clean up the build directory and delete any downloaded files, use the clean target:

$ make -C gnu/hello clean

There are other useful targets. For example, the whole build sequence can be broken down into stages as follows:

$ make -C gnu/hello fetch checksum extract configure build install

Each target depends on the previous one, so typing make -C gnu/hello install executes all the earlier targets first.

You can install the source code of a package (to, i.e., /gnu/src/hello-2.9) using the install-src target. Likewise, the source can be removed using the uninstall-src target.

To see some information about a package, use the target pkg-info.

$ make -C gnu/hello pkg-info
make: Entering directory `/home/gnu/gsrc/gnu/hello'
Name:        GNU Hello
Version:     2.9
 GNU Hello prints the message "Hello, world!" and then exits.  It
 serves as an example of standard GNU coding practices.  As such, it
 supports command-line arguments, multiple languages, and so on.
Status:      installed (stowed)
make: Leaving directory `/home/gnu/gsrc/gnu/hello'

The “Status” can be any of: “not installed”, “installed (not stowed)” or “installed (stowed)” (see Package versions).

To view a more concise summary, ideal for producing a list of packages in script, use the target pkg-info-curt.

$ make -C gnu/hello pkg-info-curt
make: Entering directory `/home/gnu/gsrc/gnu/hello'
gnu/hello 2.9
 A program that produces a familiar, friendly greeting
make: Leaving directory `/home/gnu/gsrc/gnu/hello'

To get a better idea of what files will be downloaded and which dependencies must be built in order to use a package, use the fetch-list target.

$ make -C gnu/hello fetch-list
make: Entering directory `/home/gnu/gsrc/gnu/hello'
Name: hello
Version: 2.9
Distribution files:
Patch files:
Signature files:
make: Leaving directory `/home/gnu/gsrc/gnu/hello'

Most GNU packages are highly configurable. To see which configuration options are available to you, you may invoke the help-config target.

Finally, if you choose to remove a package, you may use the uninstall target. This target “un-stows” the package; if you were to re-install it, the package would not need to be re-built. Instead, it would merely be re-stowed. To completely remove a package, use the uninstall-pkg target. When you update a package to a new version, the old version is merely un-stowed and the new version is installed alongside it (see Package versions). In order to clean out old package versions, use the uninstall-pkg-old target.

Next: , Previous: , Up: Getting started   [Contents]