Next: Anatomy of a GSRC Makefile, Previous: Technical information, Up: Technical information [Contents]
The GSRC build system is based on a system called GARstow by Adam Sampson, which, in turn, was based on an earlier system called GAR by Nick Moffitt. In this section, the basic architecture of the GSRC build system will be described.
GSRC consists of several system Makefiles plus the Makefile for each
package. When the user calls make
on a package’s Makefile,
the GSRC system Makefiles are pulled in. There are several of these
system Makefiles:
File | Description |
---|---|
gar.mk | This file contains the top-level targets such as build or install. |
gar.lib.mk | This file contains recipes to perform the sub-tasks for each top-level target (see below). |
gar.master.mk | This file contains master URLs for downloading packages (i.e. http://ftp.gnu.org/gnu). |
gar.lib | This directory contains further Makefiles to define common variable values for typical build systems, such as the standard GNU Autotools process. |
gar.conf.mk | This file contains the general configuration of GSRC. |
gar.env.mk | The variables in this file are used to properly set the build environment for GSRC. |
config.mk | This file contains the user’s particular GSRC configuration. |
The typical user-level GSRC Make targets, such as fetch, build or install, come from gar.mk. Depending on the package’s build requirements, as defined in the package’s GSRC Makefile, these user-level targets will depend on lower-level targets that actually perform the required tasks.
For example, in a typical GNU package, configuration is done with a configure script while building and installing are done with a Makefile. So, for the package hello, the build target will depend on a target called build-work/hello-2.9/Makefile (build- plus the location of the Makefile distributed with the package). For a Python-based package that is installed via a setup.py, the install target will depend on the target install-work/foo-1.0/setup.py. The file gar.lib.mk contains many generalized Make recipes to handle each of these different scenarios.
The directory gar.lib contains Makefiles that set common variable values for packages that share similar build systems. It has a file called auto.mk, for example, that defines the settings for a package that uses the standard Autotools process.
Next: Anatomy of a GSRC Makefile, Previous: Technical information, Up: Technical information [Contents]