logo       

RE: Changes to make fptools insfrastructure usable for standalone librar: msg#00027

lang.haskell.glasgow.bugs

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

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

> -----Original Message-----
> From: glasgow-haskell-bugs-admin@xxxxxxxxxxx
> [mailto:glasgow-haskell-bugs-admin@xxxxxxxxxxx] On Behalf Of
> Simon Marlow
> Sent: 21 May 2003 14:30
> To: Alastair Reid; glasgow-haskell-bugs@xxxxxxxxxxx
> 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@xxxxxxxxxxx
> http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
>
>

Attachment: package.mk
Description: package.mk

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

News | FAQ | advertise