copy / register / --gen-script and --destdir

I can use ./setup copy --destdir to copy all hi files etc to some directory. But how do I register it then? Setting --prefix when using configure does'nt seem to adjust the register.sh using --gen-script I just can't add --destdir. What am I missing? Marc

On Sun, Jun 03, 2007 at 10:54:03PM +0200, Marc Weber wrote:
I can use ./setup copy --destdir to copy all hi files etc to some directory.
But how do I register it then? Setting --prefix when using configure does'nt seem to adjust the register.sh using --gen-script I just can't add --destdir.
What am I missing?
The docs a bit terse on this point, but copy --destdir isn't intended for registering on the same machine. It's for building binary packages, where you want to build an image of part of the root filesystem of the target machine, but place it inside a subdirectory on the build machine. The idea is to tar up that subtree, ship it to the target machine, unpack it there at the root and run register.sh. The register.sh script is supposed to be ignorant of the destdir.

On Mon, 2007-06-04 at 02:04 +0100, Ross Paterson wrote:
On Sun, Jun 03, 2007 at 10:54:03PM +0200, Marc Weber wrote:
I can use ./setup copy --destdir to copy all hi files etc to some directory.
But how do I register it then? Setting --prefix when using configure does'nt seem to adjust the register.sh using --gen-script I just can't add --destdir.
What am I missing?
The docs a bit terse on this point, but copy --destdir isn't intended for registering on the same machine. It's for building binary packages, where you want to build an image of part of the root filesystem of the target machine, but place it inside a subdirectory on the build machine. The idea is to tar up that subtree, ship it to the target machine, unpack it there at the root and run register.sh. The register.sh script is supposed to be ignorant of the destdir.
Ah yes, quite right. The --destdir is like automake's "make install DESTDIR=$TMP/blah" feature. But using configure --prefix should change what register --gen-script produces, so if that's not happening then it's a bug I think. Duncan

The --destdir is like automake's "make install DESTDIR=$TMP/blah" feature. But using configure --prefix should change what register --gen-script produces, so if that's not happening then it's a bug I think.
Perhaps I should tell you what I am about to do. I want to register some cabal packages in the nix software distribution system. a -> b Package a depends on b and c ` c Right now when a is build nix does create a new package databse registering b and c. I think this can be done better by letting b and c have its own package database containing only their libs of their own. Then when a has to be build GHC_PACKAGE_DATABASE=<path to pkg-db a>:<path to pkg-db b> can be used to tell ghc where to find those libs. Thus my trouble is that I should copy the lib to /nix/store/<somepath>/ Currently I'm using sed to prefix the right prefix using --gen-script .. Fixing cabal (if there is something to fix) does'nt have high priority for me right now. And in the long run I think we should think about writing something similar to scons (python build system) because some features should be written anyway (such as module dependency tracking ... ) At the moment I'm not sure how this should look like in detail. Thanks Marc
participants (3)
-
Duncan Coutts
-
Marc Weber
-
Ross Paterson