gar.conf.mk vars

DESTIMG"> DESTIMG

Many of the variables in gar.conf.mk are controlled by the value of DESTIMG. Using different values of DESTIMG, it is possible to achieve vastly different configurations. Each such configuration specifies the parameters that packages use when they are installed into that particular filesystem image. Its value is handled automatically, for the most part, and defaults to "main".

Variables which are controlled by DESTIMG can be identified by the fact that they are set like this:

foo = $($(DESTIMG)_foo)

To override a variable in a particular image, prefix its name with the name of the image and an underscore. For example if foo is controlled by DESTIMG and you want $(foo) to have the value "bar" in the "main" image, set the value of main_foo to "bar".

prefix"> prefix

This is the directory, relative to the root of the final installed system, against which everything will be relative. It is typically / or /usr.

exec_prefix"> exec_prefix

This is the root for architecture-specific files. It is typically the same as $(prefix)

bindir"> bindir

Where installed binaries go. Usually $(exec_prefix)/bin

sbindir"> sbindir

Historically this was where statically linked programs went, but now it is used for system administration programs. Typically $(exec_prefix)/sbin

libexecdir"> libexecdir

This is where programs that will only be called from other programs are stored. Some use $(bindir), while still others prefer something like $(prefix)/var/lib

datadir"> datadir

This is where information that can be shared among machines via NFS is stored. Typically $(prefix)/share

sysconfdir"> sysconfdir

This is the directory where system-wide configuration files go. Typically $(prefix)/etc

sharedstatedir"> sharedstatedir

This is where information that can be shared among machines via NFS is stored. Typically $(prefix)/share

localstatedir"> localstatedir

This is the directory where variable data are stored. Typically $(prefix)/var

libdir"> libdir

This is where shared and static libraries are kept. Defaults to $(exec_prefix)/lib

infodir"> infodir

This is the standard directory for GNU Info files, which are a form of documentation. Typically $(prefix)/info

lispdir"> lispdir

Possibly vestigial, modern autoconfs don't allow this as a switch. It is included because an older version of the GNU make manual listed it as a standard path variable. Defaults to $(prefix)/share/emacs/site-lisp

includedir"> includedir

This is where header files are kept. Typically $(prefix)/include

mandir"> mandir

Where man (manual) pages are kept. Typically $(prefix)/man

docdir"> docdir

Not one of the standard GNU dir variables, this is provided to distinguish documentation from all the required-to-run /usr/share type files. Defaults to $(prefix)/share/doc

sourcedir"> sourcedir

Again, not one of the standard GNU dir variables. This is a location for packages to install source code in order that other packages can find it. Defaults to $(prefix)/src

DESTDIR"> DESTDIR

This is the location relative to the root of the /build system/ where files will be installed. This is different from the $(prefix) var in that $(DESTDIR) defines where the dirs will be at /install time/, while $(prefix) defines what the prefix will be at /runtime/. These two are different for the BBC because of chroot magic and the fact that we're building a filesystem that will later become the root.

The value of DESTDIR is dependent on the value of DESTIMG, and should be different for each defined image.

BUILD_PREFIX"> BUILD_PREFIX

BUILD_PREFIX is deprecated. The following is kept for nostalgia value:

Sometimes files should be installed in order to assist a build, but won't be needed at runtime. The BBC GAR tree uses this prefix for documentation and headers. In addition, BUILD_DEPS will be installed into this prefix. Because of the DESTDIR/prefix relationship, this dir must be relative to the $(DESTDIR), with enough /..'s prepended to it to get back to the host system's /.

The default is $(ROOTFROMDEST)/tmp/build, which uses the ROOTFROMDEST variable to calculate the number of /..'s necessary. This allows it to survive changes in DESTDIR that happen with some targets (such as tarball).

ROOTFROMDEST"> ROOTFROMDEST

This variable does transformations on DESTDIR to create the correct number of /..'s to get to the host system's root. That is, $(ROOTFROMDEST)$(DESTDIR) should be equivalent to / on the host system. It is largely useful for making a proper BUILD_PREFIX.

Compiler Flags

These three standard variables are used by the C compiler. We append switches to tell the compiler to look in our install directories for our custom-compiled libraries.

CPPFLAGS"> CPPFLAGS

CFLAGS"> CFLAGS

LDFLAGS"> LDFLAGS

FILE_SITES"> FILE_SITES

This contains a space-separated list of file:// URLs to locations where downloadable files (source archives and patches) on the local system.

MASTER_SITES"> MASTER_SITES

We append a master download site to the end of this variable, in the event that both the $(FILE_SITES) and the URLs supplied by the GAR package's Makefile have all failed.