logo       

Re: Changes to make fptools insfrastructure usable for standalone librar: msg#00033

lang.haskell.glasgow.bugs

Subject: Re: Changes to make fptools insfrastructure usable for standalone libraries

[I know you're busy with the new release at the moment - so feel free to delay
until it's out the door.]

After setting up the X11/mk/*.mk files you suggested (see recent commits in
fptools/libraries/X11) things worked pretty well (with your modified
package.mk file).

That is, I can now:

cd fptools
autoconf
./configure --with-greencard
cd libraries/X11
make install


Some remaining issues:

1) There was nothing including version.mk so it tried to install in
/usr/lib/ghc-6.0.

I couldn't figure out what was making it pick up the ghc
settings (presumably from ghc/mk/version.mk) but adding:

-include $(TOP)/mk/version.mk

at the end of fptools/libraries/X11/boilerplate.mk seemed to fix this.

2) For some reason, the code at the head of package.mk wasn't working.

ifneq "$(GHC_DRIVER_DIR)" ""
STANDALONE_PACKAGE = NO
else
STANDALONE_PACKAGE = YES
endif

That is, it was setting STANDALONE_PACKAGE to NO.
This may well be connected with erroneously picking up the ghc
version info?

For now I have fixed this by putting this in target.mk:

# This is a standalone library. That is, it is not (and cannot be)
# built as part of the ghc build process but is built later after
# you have installed GHC.
STANDALONE_PACKAGE = YES

But that would require changes to all existing packages. (This may not
be unreasonable though?)

3) Given the choice of install location
(usr/lib/${ProjectNameShort}-${ProjectVersion}), I decided that
X11 was a bad name for the project and settled on HSX11. This means
it gets installed in

/usr/local/lib/HSX11-1.0

This directory name isn't bad but better ones may well exist.
(I'm also thinking that including the compiler name and version number
would be a good idea.)

4) The little TOP/FPTOOLS_TOP/THIS_PACKAGE_TOP dance:

LIBRARY_TOP := $(TOP)
TOP:=$(TOP)/..
include $(TOP)/mk/boilerplate.mk
TOP:=$(LIBRARY_TOP)

is a bit awkward (and confuses the hell out of me when I go looking at
fptools/mk files). Any chance of fixing this properly by having each
standalone project (eg ghc, HSX11, happy, etc.) setup:

PROJECT_TOP = .
FPTOOLS_TOP = <wherever you feel like>
GHC_TOP = $(FPTOOLS_TOP)/ghc # optional

and replace all current uses of $(TOP) with the appropriate choice of TOP?

5) A possibly related issue is that when I distribute the X11 library, I'd
prefer to have fptools be a subdirectory of X11 not the other way around (or
have it as a debian package that I install before building X11). Then I'd
set

FPTOOLS_TOP=$(TOP)/fptools

or, maybe,

FPTOOLS_TOP=/usr/lib/fptools-1.0

in X11/mk/boilerplate.mk

6) It's not a big deal but...

It looks to me as though bootstrap.mk only exists for installing
ghc from .hc files so maybe it ought to be in fptools/ghc/mk.
(I guess it's not because fptools/libraries probably builds from .hc
files too?)

As I say, no big deal.

--
Alastair Reid


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise