Table of Contents
The term "prefixed" is made up. It's not a particularly clear word, but it adequately describes one of the problems we face in building distribution-neutral packages. In short, programs built using the autotools build system (and almost all Linux software is) often use a series of macros to hard code the prefix that the program was configured with into the source code itself. This is most often used to build in the path of data files so allowing programs to load them at runtime with the minimum of fuss, but it does mean that once a program is compiled, it can't be moved around. Here is an example of a line of C that does this:
MainData->xml = glade_xml_new (GNOMEICU_GLADEDIR "main.glade", "app", NULL);
GNOMEICU_GLADEDIR is defined to be the prefix specified at the time the
configure script is run. Here is the relevant lines from Makefile.am
:
# # Makefile.am for GnomeICU # gladedir = $(datadir)/gnomeicu/glade/ INCLUDES = -DGNOMEICU_GLADEDIR=\"$(gladedir)\"
This sort of practice poses a problem for us, as it means that once compiled, these programs are not relocatable: they can only be installed to one prefix. As often distros require software to be installed into different prefixes, it means we can't portably package such a program until it has been deprefixed , IE all hard coded paths in the program have been replaced with soft paths (IE figured out at runtime). This has a number of other advantages, for instance a binary package can be installed to your home directory if a system accessible path is not desired.