--prefix and --copy-prefix in Cabal

Ross Paterson ross at soi.city.ac.uk
Tue Jan 25 05:18:22 EST 2005


On Sun, Jan 23, 2005 at 02:11:28PM +0200, Krasimir Angelov wrote:
> There are two options for prefixes: --prefix and --copy-prefix. In my
> opinion they have the same meaning and I wonder whether we need to
> have two different options for configure and copy commands. Any
> thoughts?

The typical procedure for building a Linux binary distribution is to
build an image of part of the directory tree on the target system in
a subdirectory of the build system.  So the place you install to on
the build machine (copy-prefix) may differ from the place the files
will end up (prefix).  For example, you might want to install

	/usr/share/foo/datafile
	/usr/bin/foo

with the latter having the former name compiled in.  Of course you
don't want to clobber those on the build machine.  So the builder
might create files

	/tmp/build.1234/usr/share/foo/datafile
	/tmp/build.1234/usr/bin/foo (referring to /usr/share/foo/datafile)

so they can move into /tmp/build.1234 to create a tar file that an
installer can unpack in the root directory of the target machine.
Here we'd have --prefix=/usr --copy-prefix=/tmp/build.1234/usr.


More information about the Libraries mailing list