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


2.2 Building a simple package

All interaction with GSRC is performed via the program Make. When you execute Make via the make command, you generally must provide a target that tells Make which recipe, consisting of a series of pre-defined commands, to execute. For example, the build target will tell Make to execute a recipe to build the software, while the install target will execute a recipe for installing it. Often, a default recipe will be available that will typically build the software, allowing you to omit the build target.

Thus, in GSRC, to build any package, type make build (or, simply make) in the package’s subdirectory. You can change to the directory with the cd command in the shell, or with the -C option of make. For example, to build the hello package in the gnu/hello subdirectory from the root GSRC directory use:

$ make -C gnu/hello

This will download, unpack, configure and build the hello package. The package will be built in the subdirectory gnu/hello/work.

$ ./gnu/hello/work/hello-2.9/src/hello
Hello, world!