www.LinuxHowtos.org





FIX-LA-RELINK-COMMAND

Section: (1)
Updated: 2012-05-26
Index Return to Main Contents
 

NAME

fix-la-relink-command - fixes relink_command field of .la files in a build tree  

SYNOPSIS

fix-la-relink-command [OPTIONS] [LAFILES or DIRECTORIES]  

DESCRIPTION

fix-la-relink-command modifies the relink_command field of libtool .la files to ensure that during the relinking stage of make install
, the corresponding library is linked to libraries in the local build tree and not to the versions of the same libraries that are installed systemwide.

Specifically, for every .la file in a relative directory $dir that is specified in relink_command, fix-la-relink-command adds an extra -L$dir/.libs
argument, and puts these arguments before the first relative .la file or -L argument with an absolute path.

For example,


    relink_command="(cd /tmp/foo/libfoo; /bin/sh /tmp/foo/libtool --silent --tag CC --mode=relink gcc -O2 foo.lo bar/libbar.la ../baz/libbaz.la /usr/lib/libfrob.la -lm)"

will become


    relink_command="(cd /tmp/foo/libfoo; /bin/sh /tmp/foo/libtool --silent --tag CC --mode=relink gcc -O2 foo.lo -Lbar/.libs -L../baz/.libs bar/libbar.la ../baz/libbaz.la /usr/lib/libfrob.la -lm)"

 

Options

-h, --help
Show usage information and exit.
-m, --manual
Show manual page and exit.
-q, --quiet
Do not print messages.
-v, --version
Show version information and exit.
 

Arguments

If names of .la files are given, they are processed. If names of directories are given, .la files in them are processed recursively, but hidden or symlinked subdirectories will not be recursed into.  

RESTRICTIONS

It is assumed that relink_command is one line. It is assumed that any spaces in paths are escaped using '\'.  

COPYRIGHT AND LICENSE

Copyright 2011, 2012 Alexandre Rostovtsev <tetromino@gentoo.org>

This program is free software; you may redistribute it and/or modify it under the same terms as Perl itself.  

SEE ALSO

The GNU libtool manual, <http://www.gnu.org/software/libtool/manual/libtool.html>


 

Index

NAME
SYNOPSIS
DESCRIPTION
Options
Arguments
RESTRICTIONS
COPYRIGHT AND LICENSE
SEE ALSO