Next: , Previous: Cross-Compilation, Up: Use Cases


2.2.9 Renaming Programs at Install Time

The GNU Build System provides means to automatically rename executables before they are installed. This is especially convenient when installing a GNU package on a system that already has a proprietary implementation you do not want to overwrite. For instance, you may want to install GNU tar as gtar so you can distinguish it from your vendor's tar.

This can be done using one of these three configure options.

--program-prefix=PREFIX
Prepend PREFIX to installed program names.
--program-suffix=SUFFIX
Append SUFFIX to installed program names.
--program-transform-name=PROGRAM
Run sed PROGRAM on installed program names.

The following commands would install hello as /usr/local/bin/test-hello, for instance.

     ~/amhello-1.0 % ./configure --program-prefix test-
     ...
     ~/amhello-1.0 % make
     ...
     ~/amhello-1.0 % sudo make install
     ...