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 and manpages before they are installed (see Man Pages). 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
     ...