() Vincent Torri <[EMAIL PROTECTED]>
() Tue, 12 Feb 2008 08:17:12 +0100 (CET)
a library that I use installs shared libs that will be
loaded with dlopen. That is, the static lib, the .la
files (and the import lib *.dll.a on windows) are not
necessary.
Is there a command to add in a Makefile.am to avoid the
installation of those file, so that only the sahred lib
is installed ?
I'm interested in the answer to this question, as well. In
the meantime, i use the hacky workaround script here attached:
#!/bin/sh
# sofix --- smooth out things after $(LIBTOOL) --mode=install
#
# Copyright (C) 2007 Thien-Thi Nguyen
#
# This file is part of ttn-do, released under the terms of the
# GNU General Public License as published by the Free Software
# Foundation; either version 3, or (at your option) any later
# version. There is NO WARRANTY. See file COPYING for details.
##
# Usage: sofix FLAGS DIR FOO.la...
#
# Change directory to DIR and do various things based on FOO.la
# vars and FLAGS, a comma-separated list of symbols:
#
# no-symlinks -- from the files in library_names=LIST, delete
# those that are symlinks, and update FOO.la
# vars `dlname' and `library_names' as well
#
# no-la -- delete FOO.la
#
# ln-s-lib -- symlink (or copy if no-la) FOO.la to libFOO.la
# [default: remove any such symlinks found]
#
# To specify no flags, use "none". Note, however, that "none"
# does not prevent any libFOO.la files from being deleted anyway.
#
# Lastly, chmod -x the remaining regular (non-symlink) files.
##
version="2.0"
v () { echo sofix $version ; echo ; }
usage () { sed '/^##/,/^##/!d;/^##/d;s/^# //g;s/^#$//g' $0 ; }
[ x"$1" = x--help ] && { v ; usage ; exit 0 ; }
[ x"$1" = x--version ] && { v ; exit 0 ; }
[ x"$2" = x ] && { usage ; exit 1 ; }
flags=,"$1", ; shift
cd $1 ; shift
for la ; do
eval `sed '/^dlname=/!d' $la`
eval `sed '/^library_names=/!d' $la`
case $flags in *,no-symlinks,*)
for name in $library_names ; do
if [ -h "$name" ] ; then
rm -f "$name"
elif [ "$dlname" != "$name" ] ; then
sed -e 's/^\(dlname=\).*/\1'"'$name'"'/' \
-e 's/^\(library_names=\).*/\1'"'$name'"'/' \
$la > ${la}T
mv ${la}T $la
dlname="$name"
fi
done ;;
esac
rm -f lib$la
case $flags in *,ln-s-lib,*)
rep="ln -s"
case $flags in *,no-la,*) rep=cp ;; esac
$rep $la lib$la ;;
esac
chmod -x $la $dlname
case $flags in *,no-la,*) rm -f $la ;; esac
done
# sofix ends here
(part of ttn-do[0] and now .common.git[1]) to delete those
files post-install.
thi
_____________________________________________
[0] http://www.gnuvola.org/software/ttn-do/
[1] http://www.gnuvola.org/wip/