[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Staging (DESTDIR) directories with libtool 1.5 and HP-UX 11

From: Dano Carroll
Subject: Staging (DESTDIR) directories with libtool 1.5 and HP-UX 11
Date: Fri, 23 Jan 2004 23:50:27 -0600
User-agent: Mutt/


I've been doing work on building RPM's for HP-UX 11 and 11i, so you
probably already know what I'm going to ask about. 

How do I invoke libtool in order to install an executable into a
temporary directory which is not its final destination. In addition,
this executable is linked against a shared library that was built at
the same time that is also going into a temporary directory which is
not the library's final destination.

I am not concerned about automake or autoconf at this point. I will
demonstrate what I get using the hello program referred to in the goat
book. The Makefile I use is given below. For the purpose of this
demonstration, is already installed in /usr/local/lib. I am
using libtool 1.5 and gcc 3.3.2, both installed in /usr/local

hello: main.c
        libtool --mode=link /usr/local/bin/gcc -o hello main.c hello.lo
        libtool --mode=link /usr/local/bin/gcc -rpath /usr/local/lib -o hello.lo trim.lo
        libtool --mode=link /usr/local/bin/gcc -rpath /usr/local/lib -o trim.lo

hello.lo: hello.c
        libtool --mode=compile /usr/local/bin/gcc -c hello.c

trim.lo: trim.c
        libtool --mode=compile /usr/local/bin/gcc -c trim.c

install: hello
        mkdir -p $(DESTDIR)/usr/local/lib
        mkdir -p $(DESTDIR)/usr/local/bin
        libtool --mode=install /usr/local/bin/install -c 
        libtool --mode=install /usr/local/bin/install -c 
        libtool --mode=install /usr/local/bin/install -c hello 

        rm -f *.a *.o *.lo *.la *~ hello
        rm -rf .libs
End Makefile--

When I do a "make install", I get no errors. When I do a "make install
DESTDIR=/tmp/hello", I get this:

libtool --mode=install /usr/local/bin/install -c hello 
libtool: install: warning: `' has not been installed in 
libtool: install: warning: cannot relink `hello'
/usr/local/bin/install -c hello /tmp/hello/usr/local/bin/hello

The hello file in /tmp/hello/usr/local/bin/hello is the wrapper file,
not a binary. 

What I'm hoping to find out is how I need to use libtool to get what I
want since the documentation seems to imply that I can install
libraries and executables into temporary directories and that once
they are copied into their final directories, everything will work

Dano Carroll

reply via email to

[Prev in Thread] Current Thread [Next in Thread]