[uClibc]make install?

David Schleef ds at schleef.org
Tue Jul 17 05:18:49 UTC 2001


On Mon, Jul 16, 2001 at 10:01:42PM -0500, scott wrote:
> I'm a newcomer to uClibc. I'm trying to get it installed for later
> use, and I must admit I'm a bit stumped. Seems to me either:
> 
>   A: I'm thick-headed when it comes to the DEVEL_PREFIX, ROOT_DIR, and
> TARGET_PREFIX env vars, or
>   B: things are really broken.
> 
> I was using the snapshot from about a week ago, and that worked okay
> for me, but the recent changes to the Makefile don't install anything.
> I'm trying to get the binaries and static libraries installed under
> /uclibc (/uclibc/bin, /uclibc/usr/lib, etc.). The way I read the
> descriptions in the Config file, I should have:
> 
> DEVEL_PREFIX =
> ROOT_DIR = /uclibc
> TARGET_PREFIX = /uclibc
> 
> What am I missing? All I get are various _install directories under
> the build directory. Thanks in advance...


The Makefile changes just sort of snuck in, without anyone
announcing it on the list.  I suppose that I should have done
it.

The grand scheme involves creating two environments, the
development environment (which would be installed on the
local machine), and the runtime environment (which you copy
onto the target machine.  "make install" will install the
development environment, and "make install_target" the
target runtime environment.  It is important to note that
you should not install the target environment on any machine
that isn't a target machine, since it may overwrite things
that glibc considers important.

The Config definitions PREFIX and DEVEL_PREFIX control the
development environment.  Typically, these will be /usr
and /usr/<arch>-linux-uclibc/.  TARGET_PREFIX controls
the base directory for the target runtime environment,
typically this will be /.  These definitions are for the
locations the files will be _when_they_are_used_.  They may
be used internally during compilation as required by ld.so
and the cross-compiler.

Since you won't generally be installing files directly to
the target system, and certainly not to the location where
they will finally reside, you can define DESTDIR to be prefixed
to all the directory paths.  Thus, you can run 'make
install_target DESTDIR=/tmp/staging_area', and it will put
the files there.  If you don't supply DESTDIR, it will be
supplied for you as $(TOPDIR)/_install.

Note, note, note: I haven't checked in the DESTDIR changes,
since Erik didn't understand some of the changes I made earlier
(and didn't read the README), so he screwed it up.  =)

If you need to further tune where and when things are installed,
'make install' is broken up into 3 targets, install_dev,
install_runtime, and install_gcc.  See the Makefile for more
info.



dave...






More information about the uClibc mailing list