Changes to make fptools insfrastructure usable for standalone libraries

Simon Marlow simonmar at microsoft.com
Wed May 21 09:50:11 EDT 2003


Let's try that again, this time with the attachment...

> -----Original Message-----
> From: glasgow-haskell-bugs-admin at haskell.org 
> [mailto:glasgow-haskell-bugs-admin at haskell.org] On Behalf Of 
> Simon Marlow
> Sent: 21 May 2003 14:30
> To: Alastair Reid; glasgow-haskell-bugs at haskell.org
> Subject: RE: Changes to make fptools insfrastructure usable 
> for standalone libraries
> 
> Hi Alastair,
> 
> Rather than reply individually to each point in your message, 
> I've just
> hacked up what I think package.mk should look like (attached, but
> completely untested).
> 
> Your confused about the STAMP_PKG_CONF stuff: I think it 
> should just be
> disabled altogether for a standalone library.  See my version of
> package.mk.
> 
> Also I'm not sure what you're trying to do with $(libdir).  You should
> *never* have to change libdir; if you do, then something's probably
> wrong. 
> 
> > 1) mk/target.mk needs this change.
> 
> It doesn't with my changes, I think.
> 
> > 2) The code that invoked ghc-pkg < package.conf.{inplace,installed}.
> 
> This seems to be a source of confusion.  Take a look at how my version
> of package.mk does it, and see if that clarifies things.
> 
> > [Hmmm, maybe I should leave this up to the person running configure?
> > To make this work, I just have to take care that I install in 
> > a subdirectory 
> > of libdir not in libdir itself since pissing all over 
> > /usr/lib probably won't 
> > win many friends.]
> 
> If you just leave $(libdir) alone, you'll get one that looks like
> /usr/lib/<yourlibrary>.
> 
> > My example library Makefile now contains this header.  The 
> > FPTOOLS_TOP part is 
> > the most interesting (and, yes, it _does_ have to come after 
> > boilerplate to 
> > avoid being overridden).
> > 
> >    TOP = .
> >    include $(TOP)/mk/boilerplate.mk
> >    FPTOOLS_TOP := ../..
> 
> Hmm, you should need to touch $(FPTOOLS_TOP).  
> 
> The directory structure of your library should look something 
> like this:
> 
> fptools/      (or whatever you want to call it)
>    mk/
>         boilerplate.mk
>         target.mk
>         package.mk
>         etc.
>    <yourlibrary>/
>         Makefile       (NOTE: with TOP=., SUBDIRS=src )
>         mk/
>               boilerplate.mk (eg. see libraries/mk/boilerplate.mk)
>               version.mk     (eg. see ghc/mk/version.mk)
>               target.mk      (eg. see libraries/mk/target.mk)
>         src/
>               Makefile  (NOTE: with TOP=.. )
>               Foo.hs
>               etc.
> 
> You can flatten this slightly, putting the contents of
> fptools/<yourlibrary>/src directly into fptools/<yourlibrary> if you
> want.
> 
> Cheers,
> 	Simon
> 
> _______________________________________________
> Glasgow-haskell-bugs mailing list
> Glasgow-haskell-bugs at haskell.org
> http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
> 
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: package.mk
Type: application/octet-stream
Size: 6927 bytes
Desc: package.mk
Url : http://www.haskell.org/pipermail/glasgow-haskell-bugs/attachments/20030521/0b7552b4/package.obj


More information about the Glasgow-haskell-bugs mailing list